diff --git a/.cvsignore b/.cvsignore index e69de29..4f899be 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +efont-unicode-bdf-0.4.2.tar.bz2 diff --git a/efont-unicode-bdf.spec b/efont-unicode-bdf.spec new file mode 100644 index 0000000..ad5a60b --- /dev/null +++ b/efont-unicode-bdf.spec @@ -0,0 +1,93 @@ +%define name efont-unicode-bdf +%define fontdir %{_datadir}/fonts/japanese/%{name} + +Name: %{name} +Version: 0.4.2 +Release: 6%{?dist} +Summary: Unicode font by Electronic Font Open Laboratory + +Group: User Interface/X +License: BSD +URL: http://openlab.jp/efont/unicode/ +Source0: http://openlab.jp/efont/dist/unicode-bdf/efont-unicode-bdf-%{version}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch + +BuildRequires: xorg-x11-font-utils +BuildRequires: gzip +Requires(post): %{_bindir}/mkfontdir, %{_sbindir}/chkfontpath, fontconfig +Requires(postun): %{_sbindir}/chkfontpath, fontconfig + +%description +This package provides Unicode bitmap fonts provided by +Electronic Font Open Laboratory. + +%prep +%setup -q + +%build +for f in *bdf ; do + g=${f%bdf}pcf + bdftopcf -o $g $f + gzip -9 $g +done + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT%{fontdir} +for g in *pcf.gz ; do + install -m 644 $g $RPM_BUILD_ROOT%{fontdir} +done + +# create ghost files +touch $RPM_BUILD_ROOT%{fontdir}/{fonts.dir,fonts.cache-1} + +# convert documents' encoding to UTF8. +for f in README.{naga10,shinonome} ; do + mv ${f} ${f}.tmp + iconv -f EUCJP -t UTF8 ${f}.tmp > ${f} && rm -f ${f}.tmp || \ + mv ${f}.tmp ${f} +done + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +if [ -x %{_bindir}/mkfontdir -a -x %{_sbindir}/chkfontpath ] ; then + %{_bindir}/mkfontdir %{fontdir} && %{_sbindir}/chkfontpath -q -a %{fontdir} +fi +[ -x %{_bindir}/fc-cache ] && %{_bindir}/fc-cache 2>/dev/null + +%postun +# final remove? +if [ "$1" == "0" ] ; then + [ -x %{_sbindir}/chkfontpath ] && %{_sbindir}/chkfontpath -q -r %{fontdir} +fi +[ -x %{_bindir}/fc-cache ] && %{_bindir}/fc-cache 2>/dev/null + +%files +%defattr(-,root,root,-) +%doc README* COPYRIGHT ChangeLog List.html +%dir %{fontdir} +%{fontdir}/*pcf.gz +%ghost %verify(not md5 size mtime) %{fontdir}/fonts.cache-1 +%ghost %verify(not md5 size mtime) %{fontdir}/fonts.dir + +%changelog +* Tue Aug 18 2006 Mamoru Tasaka - 0.4.2-6 +- Change %%post. + +* Tue Aug 15 2006 Mamoru Tasaka - 0.4.2-5 +- package again. + +* Tue Aug 15 2006 Mamoru Tasaka - 0.4.2-4 +- Own the original font directory. + +* Thu Aug 10 2006 Mamoru Tasaka - 0.4.2-3 +- Again more treatments. + +* Thu Aug 10 2006 Mamoru Tasaka - 0.4.2-2 +- More neat treatments for post and postun. + +* Thu Aug 10 2006 Mamoru Tasaka - 0.4.2-1 +- Initial packaging. diff --git a/sources b/sources index e69de29..bdc4889 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +0c0acbb40e44d899472001302b1c9e48 efont-unicode-bdf-0.4.2.tar.bz2