rpms/fonts-chinese/devel fonts-chinese.spec,1.37,1.38

Caius Chance (cchance) fedora-extras-commits at redhat.com
Fri Aug 3 01:41:37 UTC 2007


Author: cchance

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

Modified Files:
	fonts-chinese.spec 
Log Message:
* Fri Aug 03 2007 Caius Chance <cchance at redhat.com> - 3.03-5.2.fc8
- Updates font postinstallation updation procedure (fc-cache):
  http://fedoraproject.org/wiki/Packaging/ScriptletSnippets#head-4863fc4c93cec14292719d8901d83f5d90c3e477
- Refactorizes .spec file.



Index: fonts-chinese.spec
===================================================================
RCS file: /cvs/pkgs/rpms/fonts-chinese/devel/fonts-chinese.spec,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- fonts-chinese.spec	31 Jul 2007 03:17:34 -0000	1.37
+++ fonts-chinese.spec	3 Aug 2007 01:41:05 -0000	1.38
@@ -1,6 +1,6 @@
-%define	basefontdir    %{_datadir}/fonts/chinese
-%define	ttfontdir      %{basefontdir}/TrueType
-%define	miscfontdir    %{basefontdir}/misc
+%define basefontdir    %{_datadir}/fonts/chinese
+%define ttfontdir      %{basefontdir}/TrueType
+%define miscfontdir    %{basefontdir}/misc
 %define cidmapdir      %{_sysconfdir}/ghostscript
 
 %define ver 0.1
@@ -10,7 +10,7 @@
 Summary:      Chinese TrueType Font -- Simplified and Traditional Chinese Ming and Kai Face.
 Name:         fonts-chinese
 Version:      3.03
-Release:      5.1%{?dist}
+Release:      5.2%{?dist}
 License:      Arphic Public License (GPL-like)
 Group:        User Interface/X
 BuildArch:    noarch
@@ -97,22 +97,25 @@
 
 %post
 {
-	umask 133
+    umask 133
+
+    for tmpfontdir in %{ttfontdir} %{miscfontdir}
+    do
+        touch $tmpfontdir 2> /dev/null && {
+            %{_bindir}/ttmkfdir -d $tmpfontdir -o $tmpfontdir/fonts.scale
+            mkfontdir $tmpfontdir
+            %{_sbindir}/chkfontpath -q -a $tmpfontdir
+        }
+    done
 
-	for tmpfontdir in %{ttfontdir} %{miscfontdir}
-	do
-		touch $tmpfontdir 2> /dev/null && {
-			%{_bindir}/ttmkfdir -d $tmpfontdir -o $tmpfontdir/fonts.scale
-	    		mkfontdir $tmpfontdir
-			%{_sbindir}/chkfontpath -q -a $tmpfontdir
-		}
-	done
-	#Update fontconfig cache
-	[  -x %{_bindir}/fc-cache ] && %{_bindir}/fc-cache 2> /dev/null
-
-        # make symlinks for java referring to old path and fonts
-        ln -sf ../../chinese/TrueType/uming.ttf %{_datadir}/fonts/zh_CN/TrueType/zysong.ttf || :
-        ln -sf ../../chinese/TrueType/uming.ttf %{_datadir}/fonts/zh_TW/TrueType/bsmi00lp.ttf || :
+    #Update fontconfig cache
+    if [ -x %{_bindir}/fc-cache ]; then
+        %{_bindir}/fc-cache %{_datadir}/fonts
+    fi
+
+    # make symlinks for java referring to old path and fonts
+    ln -sf ../../chinese/TrueType/uming.ttf %{_datadir}/fonts/zh_CN/TrueType/zysong.ttf || :
+    ln -sf ../../chinese/TrueType/uming.ttf %{_datadir}/fonts/zh_TW/TrueType/bsmi00lp.ttf || :
 
 }
 
@@ -124,7 +127,9 @@
     %{_sbindir}/chkfontpath -q -r %{miscfontdir}
 
     #Update fontconfig cache
-    [ -x %{_bindir}/fc-cache ] && %{_bindir}/fc-cache 2> /dev/null
+    if [ -x %{_bindir}/fc-cache ]; then
+        %{_bindir}/fc-cache %{_datadir}/fonts
+    fi
 fi
 
 %files
@@ -159,6 +164,11 @@
 
 
 %changelog
+* Fri Aug 03 2007 Caius Chance <cchance at redhat.com> - 3.03-5.2.fc8
+- Updates font postinstallation updation procedure (fc-cache):
+  http://fedoraproject.org/wiki/Packaging/ScriptletSnippets#head-4863fc4c93cec14292719d8901d83f5d90c3e477
+- Refactorizes .spec file.
+
 * Thu Jul 26 2007 Caius Chance <cchance at redhat.com> - 3.03-5.1.fc8
 - Resolves: rhbz#249644 fc-cache is not always caching newly installed fonts 
             in fonts-chinese.




More information about the fedora-extras-commits mailing list