rpms/fonts-japanese/devel fonts-japanese.spec,1.27,1.28

Akira Tagoh (tagoh) fedora-extras-commits at redhat.com
Thu Aug 16 05:20:23 UTC 2007


Author: tagoh

Update of /cvs/pkgs/rpms/fonts-japanese/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv987

Modified Files:
	fonts-japanese.spec 
Log Message:
* Wed Aug 15 2007 Akira TAGOH <tagoh at redhat.com> - 0.20061016-7
- Migrate to /etc/X11/fontpath.d instead of running chkfontpath. (#251017)
- Generate fonts.dir at the build time instead of the runtime.
- Drop fc-cache dependency since it's a conditional scriptlet.


Index: fonts-japanese.spec
===================================================================
RCS file: /cvs/pkgs/rpms/fonts-japanese/devel/fonts-japanese.spec,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- fonts-japanese.spec	14 Aug 2007 03:27:47 -0000	1.27
+++ fonts-japanese.spec	16 Aug 2007 05:19:51 -0000	1.28
@@ -3,6 +3,7 @@
 %define ttfontdir       %{basefontdir}/TrueType
 %define bmpfontdir      %{basefontdir}/misc
 %define cidmapdir       %{_datadir}/ghostscript/conf.d
+%define catalogue	%{_sysconfdir}/X11/fontpath.d
 %define chxlfd          /usr/bin/perl $RPM_BUILD_DIR/%{name}-%{version}/%{vft}/chbdfxlfd.pl
 %define mkalias         /usr/bin/perl $RPM_BUILD_DIR/%{name}-%{version}/%{vft}/mkalias.pl
 %define mkbold          $RPM_BUILD_DIR/%{name}-%{version}/%{shinonome}-src/tools/mkbold
@@ -17,12 +18,13 @@
 
 Name:           fonts-japanese
 Version:        0.20061016
-Release:        6%{?dist}
+Release:        7%{?dist}
 License:        BSD and Public Domain and GPL+ and mplus
 Group:          User Interface/X
 BuildArch:      noarch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires:  gzip xorg-x11-font-utils
+BuildRequires:  gzip xorg-x11-font-utils mkfontdir
+BuildRequires:	ttmkfdir >= 3.0.6
 
 ## files in ttfonts-ja
 ### Licensed under BSD
@@ -94,10 +96,8 @@
 
 Summary:        Free Japanese Bitmap/TrueType fonts
 
-Requires(post): ttmkfdir >= 3.0.6, mkfontdir, /usr/bin/fc-cache, /usr/sbin/chkfontpath
-Requires(postun): /usr/bin/fc-cache, /usr/sbin/chkfontpath
-Provides: ttfonts-ja = 1.2-37, jisksp14 = 0.1-16, jisksp16-1990 = 0.1-16, kappa20 = 0.3-15, knm_new = 1.1-16, fonts-ja = 8.0-16
-Obsoletes: ttfonts-ja <= 1.2-37, jisksp14 <= 0.1-16, jisksp16-1990 <= 0.1-16, kappa20 <= 0.3-15, knm_new <= 1.1-16, fonts-ja <= 8.0-16
+Provides:	ttfonts-ja = 1.2-37, jisksp14 = 0.1-16, jisksp16-1990 = 0.1-16, kappa20 = 0.3-15, knm_new = 1.1-16, fonts-ja = 8.0-16
+Obsoletes:	ttfonts-ja <= 1.2-37, jisksp14 <= 0.1-16, jisksp16-1990 <= 0.1-16, kappa20 <= 0.3-15, knm_new <= 1.1-16, fonts-ja <= 8.0-16
 
 %description
 This package provides the free Japanese Bitmap/TrueType fonts.
@@ -326,43 +326,36 @@
 install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{cidmapdir}/
 install -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{cidmapdir}/
 
+# Create fonts.scale and fonts.dir
+/usr/bin/ttmkfdir -d $RPM_BUILD_ROOT%{ttfontdir} -o $RPM_BUILD_ROOT%{ttfontdir}/fonts.scale
+/usr/bin/mkfontdir $RPM_BUILD_ROOT%{ttfontdir}
+/usr/bin/mkfontdir $RPM_BUILD_ROOT%{bmpfontdir}
 # for dummy
 touch $RPM_BUILD_ROOT%{basefontdir}/fonts.cache-1
-touch $RPM_BUILD_ROOT%{ttfontdir}/fonts.dir
-touch $RPM_BUILD_ROOT%{ttfontdir}/fonts.scale
 touch $RPM_BUILD_ROOT%{ttfontdir}/fonts.cache-1
-touch $RPM_BUILD_ROOT%{bmpfontdir}/fonts.dir
-touch $RPM_BUILD_ROOT%{bmpfontdir}/encodings.dir
 touch $RPM_BUILD_ROOT%{bmpfontdir}/fonts.cache-1
+touch $RPM_BUILD_ROOT%{bmpfontdir}/encodings.dir
 
 install -m 0644 fonts-ja/fonts.alias $RPM_BUILD_ROOT%{bmpfontdir}/
 
+# Install catalogue symlink
+install -d $RPM_BUILD_ROOT%{catalogue}
+ln -sf %{ttfontdir} $RPM_BUILD_ROOT%{catalogue}/fonts-japanese-ttf
+ln -sf %{bmpfontdir} $RPM_BUILD_ROOT%{catalogue}/fonts-japanese-bitmap
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
 {
     umask 133
-    touch %{ttfontdir} 2> /dev/null && {
-        /usr/bin/ttmkfdir -d %{ttfontdir} -o %{ttfontdir}/fonts.scale
-        mkfontdir %{ttfontdir}
-        /usr/sbin/chkfontpath -q -a %{ttfontdir}
-    }
-    mkfontdir %{bmpfontdir} && /usr/sbin/chkfontpath -q -a %{bmpfontdir}
-    if [ -x /usr/bin/fc-cache ]; then
-        /usr/bin/fc-cache /usr/share/fonts
-    fi
+    [ -x %{_bindir}/fc-cache ] && %{_bindir}/fc-cache %{_datadir}/fonts
 }
 
 %postun
 {
-    if [ "$1" = "0" ]; then
-        /usr/sbin/chkfontpath -q -r %{ttfontdir}
-        /usr/sbin/chkfontpath -q -r %{bmpfontdir}
-        if [ -x /usr/bin/fc-cache ]; then
-            /usr/bin/fc-cache /usr/share/fonts
-        fi
-    fi
+    umask 133
+    [ "$1" = "0" -a -x %{_bindir}/fc-cache ] && %{_bindir}/fc-cache %{_datadir}/fonts
 }
 
 %files
@@ -375,21 +368,27 @@
 %dir %{bmpfontdir}
 %dir %{cidmapdir}
 %verify(not md5 size mtime) %{ttfontdir}/fonts.alias
+%verify(not md5 size mtime) %{ttfontdir}/fonts.dir
+%verify(not md5 size mtime) %{ttfontdir}/fonts.scale
 %verify(not md5 size mtime) %{bmpfontdir}/fonts.alias
+%verify(not md5 size mtime) %{bmpfontdir}/fonts.dir
 %ghost %verify(not md5 size mtime) %{basefontdir}/fonts.cache-1
 %ghost %verify(not md5 size mtime) %{ttfontdir}/fonts.cache-1
-%ghost %verify(not md5 size mtime) %{ttfontdir}/fonts.dir
-%ghost %verify(not md5 size mtime) %{ttfontdir}/fonts.scale
 %ghost %verify(not md5 size mtime) %{bmpfontdir}/fonts.cache-1
-%ghost %verify(not md5 size mtime) %{bmpfontdir}/fonts.dir
 %ghost %verify(not md5 size mtime) %{bmpfontdir}/encodings.dir
 %{ttfontdir}/*ttf
 %{bmpfontdir}/*gz
 %{cidmapdir}/FAPIcidfmap.ja
 %{cidmapdir}/cidfmap.ja
 %{cidmapdir}/CIDFnmap.ja
+%{catalogue}
 
 %changelog
+* Wed Aug 15 2007 Akira TAGOH <tagoh at redhat.com> - 0.20061016-7
+- Migrate to /etc/X11/fontpath.d instead of running chkfontpath. (#251017)
+- Generate fonts.dir at the build time instead of the runtime.
+- Drop fc-cache dependency since it's a conditional scriptlet.
+
 * Tue Aug 14 2007 Akira TAGOH <tagoh at redhat.com>
 - Update License tag.
 




More information about the fedora-extras-commits mailing list