rpms/ghostscript-fonts/devel ghostscript-fonts.spec,1.10,1.11

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Dec 15 13:44:54 UTC 2006


Author: twaugh

Update of /cvs/dist/rpms/ghostscript-fonts/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv26835

Modified Files:
	ghostscript-fonts.spec 
Log Message:
* Fri Dec 15 2006 Tim Waugh <twaugh at redhat.com>
- Copied post/postun scriptlets from urw-fonts (bug #203369).
- Resolves: rhbz#203369



Index: ghostscript-fonts.spec
===================================================================
RCS file: /cvs/dist/rpms/ghostscript-fonts/devel/ghostscript-fonts.spec,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ghostscript-fonts.spec	12 Jul 2006 05:55:11 -0000	1.10
+++ ghostscript-fonts.spec	15 Dec 2006 13:44:51 -0000	1.11
@@ -10,6 +10,8 @@
 Requires: ghostscript
 BuildArchitectures: noarch
 
+%define fontdir %{_datadir}/fonts/default/ghostscript
+
 %description
 Ghostscript-fonts contains a set of fonts that Ghostscript, a
 PostScript interpreter, uses to render text. These fonts are in
@@ -23,10 +25,25 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT/usr/share/fonts/default/ghostscript
-cp fonts/* $RPM_BUILD_ROOT/usr/share/fonts/default/ghostscript
+mkdir -p $RPM_BUILD_ROOT%{fontdir}
+cp fonts/* $RPM_BUILD_ROOT%{fontdir}
 
-%post -p /usr/bin/fc-cache
+%post
+{
+   umask 133
+   mkfontscale %{fontdir}
+   `which mkfontdir` %{fontdir}
+   /usr/sbin/chkfontpath -q -a %{fontdir}
+   fc-cache %{_datadir}/fonts
+} &> /dev/null || :
+
+%postun
+{
+   if [ "$1" = "0" ]; then
+      fc-cache %{_datadir}/fonts
+      /usr/sbin/chkfontpath -q -r %{fontdir} || :
+   fi
+} &> /dev/null || :
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -36,6 +53,9 @@
 /usr/share/fonts/default
 
 %changelog
+* Fri Dec 15 2006 Tim Waugh <twaugh at redhat.com>
+- Copied post/postun scriptlets from urw-fonts (bug #203369).
+
 * Wed Jul 12 2006 Jesse Keating <jkeating at redhat.com> - 5.50-13.1.1
 - rebuild
 




More information about the fedora-cvs-commits mailing list