From 42f307df67c50d535fe188c08df980f6bfbb6657 Mon Sep 17 00:00:00 2001 From: cchance Date: Jan 16 2009 02:42:55 +0000 Subject: - Resolves: rhbz#477332 (Include macro _font_pkg and created fontconfig .conf files.) --- diff --git a/65-baekmuk-ttf-batang.conf b/65-baekmuk-ttf-batang.conf new file mode 100644 index 0000000..ecd1a90 --- /dev/null +++ b/65-baekmuk-ttf-batang.conf @@ -0,0 +1,19 @@ + + + + + + Baekmuk Batang + + serif + + + + serif + + Baekmuk Batang + + + diff --git a/65-baekmuk-ttf-dotum.conf b/65-baekmuk-ttf-dotum.conf new file mode 100644 index 0000000..32392b2 --- /dev/null +++ b/65-baekmuk-ttf-dotum.conf @@ -0,0 +1,19 @@ + + + + + + Baekmuk Dotum + + sans-serif + + + + sans-serif + + Baekmuk Dotum + + + diff --git a/65-baekmuk-ttf-gulim.conf b/65-baekmuk-ttf-gulim.conf new file mode 100644 index 0000000..4d67ff8 --- /dev/null +++ b/65-baekmuk-ttf-gulim.conf @@ -0,0 +1,19 @@ + + + + + + Baekmuk Gulim + + monospace + + + + monospace + + Baekmuk Gulim + + + diff --git a/65-baekmuk-ttf-hline.conf b/65-baekmuk-ttf-hline.conf new file mode 100644 index 0000000..fdb78e0 --- /dev/null +++ b/65-baekmuk-ttf-hline.conf @@ -0,0 +1,7 @@ + + + + + diff --git a/baekmuk-ttf-fonts.spec b/baekmuk-ttf-fonts.spec index 3cf8dc6..3936d46 100644 --- a/baekmuk-ttf-fonts.spec +++ b/baekmuk-ttf-fonts.spec @@ -1,24 +1,27 @@ %define fontname baekmuk-ttf -%define fontconf <65>-%{fontname} -%define archivename %{name}-%{version} +%define archivename %{fontname}-%{version} %define common_desc \ This package provides the free Korean TrueType fonts. -%define fontdir %{_datadir}/fonts/%{fontname} -%define cidmapdir %{_datadir}/ghostscript/conf.d +%define fontdir %{_datadir}/fonts/%{fontname} +%define gsdir %{_datadir}/ghostscript/conf.d %define catalogue %{_sysconfdir}/X11/fontpath.d Name: %{fontname}-fonts Version: 2.2 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Free Korean TrueType fonts Group: User Interface/X License: Baekmuk URL: http://kldp.net/projects/baekmuk/ -Source0: http://kldp.net/frs/download.php/1429/%{fontname}-%{version}.tar.gz +Source0: http://kldp.net/frs/download.php/1429/%{archivename}.tar.gz Source1: FAPIcidfmap.ko Source2: cidfmap.ko +Source3: 65-baekmuk-ttf-batang.conf +Source4: 65-baekmuk-ttf-dotum.conf +Source5: 65-baekmuk-ttf-gulim.conf +Source6: 65-baekmuk-ttf-hline.conf Obsoletes: fonts-korean @@ -41,80 +44,133 @@ Conflicts: fonts-korean < 2.2-5 This package contains some common files for Baekmuk Korean TrueType fonts. -%define mk_pkg()\ -%package %1\ -Summary: Korean Baekmuk TrueType %2 typeface\ -License: Baekmuk\ -Group: User Interface/X\ -Obsoletes: ttfonts-ko < 1.0.11-33 fonts-korean < 2.2-6\ -Requires: fontpackages-filesystem, %{name}-common\ -\ -%description %1\ -%common_desc\ -\ -This package contains the Korean TrueType font %2 typeface.\ -\ -%post %1\ -if [ -x %{_bindir}/fc-cache ]; then\ - %{_bindir}/fc-cache %{_datadir}/fonts\ -fi\ -\ -%postun %1\ -if [ "$1" = "0" ]; then\ - if [ -x %{_bindir}/fc-cache ]; then\ - %{_bindir}/fc-cache %{_datadir}/fonts\ - fi\ -fi\ -\ -%files %1\ -%defattr(-,root,root,-)\ -%dir %{fontdir}-%1\ -%{fontdir}-%1/*.ttf\ -%verify(not md5 size mtime) %{fontdir}-%1/fonts.dir\ -%verify(not md5 size mtime) %{fontdir}-%1/fonts.scale\ -%{catalogue}/%{name}-%1 - -%mk_pkg batang Batang -%mk_pkg dotum Dotum -%mk_pkg gulim Gulim -%mk_pkg hline Headline +%package batang +Summary: Korean Baekmuk TrueType Batang typeface +License: Baekmuk +Group: User Interface/X +Obsoletes: ttfonts-ko < 1.0.11-33 fonts-korean < 2.2-6 +Requires: fontpackages-filesystem, %{name}-common + +%description batang +%common_desc + +This package contains the Korean TrueType font Batang typeface. + +%_font_pkg -n batang -f *-%{fontname}-batang*.conf batang.ttf + +%verify(not md5 size mtime) %{fontdir}/fonts.dir +%verify(not md5 size mtime) %{fontdir}/fonts.scale +%verify(not md5 size mtime) %{catalogue}/%{fontname} + +%package dotum +Summary: Korean Baekmuk TrueType Dotum typeface +License: Baekmuk +Group: User Interface/X +Obsoletes: ttfonts-ko < 1.0.11-33 fonts-korean < 2.2-6 +Requires: fontpackages-filesystem, %{name}-common + +%description dotum +%common_desc + +This package contains the Korean TrueType font Dotum typeface. + +%_font_pkg -n dotum -f *-%{fontname}-dotum*.conf dotum.ttf + +%verify(not md5 size mtime) %{fontdir}/fonts.dir +%verify(not md5 size mtime) %{fontdir}/fonts.scale +%verify(not md5 size mtime) %{catalogue}/%{fontname} + +%package gulim +Summary: Korean Baekmuk TrueType Gulim typeface +License: Baekmuk +Group: User Interface/X +Obsoletes: ttfonts-ko < 1.0.11-33 fonts-korean < 2.2-6 +Requires: fontpackages-filesystem, %{name}-common + +%description gulim +%common_desc + +This package contains the Korean TrueType font Gulim typeface. + +%_font_pkg -n gulim -f *-%{fontname}-gulim*.conf gulim.ttf + +%verify(not md5 size mtime) %{fontdir}/fonts.dir +%verify(not md5 size mtime) %{fontdir}/fonts.scale +%verify(not md5 size mtime) %{catalogue}/%{fontname} + +%package hline +Summary: Korean Baekmuk TrueType Headline typeface +License: Baekmuk +Group: User Interface/X +Obsoletes: ttfonts-ko < 1.0.11-33 fonts-korean < 2.2-6 +Requires: fontpackages-filesystem, %{name}-common + +%description hline +%common_desc + +This package contains the Korean TrueType font Headline typeface. + +%_font_pkg -n hline -f *-%{fontname}-hline*.conf hline.ttf + +%verify(not md5 size mtime) %{fontdir}/fonts.dir +%verify(not md5 size mtime) %{fontdir}/fonts.scale +%verify(not md5 size mtime) %{catalogue}/%{fontname} %prep -%setup -q -n %{fontname}-%{version} +%setup -q -n %{archivename} %build %{nil} %install -rm -rf %{buildroot} - -# for catalogue -install -d %{buildroot}%{catalogue} +%__rm -rf %{buildroot} +# font +%__install -d -m 0755 %{buildroot}%{fontdir} for i in batang dotum gulim hline; do - install -d %{buildroot}%{fontdir}-$i - install -p -m 0644 ttf/$i.ttf %{buildroot}%{fontdir}-$i - ln -sf ../../..%{fontdir}-$i %{buildroot}%{catalogue}/%{name}-$i - %{_bindir}/ttmkfdir -d %{buildroot}%{fontdir}-$i -o %{buildroot}%{fontdir}-$i/fonts.scale - mkfontdir %{buildroot}%{fontdir}-$i + %__install -p -m 0644 ttf/$i.ttf %{buildroot}%{fontdir} done -# for ghostscript -install -d %{buildroot}%{cidmapdir} -install -p -m 0644 %{SOURCE1} %{buildroot}%{cidmapdir}/ -install -p -m 0644 %{SOURCE2} %{buildroot}%{cidmapdir}/ +# fontconfig conf +%__install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} +%__install -m 0755 -d %{buildroot}%{_fontconfig_confdir} +cd ../ +for fconf in `ls *-%{fontname}-*.conf` +do + %__install -m 0644 $fconf %{buildroot}%{_fontconfig_templatedir}/ + %__ln_s %{_fontconfig_templatedir}/$fconf \ + %{buildroot}%{_fontconfig_confdir}/$fconf +done +cd - + +# fonts.{scale,dir} +%{_bindir}/ttmkfdir -d %{buildroot}%{fontdir} \ + -o %{buildroot}%{fontdir}/fonts.scale +%{_bindir}/mkfontdir %{buildroot}%{fontdir} + +# ghostscript +%__install -d -m 0755 %{buildroot}%{gsdir} +%__install -p -m 0644 %{SOURCE1} %{buildroot}%{gsdir}/ +%__install -p -m 0644 %{SOURCE2} %{buildroot}%{gsdir}/ + +# catalogue +%__install -d %{buildroot}%{catalogue} +%__ln_s %{fontdir} %{buildroot}%{catalogue}/%{fontname} # convert Korean copyright file to utf8 -iconv -f EUC-KR -t UTF-8 COPYRIGHT.ks > COPYRIGHT.ko +%{_bindir}/iconv -f EUC-KR -t UTF-8 COPYRIGHT.ks > COPYRIGHT.ko %clean -rm -rf %{buildroot} +%__rm -rf %{buildroot} %files common %doc COPYRIGHT COPYRIGHT.ko README -%{cidmapdir}/ +%{gsdir}/ %changelog +* Fri Jan 16 2009 Caius Chance - 2.2-11.fc11 +- Resolves: rhbz#477332 (Include macro _font_pkg and created fontconfig .conf files.) + * Fri Jan 09 2009 Caius Chance - 2.2-10.fc11 - Resolves: rhbz#477332 (Convert to new font packaging guidelines.)