rpms/efont-unicode-bdf/devel efont-unicode-bdf.spec,1.2,1.3

Mamoru Tasaka (mtasaka) fedora-extras-commits at redhat.com
Sat Aug 18 07:15:00 UTC 2007


Author: mtasaka

Update of /cvs/extras/rpms/efont-unicode-bdf/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7262

Modified Files:
	efont-unicode-bdf.spec 
Log Message:
* Sat Aug 18 2007 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.4.2-7
- Drop X related dependency completely, along with chkfontpath drop
  (related to #252268, #252275)
- Generate fonts.dir at the build time instead of the runtime
  (following fonts-japanese)



Index: efont-unicode-bdf.spec
===================================================================
RCS file: /cvs/extras/rpms/efont-unicode-bdf/devel/efont-unicode-bdf.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- efont-unicode-bdf.spec	28 Aug 2006 00:31:47 -0000	1.2
+++ efont-unicode-bdf.spec	18 Aug 2007 07:14:27 -0000	1.3
@@ -1,9 +1,12 @@
 %define         name            efont-unicode-bdf
 %define         fontdir         %{_datadir}/fonts/japanese/%{name}
+%define         catalogdir      %{_sysconfdir}/X11/fontpath.d
+%define         catalogname     %{name}
+
 
 Name:           %{name}
 Version:        0.4.2
-Release:        6.1%{?dist}
+Release:        7%{?dist}
 Summary:        Unicode font by Electronic Font Open Laboratory
 
 Group:          User Interface/X
@@ -14,9 +17,13 @@
 BuildArch:      noarch
 
 BuildRequires:  xorg-x11-font-utils
+BuildRequires:  fontconfig
+BuildRequires:  ttmkfdir
 BuildRequires:  gzip
+%if 0%{?fedora} < 8
 Requires(post):  %{_bindir}/mkfontdir, %{_sbindir}/chkfontpath, fontconfig
 Requires(postun):    %{_sbindir}/chkfontpath, fontconfig
+%endif
 
 %description
 This package provides Unicode bitmap fonts provided by
@@ -25,6 +32,14 @@
 %prep
 %setup -q
 
+# convert documents' encoding to UTF8.
+# must be done in %%prep
+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
+
 %build
 for f in *bdf ; do
   g=${f%bdf}pcf
@@ -33,47 +48,76 @@
 done
 
 %install
+# 1. install actual fonts
 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
+# 2-1. create fonts.scale and fonts.dir in advance
+ttmkfdir -d $RPM_BUILD_ROOT%{fontdir} -o $RPM_BUILD_ROOT%{fontdir}/fonts.scale
+mkfontdir $RPM_BUILD_ROOT%{fontdir}
+
+# 2-2. create ghost files
+touch $RPM_BUILD_ROOT%{fontdir}/{encodings.dir,fonts.cache-1}
+
+# 2.3 create libXfont catalogue symlink
+mkdir -p $RPM_BUILD_ROOT%{catalogdir}
+pushd $RPM_BUILD_ROOT%{catalogdir}
+pushd ../../..
+if [ x$(pwd) != x$RPM_BUILD_ROOT ] ; then
+   echo "Current directory is not $RPM_BUILD_ROOT"
+   exit 1
+fi
+popd
+ln -sf ../../..%{fontdir} fonts-%{name}
+popd
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
+umask 0133
+%if 0%{?fedora} < 8
 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
+%endif
+[ -x %{_bindir}/fc-cache ] && %{_bindir}/fc-cache %{fontdir} 2>/dev/null
+exit 0
 
 %postun
+umask 0133
+%if 0%{?fedora} < 8
 # 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
+%endif
+[ -x %{_bindir}/fc-cache ] && %{_bindir}/fc-cache %{fontdir} 2>/dev/null
+exit 0
 
 %files
 %defattr(-,root,root,-)
 %doc README* COPYRIGHT ChangeLog List.html
+
 %dir %{fontdir}
 %{fontdir}/*pcf.gz
+%verify(not md5 size mtime) %{fontdir}/fonts.scale
+%verify(not md5 size mtime) %{fontdir}/fonts.dir
 %ghost %verify(not md5 size mtime) %{fontdir}/fonts.cache-1
-%ghost %verify(not md5 size mtime) %{fontdir}/fonts.dir
+%ghost %verify(not md5 size mtime) %{fontdir}/encodings.dir
+
+%{catalogdir}/fonts-%{name}
 
 %changelog
+* Sat Aug 18 2007 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.4.2-7
+- Drop X related dependency completely, along with chkfontpath drop
+  (related to #252268, #252275)
+- Generate fonts.dir at the build time instead of the runtime
+  (following fonts-japanese)
+
 * Mon Aug 28 2006 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.4.2-6.1
 - Rebuild.
 




More information about the fedora-extras-commits mailing list