Blob Blame History Raw
%define fontname    baekmuk-ttf
%define archivename %{fontname}-%{version}
%define common_desc \
This package provides the free Korean TrueType fonts.

%define fontdir        %{_datadir}/fonts/%{fontname}
%define gsdir          %{_datadir}/ghostscript/conf.d
%define catalogue      %{_sysconfdir}/X11/fontpath.d

Name:           %{fontname}-fonts
Version:        2.2
Release:        12%{?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/%{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

BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch:      noarch
BuildRequires:  fontpackages-devel, xorg-x11-font-utils, ttmkfdir >= 3.0.6

%description
%common_desc

%package common
Summary:        Common files for Korean Baekmuk TrueType fonts
License:        Baekmuk
Group:          User Interface/X
Requires:       fontpackages-filesystem
Conflicts:      fonts-korean < 2.2-5

%description common
%common_desc

This package contains some common files for Baekmuk Korean TrueType fonts.

%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 %{archivename}

%build
%{nil}

%install
%__rm -rf %{buildroot}

# font
%__install -d -m 0755 %{buildroot}%{fontdir}
for i in batang dotum gulim hline; do
  %__install -p -m 0644 ttf/$i.ttf %{buildroot}%{fontdir}
done

# fontconfig conf
%__install -m 0755 -d %{buildroot}%{_fontconfig_templatedir}
%__install -m 0755 -d %{buildroot}%{_fontconfig_confdir}
cd ../
for fconf in %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6}
do
    %__install -m 0644 $fconf %{buildroot}%{_fontconfig_templatedir}/
    %__ln_s %{_fontconfig_templatedir}/`basename $fconf` \
        %{buildroot}%{_fontconfig_confdir}/`basename $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
%{_bindir}/iconv -f EUC-KR -t UTF-8 COPYRIGHT.ks > COPYRIGHT.ko

%clean
%__rm -rf %{buildroot}

%files common
%doc COPYRIGHT COPYRIGHT.ko README
%{gsdir}/

%changelog
* Fri Jan 16 2009 Caius Chance <cchance@redhat.com> - 2.2-12.fc11
- Resolves: rhbz#477332 (Repatched buildsys error.)

* Fri Jan 16 2009 Caius Chance <cchance@redhat.com> - 2.2-11.fc11
- Resolves: rhbz#477332 (Included macro _font_pkg and created fontconfig .conf files.)

* Fri Jan 09 2009 Caius Chance <cchance@redhat.com> - 2.2-10.fc11
- Resolves: rhbz#477332 (Converted to new font packaging guidelines.)

* Mon Jun 30 2008 Caius Chance <cchance@redhat.com> - 2.2-9.fc10
- Refine obsoletes tag version-release specific.

* Mon Jun 30 2008 Caius Chance <cchance@redhat.com> - 2.2-8.fc10
- Resolves: rhbz#453080 (fonts-korean is deprecated and should be removed.)

* Wed Nov 14 2007 Jens Petersen <petersen@redhat.com> - 2.2-7
- better url
- use fontname and fontdir macros

* Mon Sep 24 2007 Jens Petersen <petersen@redhat.com> - 2.2-6
- convert Korean copyright file to utf8 (Mamoru Tasaka, #300651)

* Mon Sep 24 2007 Jens Petersen <petersen@redhat.com> - 2.2-5
- more fixes from Mamoru Tasaka, #300651:
- make common subpackage own ghostscript conf.d
- conflict with previous fonts-korean
- update CID font maps

* Mon Sep 24 2007 Jens Petersen <petersen@redhat.com> - 2.2-4
- preserve timestamps of installed files (Mamoru Tasaka, #300651)
- add a common subpackage for shared files (Mamoru Tasaka, #300651)

* Mon Sep 24 2007 Jens Petersen <petersen@redhat.com> - 2.2-3
- do not provide ttfonts-ko in subpackages (Mamoru Tasaka, #300651)

* Sat Sep 22 2007 Jens Petersen <petersen@redhat.com> - 2.2-2
- license is now designated Baekmuk

* Sat Sep 22 2007 Jens Petersen <petersen@redhat.com> - 2.2-1
- new package separated from fonts-korean (#253155)