From e29b690010bc445677bf382dbe8045c2045e9881 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 3 Mar 2010 17:42:54 +0000 Subject: [PATCH] - Fixed summary. - Fixed macros in changelog. - Avoid mixed spaces and tabs. - Ship COPYING file. - Added comments for all patches. - More consistent macro use. --- ghostscript.spec | 100 ++++++++++++++++++++++++++--------------------- 1 file changed, 55 insertions(+), 45 deletions(-) diff --git a/ghostscript.spec b/ghostscript.spec index f2ab9fb..b38614f 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -1,7 +1,7 @@ %define gs_ver 8.71 %define gs_dot_ver 8.71 %{expand: %%define build_with_freetype %{?_with_freetype:1}%{!?_with_freetype:0}} -Summary: A PostScript interpreter and renderer. +Summary: A PostScript interpreter and renderer Name: ghostscript Version: %{gs_ver} @@ -121,6 +121,7 @@ rm -rf libpng zlib jpeg jasper # Define .runlibfileifexists. %patch5 -p1 +# Use the system jasper library. %patch6 -p1 -b .system-jasper # Fix pksmraw output (bug #308211). Still needed in 8.63. @@ -155,8 +156,8 @@ rm -rf libpng zlib jpeg jasper # Convert manual pages to UTF-8 from8859_1() { - iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_" - mv "${1}_" "$1" + iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_" + mv "${1}_" "$1" } for i in man/de/*.1; do from8859_1 "$i"; done @@ -174,20 +175,20 @@ EXTRACFLAGS="-fno-strict-aliasing" FONTPATH= for path in \ - %{_datadir}/fonts/default/%{name} \ - %{_datadir}/fonts/default/Type1 \ - %{_datadir}/fonts/default/amspsfnt/pfb \ - %{_datadir}/fonts/default/cmpsfont/pfb \ - %{_datadir}/fonts \ - %{_datadir}/%{name}/conf.d \ - %{_sysconfdir}/%{name} \ - %{_sysconfdir}/%{name}/%{gs_dot_ver} + %{_datadir}/fonts/default/%{name} \ + %{_datadir}/fonts/default/Type1 \ + %{_datadir}/fonts/default/amspsfnt/pfb \ + %{_datadir}/fonts/default/cmpsfont/pfb \ + %{_datadir}/fonts \ + %{_datadir}/%{name}/conf.d \ + %{_sysconfdir}/%{name} \ + %{_sysconfdir}/%{name}/%{gs_dot_ver} do FONTPATH="$FONTPATH${FONTPATH:+:}$path" done %configure --with-ijs --enable-dynamic --with-fontpath="$FONTPATH" \ - --with-drivers=ALL --disable-compile-inits --with-system-libtiff \ - CFLAGS="$CFLAGS $EXTRACFLAGS" + --with-drivers=ALL --disable-compile-inits --with-system-libtiff \ + CFLAGS="$CFLAGS $EXTRACFLAGS" # Build IJS cd ijs @@ -199,9 +200,9 @@ cd .. %if %{build_with_freetype} FT_CFLAGS=$(pkg-config --cflags freetype2) make so RPM_OPT_FLAGS="$RPM_OPT_FLAGS $EXTRAFLAGS" prefix=%{_prefix} \ - FT_BRIDGE=1 FT_CFLAGS="$FT_CFLAGS" FT_LIB=freetype + FT_BRIDGE=1 FT_CFLAGS="$FT_CFLAGS" FT_LIB=freetype make RPM_OPT_FLAGS="$RPM_OPT_FLAGS $EXTRAFLAGS" prefix=%{_prefix} \ - FT_BRIDGE=1 FT_CFLAGS="$FT_CFLAGS" FT_LIB=freetype + FT_BRIDGE=1 FT_CFLAGS="$FT_CFLAGS" FT_LIB=freetype %else make so RPM_OPT_FLAGS="$RPM_OPT_FLAGS $EXTRAFLAGS" prefix=%{_prefix} make RPM_OPT_FLAGS="$RPM_OPT_FLAGS $EXTRAFLAGS" prefix=%{_prefix} @@ -216,19 +217,19 @@ mkdir -p $RPM_BUILD_ROOT/{%{_libdir},%{_includedir}/ijs} make install soinstall \ %{?_with_freetype:FT_BRIDGE=1} \ - prefix=$RPM_BUILD_ROOT%{_prefix} \ - mandir=$RPM_BUILD_ROOT%{_mandir} \ - datadir=$RPM_BUILD_ROOT%{_datadir} \ - gsincludedir=$RPM_BUILD_ROOT%{_includedir}/ghostscript/ \ - bindir=$RPM_BUILD_ROOT%{_bindir} \ - libdir=$RPM_BUILD_ROOT%{_libdir} \ - docdir=$RPM_BUILD_ROOT%{_docdir}/%{name}-%{gs_dot_ver} \ - gsdir=$RPM_BUILD_ROOT%{_datadir}/%{name} \ - gsdatadir=$RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_dot_ver} \ - gssharedir=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{gs_dot_ver} \ - CUPSSERVERROOT=$RPM_BUILD_ROOT`cups-config --serverroot` \ - CUPSSERVERBIN=$RPM_BUILD_ROOT`cups-config --serverbin` \ - CUPSDATA=$RPM_BUILD_ROOT`cups-config --datadir` + prefix=$RPM_BUILD_ROOT%{_prefix} \ + mandir=$RPM_BUILD_ROOT%{_mandir} \ + datadir=$RPM_BUILD_ROOT%{_datadir} \ + gsincludedir=$RPM_BUILD_ROOT%{_includedir}/ghostscript/ \ + bindir=$RPM_BUILD_ROOT%{_bindir} \ + libdir=$RPM_BUILD_ROOT%{_libdir} \ + docdir=$RPM_BUILD_ROOT%{_docdir}/%{name}-%{gs_dot_ver} \ + gsdir=$RPM_BUILD_ROOT%{_datadir}/%{name} \ + gsdatadir=$RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_dot_ver} \ + gssharedir=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{gs_dot_ver} \ + CUPSSERVERROOT=$RPM_BUILD_ROOT`cups-config --serverroot` \ + CUPSSERVERBIN=$RPM_BUILD_ROOT`cups-config --serverbin` \ + CUPSDATA=$RPM_BUILD_ROOT`cups-config --datadir` mv -f $RPM_BUILD_ROOT%{_bindir}/gsc $RPM_BUILD_ROOT%{_bindir}/gs @@ -237,7 +238,7 @@ cd ijs cd .. echo ".so man1/gs.1" > $RPM_BUILD_ROOT/%{_mandir}/man1/ghostscript.1 -ln -sf gs $RPM_BUILD_ROOT/usr/bin/ghostscript +ln -sf gs $RPM_BUILD_ROOT%{_bindir}/ghostscript # Rename an original cidfmap to cidfmap.GS mv $RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_dot_ver}/Resource/Init/cidfmap{,.GS} @@ -252,7 +253,7 @@ install -m0644 base/errors.h $RPM_BUILD_ROOT%{_includedir}/ghostscript # Don't ship pkgconfig or libtool la files. rm -f $RPM_BUILD_ROOT%{_libdir}/pkgconfig/ijs.pc \ - $RPM_BUILD_ROOT%{_libdir}/libijs.la + $RPM_BUILD_ROOT%{_libdir}/libijs.la # Don't ship ijs example client or server rm -f $RPM_BUILD_ROOT%{_bindir}/ijs_{client,server}_example @@ -261,10 +262,10 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/ijs_{client,server}_example rm -rf $RPM_BUILD_ROOT%{_datadir}/ghostscript/%{gs_dot_ver}/Resource/Font mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/conf.d -mkdir -p $RPM_BUILD_ROOT/etc/ghostscript/%{gs_dot_ver} -touch $RPM_BUILD_ROOT/etc/ghostscript/%{gs_dot_ver}/Fontmap.local -touch $RPM_BUILD_ROOT/etc/ghostscript/%{gs_dot_ver}/cidfmap.local -touch $RPM_BUILD_ROOT/etc/ghostscript/%{gs_dot_ver}/CIDFnmap.local +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ghostscript/%{gs_dot_ver} +touch $RPM_BUILD_ROOT%{_sysconfdir}/ghostscript/%{gs_dot_ver}/Fontmap.local +touch $RPM_BUILD_ROOT%{_sysconfdir}/ghostscript/%{gs_dot_ver}/cidfmap.local +touch $RPM_BUILD_ROOT%{_sysconfdir}/ghostscript/%{gs_dot_ver}/CIDFnmap.local # The man/de/man1 symlinks are broken (bug #66238). find $RPM_BUILD_ROOT%{_mandir}/de/man1 -type l | xargs rm -f @@ -273,11 +274,11 @@ find $RPM_BUILD_ROOT%{_mandir}/de/man1 -type l | xargs rm -f rm -f $RPM_BUILD_ROOT%{_bindir}/fixmswrd.pl MAIN_PWD=`pwd` -(cd $RPM_BUILD_ROOT; find ./usr/share/ghostscript/%{gs_dot_ver}/Resource -type f | \ - sed -e 's/\.//;' | grep -v Fontmap | grep -v gs_init.ps > $MAIN_PWD/rpm.sharelist +(cd $RPM_BUILD_ROOT; find .%{_datadir}/ghostscript/%{gs_dot_ver}/Resource -type f | \ + sed -e 's/\.//;' | grep -v Fontmap | grep -v gs_init.ps > $MAIN_PWD/rpm.sharelist find .%{_bindir}/ | sed -e 's/\.//;' | \ - grep -v '/$\|/hpijs$\|/gsx$\|/ijs-config$' \ - >> $MAIN_PWD/rpm.sharelist) + grep -v '/$\|/hpijs$\|/gsx$\|/ijs-config$' \ + >> $MAIN_PWD/rpm.sharelist) %clean rm -rf $RPM_BUILD_ROOT @@ -288,8 +289,9 @@ rm -rf $RPM_BUILD_ROOT %files -f rpm.sharelist %defattr(-,root,root) -%dir /etc/ghostscript -%dir /etc/ghostscript/%{gs_dot_ver} +%doc doc/COPYING +%dir %{_sysconfdir}/ghostscript +%dir %{_sysconfdir}/ghostscript/%{gs_dot_ver} %dir %{_datadir}/ghostscript %dir %{_datadir}/ghostscript/conf.d %dir %{_datadir}/ghostscript/%{gs_dot_ver} @@ -304,7 +306,7 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libijs-*.so* %dir %{_libdir}/%{name} %{_libdir}/%{name}/%{gs_dot_ver} -%config(noreplace) /etc/ghostscript/%{gs_dot_ver}/* +%config(noreplace) %{_sysconfdir}/ghostscript/%{gs_dot_ver}/* %files doc %defattr(-,root,root) @@ -334,6 +336,14 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libgs.so %changelog +* Wed Mar 3 2010 Tim Waugh 8.71-6 +- Fixed summary. +- Fixed macros in changelog. +- Avoid mixed spaces and tabs. +- Ship COPYING file. +- Added comments for all patches. +- More consistent macro use. + * Mon Feb 22 2010 Tim Waugh 8.71-5 - The doc subpackage is now noarch (bug #567179). @@ -987,7 +997,7 @@ rm -rf $RPM_BUILD_ROOT - Fix gimp-print-4.2.0 so that it builds without cups-config. * Sat Feb 2 2002 Bill Nottingham 6.52-4 -- do condrestart in %postun, not %post +- do condrestart in %%postun, not %%post * Fri Feb 1 2002 Bernhard Rosenkraenzer 6.52-3 - Restart service cups after installing gimp-print-cups @@ -1089,9 +1099,9 @@ rm -rf $RPM_BUILD_ROOT * Thu Feb 8 2001 Crutcher Dunnavant - merged in some patches that got away: -- * Fri Sep 1 2000 Mitsuo Hamada - - add support JIS B size - - fix the problem of reconverting GNUPLOT output + * Fri Sep 1 2000 Mitsuo Hamada + - add support JIS B size + - fix the problem of reconverting GNUPLOT output * Thu Feb 8 2001 Crutcher Dunnavant - switched to japanese for everybody