- Fixed summary.

- Fixed macros in changelog.
- Avoid mixed spaces and tabs.
- Ship COPYING file.
- Added comments for all patches.
- More consistent macro use.
This commit is contained in:
Tim Waugh 2010-03-03 17:42:54 +00:00
parent 1a559dafda
commit e29b690010

View File

@ -1,7 +1,7 @@
%define gs_ver 8.71 %define gs_ver 8.71
%define gs_dot_ver 8.71 %define gs_dot_ver 8.71
%{expand: %%define build_with_freetype %{?_with_freetype:1}%{!?_with_freetype:0}} %{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 Name: ghostscript
Version: %{gs_ver} Version: %{gs_ver}
@ -121,6 +121,7 @@ rm -rf libpng zlib jpeg jasper
# Define .runlibfileifexists. # Define .runlibfileifexists.
%patch5 -p1 %patch5 -p1
# Use the system jasper library.
%patch6 -p1 -b .system-jasper %patch6 -p1 -b .system-jasper
# Fix pksmraw output (bug #308211). Still needed in 8.63. # 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 # Convert manual pages to UTF-8
from8859_1() { from8859_1() {
iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_" iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_"
mv "${1}_" "$1" mv "${1}_" "$1"
} }
for i in man/de/*.1; do from8859_1 "$i"; done for i in man/de/*.1; do from8859_1 "$i"; done
@ -174,20 +175,20 @@ EXTRACFLAGS="-fno-strict-aliasing"
FONTPATH= FONTPATH=
for path in \ for path in \
%{_datadir}/fonts/default/%{name} \ %{_datadir}/fonts/default/%{name} \
%{_datadir}/fonts/default/Type1 \ %{_datadir}/fonts/default/Type1 \
%{_datadir}/fonts/default/amspsfnt/pfb \ %{_datadir}/fonts/default/amspsfnt/pfb \
%{_datadir}/fonts/default/cmpsfont/pfb \ %{_datadir}/fonts/default/cmpsfont/pfb \
%{_datadir}/fonts \ %{_datadir}/fonts \
%{_datadir}/%{name}/conf.d \ %{_datadir}/%{name}/conf.d \
%{_sysconfdir}/%{name} \ %{_sysconfdir}/%{name} \
%{_sysconfdir}/%{name}/%{gs_dot_ver} %{_sysconfdir}/%{name}/%{gs_dot_ver}
do do
FONTPATH="$FONTPATH${FONTPATH:+:}$path" FONTPATH="$FONTPATH${FONTPATH:+:}$path"
done done
%configure --with-ijs --enable-dynamic --with-fontpath="$FONTPATH" \ %configure --with-ijs --enable-dynamic --with-fontpath="$FONTPATH" \
--with-drivers=ALL --disable-compile-inits --with-system-libtiff \ --with-drivers=ALL --disable-compile-inits --with-system-libtiff \
CFLAGS="$CFLAGS $EXTRACFLAGS" CFLAGS="$CFLAGS $EXTRACFLAGS"
# Build IJS # Build IJS
cd ijs cd ijs
@ -199,9 +200,9 @@ cd ..
%if %{build_with_freetype} %if %{build_with_freetype}
FT_CFLAGS=$(pkg-config --cflags freetype2) FT_CFLAGS=$(pkg-config --cflags freetype2)
make so RPM_OPT_FLAGS="$RPM_OPT_FLAGS $EXTRAFLAGS" prefix=%{_prefix} \ 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} \ 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 %else
make so RPM_OPT_FLAGS="$RPM_OPT_FLAGS $EXTRAFLAGS" prefix=%{_prefix} make so RPM_OPT_FLAGS="$RPM_OPT_FLAGS $EXTRAFLAGS" prefix=%{_prefix}
make 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 \ make install soinstall \
%{?_with_freetype:FT_BRIDGE=1} \ %{?_with_freetype:FT_BRIDGE=1} \
prefix=$RPM_BUILD_ROOT%{_prefix} \ prefix=$RPM_BUILD_ROOT%{_prefix} \
mandir=$RPM_BUILD_ROOT%{_mandir} \ mandir=$RPM_BUILD_ROOT%{_mandir} \
datadir=$RPM_BUILD_ROOT%{_datadir} \ datadir=$RPM_BUILD_ROOT%{_datadir} \
gsincludedir=$RPM_BUILD_ROOT%{_includedir}/ghostscript/ \ gsincludedir=$RPM_BUILD_ROOT%{_includedir}/ghostscript/ \
bindir=$RPM_BUILD_ROOT%{_bindir} \ bindir=$RPM_BUILD_ROOT%{_bindir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \ libdir=$RPM_BUILD_ROOT%{_libdir} \
docdir=$RPM_BUILD_ROOT%{_docdir}/%{name}-%{gs_dot_ver} \ docdir=$RPM_BUILD_ROOT%{_docdir}/%{name}-%{gs_dot_ver} \
gsdir=$RPM_BUILD_ROOT%{_datadir}/%{name} \ gsdir=$RPM_BUILD_ROOT%{_datadir}/%{name} \
gsdatadir=$RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_dot_ver} \ gsdatadir=$RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_dot_ver} \
gssharedir=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{gs_dot_ver} \ gssharedir=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{gs_dot_ver} \
CUPSSERVERROOT=$RPM_BUILD_ROOT`cups-config --serverroot` \ CUPSSERVERROOT=$RPM_BUILD_ROOT`cups-config --serverroot` \
CUPSSERVERBIN=$RPM_BUILD_ROOT`cups-config --serverbin` \ CUPSSERVERBIN=$RPM_BUILD_ROOT`cups-config --serverbin` \
CUPSDATA=$RPM_BUILD_ROOT`cups-config --datadir` CUPSDATA=$RPM_BUILD_ROOT`cups-config --datadir`
mv -f $RPM_BUILD_ROOT%{_bindir}/gsc $RPM_BUILD_ROOT%{_bindir}/gs mv -f $RPM_BUILD_ROOT%{_bindir}/gsc $RPM_BUILD_ROOT%{_bindir}/gs
@ -237,7 +238,7 @@ cd ijs
cd .. cd ..
echo ".so man1/gs.1" > $RPM_BUILD_ROOT/%{_mandir}/man1/ghostscript.1 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 # Rename an original cidfmap to cidfmap.GS
mv $RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_dot_ver}/Resource/Init/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. # Don't ship pkgconfig or libtool la files.
rm -f $RPM_BUILD_ROOT%{_libdir}/pkgconfig/ijs.pc \ 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 # Don't ship ijs example client or server
rm -f $RPM_BUILD_ROOT%{_bindir}/ijs_{client,server}_example 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 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%{_datadir}/%{name}/conf.d
mkdir -p $RPM_BUILD_ROOT/etc/ghostscript/%{gs_dot_ver} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ghostscript/%{gs_dot_ver}
touch $RPM_BUILD_ROOT/etc/ghostscript/%{gs_dot_ver}/Fontmap.local touch $RPM_BUILD_ROOT%{_sysconfdir}/ghostscript/%{gs_dot_ver}/Fontmap.local
touch $RPM_BUILD_ROOT/etc/ghostscript/%{gs_dot_ver}/cidfmap.local touch $RPM_BUILD_ROOT%{_sysconfdir}/ghostscript/%{gs_dot_ver}/cidfmap.local
touch $RPM_BUILD_ROOT/etc/ghostscript/%{gs_dot_ver}/CIDFnmap.local touch $RPM_BUILD_ROOT%{_sysconfdir}/ghostscript/%{gs_dot_ver}/CIDFnmap.local
# The man/de/man1 symlinks are broken (bug #66238). # The man/de/man1 symlinks are broken (bug #66238).
find $RPM_BUILD_ROOT%{_mandir}/de/man1 -type l | xargs rm -f 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 rm -f $RPM_BUILD_ROOT%{_bindir}/fixmswrd.pl
MAIN_PWD=`pwd` MAIN_PWD=`pwd`
(cd $RPM_BUILD_ROOT; find ./usr/share/ghostscript/%{gs_dot_ver}/Resource -type f | \ (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 sed -e 's/\.//;' | grep -v Fontmap | grep -v gs_init.ps > $MAIN_PWD/rpm.sharelist
find .%{_bindir}/ | sed -e 's/\.//;' | \ find .%{_bindir}/ | sed -e 's/\.//;' | \
grep -v '/$\|/hpijs$\|/gsx$\|/ijs-config$' \ grep -v '/$\|/hpijs$\|/gsx$\|/ijs-config$' \
>> $MAIN_PWD/rpm.sharelist) >> $MAIN_PWD/rpm.sharelist)
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
@ -288,8 +289,9 @@ rm -rf $RPM_BUILD_ROOT
%files -f rpm.sharelist %files -f rpm.sharelist
%defattr(-,root,root) %defattr(-,root,root)
%dir /etc/ghostscript %doc doc/COPYING
%dir /etc/ghostscript/%{gs_dot_ver} %dir %{_sysconfdir}/ghostscript
%dir %{_sysconfdir}/ghostscript/%{gs_dot_ver}
%dir %{_datadir}/ghostscript %dir %{_datadir}/ghostscript
%dir %{_datadir}/ghostscript/conf.d %dir %{_datadir}/ghostscript/conf.d
%dir %{_datadir}/ghostscript/%{gs_dot_ver} %dir %{_datadir}/ghostscript/%{gs_dot_ver}
@ -304,7 +306,7 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libijs-*.so* %{_libdir}/libijs-*.so*
%dir %{_libdir}/%{name} %dir %{_libdir}/%{name}
%{_libdir}/%{name}/%{gs_dot_ver} %{_libdir}/%{name}/%{gs_dot_ver}
%config(noreplace) /etc/ghostscript/%{gs_dot_ver}/* %config(noreplace) %{_sysconfdir}/ghostscript/%{gs_dot_ver}/*
%files doc %files doc
%defattr(-,root,root) %defattr(-,root,root)
@ -334,6 +336,14 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libgs.so %{_libdir}/libgs.so
%changelog %changelog
* Wed Mar 3 2010 Tim Waugh <twaugh@redhat.com> 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 <twaugh@redhat.com> 8.71-5 * Mon Feb 22 2010 Tim Waugh <twaugh@redhat.com> 8.71-5
- The doc subpackage is now noarch (bug #567179). - 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. - Fix gimp-print-4.2.0 so that it builds without cups-config.
* Sat Feb 2 2002 Bill Nottingham <notting@redhat.com> 6.52-4 * Sat Feb 2 2002 Bill Nottingham <notting@redhat.com> 6.52-4
- do condrestart in %postun, not %post - do condrestart in %%postun, not %%post
* Fri Feb 1 2002 Bernhard Rosenkraenzer <bero@redhat.com> 6.52-3 * Fri Feb 1 2002 Bernhard Rosenkraenzer <bero@redhat.com> 6.52-3
- Restart service cups after installing gimp-print-cups - Restart service cups after installing gimp-print-cups
@ -1089,9 +1099,9 @@ rm -rf $RPM_BUILD_ROOT
* Thu Feb 8 2001 Crutcher Dunnavant <crutcher@redhat.com> * Thu Feb 8 2001 Crutcher Dunnavant <crutcher@redhat.com>
- merged in some patches that got away: - merged in some patches that got away:
- * Fri Sep 1 2000 Mitsuo Hamada <mhamada@redhat.com> * Fri Sep 1 2000 Mitsuo Hamada <mhamada@redhat.com>
- add support JIS B size - add support JIS B size
- fix the problem of reconverting GNUPLOT output - fix the problem of reconverting GNUPLOT output
* Thu Feb 8 2001 Crutcher Dunnavant <crutcher@redhat.com> * Thu Feb 8 2001 Crutcher Dunnavant <crutcher@redhat.com>
- switched to japanese for everybody - switched to japanese for everybody