%define gothfontdir %{_datadir}/fonts/%{name}-gothic %define minfontdir %{_datadir}/fonts/%{name}-mincho %define catalogue %{_sysconfdir}/X11/fontpath.d %define fontver 20061016 Name: sazanami-fonts Version: 0.20040629 Release: 3.%{fontver}%{?dist} BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ttmkfdir >= 3.0.6 BuildRequires: mkfontdir URL: http://efont.sourceforge.jp/ # original is http://prdownloads.sourceforge.jp/efont/10087/sazanami-20040629.tar.bz2 # due to Bug#196433, ttf has been modified and the tarball repacked Source0: sazanami-%{fontver}.tar.bz2 Source1: fonts.alias.sazanami-gothic Source2: fonts.alias.sazanami-mincho Summary: Sazanami Japanese TrueType fonts License: BSD Group: User Interface/X %description The Sazanami type faces are automatically generated from Wadalab font kit. They also contains some embedded Japanese bitmap fonts. %package gothic Summary: Sazanami Gothic Japanese TrueType font License: BSD Group: User Interface/X Conflicts: fonts-japanese <= 0.20061016-9.fc8 Provides: ttfonts-ja = 1.2-37 Obsoletes: ttfonts-ja < 1.2-37 %description gothic This package contains Japanese TrueType font for Gothic type face. The Sazanami type faces are automatically generated from Wadalab font kit. They also contains some embedded Japanese bitmap fonts. %package mincho Summary: Sazanami Mincho Japanese TrueType font License: BSD Group: User Interface/X Conflicts: fonts-japanese <= 0.20061016-9.fc8 Provides: ttfonts-ja = 1.2-37 Obsoletes: ttfonts-ja < 1.2-37 %description mincho This package contains Japanese TrueType font for Mincho type face. The Sazanami type faces are automatically generated from Wadalab font kit. They also contains some embedded Japanese bitmap fonts. %prep %setup -q -n sazanami-%{fontver} %build %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT%{gothfontdir} install -d $RPM_BUILD_ROOT%{minfontdir} install -d $RPM_BUILD_ROOT%{catalogue} install -p -m 0644 sazanami-gothic.ttf $RPM_BUILD_ROOT%{gothfontdir}/ install -p -m 0644 sazanami-mincho.ttf $RPM_BUILD_ROOT%{minfontdir}/ install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{gothfontdir}/fonts.alias install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{minfontdir}/fonts.alias # Create fonts.scale and fonts.dir %{_bindir}/ttmkfdir -d $RPM_BUILD_ROOT%{gothfontdir} -o $RPM_BUILD_ROOT%{gothfontdir}/fonts.scale %{_bindir}/mkfontdir $RPM_BUILD_ROOT%{gothfontdir} %{_bindir}/ttmkfdir -d $RPM_BUILD_ROOT%{minfontdir} -o $RPM_BUILD_ROOT%{minfontdir}/fonts.scale %{_bindir}/mkfontdir $RPM_BUILD_ROOT%{minfontdir} # Install catalogue symlink ln -sf %{gothfontdir} $RPM_BUILD_ROOT%{catalogue}/%{name}-gothic ln -sf %{minfontdir} $RPM_BUILD_ROOT%{catalogue}/%{name}-mincho %clean rm -rf $RPM_BUILD_ROOT %post gothic [ -x %{_bindir}/fc-cache ] && %{_bindir}/fc-cache %{gothfontdir} %postun gothic [ "$1" = "0" -a -x %{_bindir}/fc-cache ] && %{_bindir}/fc-cache %{_datadir}/fonts %post mincho [ -x %{_bindir}/fc-cache ] && %{_bindir}/fc-cache %{minfontdir} %postun mincho [ "$1" = "0" -a -x %{_bindir}/fc-cache ] && %{_bindir}/fc-cache %{_datadir}/fonts %files gothic %defattr(-, root, root, -) %doc doc README %dir %{gothfontdir} %{gothfontdir}/*.ttf %verify(not md5 size mtime) %{gothfontdir}/fonts.dir %verify(not md5 size mtime) %{gothfontdir}/fonts.scale %verify(not md5 size mtime) %{gothfontdir}/fonts.alias %{catalogue}/%{name}-gothic %files mincho %defattr(-, root, root, -) %doc doc README %dir %{minfontdir} %{minfontdir}/*.ttf %verify(not md5 size mtime) %{minfontdir}/fonts.dir %verify(not md5 size mtime) %{minfontdir}/fonts.scale %verify(not md5 size mtime) %{minfontdir}/fonts.alias %{catalogue}/%{name}-mincho %changelog * Thu Aug 23 2007 Akira TAGOH - 0.20040629-3.20061016 - Update %%description. - Separate package for gothic and mincho. * Fri Aug 17 2007 Akira TAGOH - 0.20040629-1.20061016 - Split sazanami*ttf up from fonts-japanese.