Accepting request 581052 from home:StefanBruens:branches:Printing

- Use -p /sbin/ldconfig instead of shell post(un) scriptlet, drop
  explicit Prereq for ldconfig
- Use shared libgs library for gs binary instead of static linked
  version
- Use --disable-compile-inits, to allow unbundling of Resource files
- Remove --disable-omni switch, has been removed in GS 9.20
- Keep patch ordering in full/mini consistent
- Remove patch backup files to avoid packaging

OBS-URL: https://build.opensuse.org/request/show/581052
OBS-URL: https://build.opensuse.org/package/show/Printing/ghostscript?expand=0&rev=86
This commit is contained in:
Johannes Meixner 2018-03-12 10:33:44 +00:00 committed by Git OBS Bridge
parent 3fe572792f
commit 9ce317b75a
4 changed files with 60 additions and 40 deletions

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Wed Feb 28 00:14:31 UTC 2018 - stefan.bruens@rwth-aachen.de
- Use -p /sbin/ldconfig instead of shell post(un) scriptlet, drop
explicit Prereq for ldconfig
- Use shared libgs library for gs binary instead of static linked
version
- Use --disable-compile-inits, to allow unbundling of Resource files
- Remove --disable-omni switch, has been removed in GS 9.20
- Keep patch ordering in full/mini consistent
- Remove patch backup files to avoid packaging
-------------------------------------------------------------------
Tue Feb 27 14:55:51 CET 2018 - novell@mirell.de

View File

@ -95,8 +95,6 @@ Conflicts: ghostscript-library
# so that a RPM requirement is needed to make sure that Ghostscript has its fonts:
Requires: ghostscript-fonts-other
Requires: ghostscript-fonts-std
# Prerequire /sbin/ldconfig which is used in the traditional bash scriptlets for post/postun:
PreReq: /sbin/ldconfig
# Install into this non-root directory (required when norootforbuild is used):
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -160,6 +158,7 @@ This package contains the development files for Minimal Ghostscript.
# in makefiles as we do not use the zlib sources from the Ghostscript upstream tarball:
#patch100 -p1 -b remove-zlib-h-dependency.orig
%patch101 -p1
rm -f Resource/Init/*.ps.orig
# Do not use the freetype jpeg libpng tiff zlib sources from the Ghostscript upstream tarball
# because we prefer to use for long-established standard libraries the ones from SUSE
# in particular to automatically get SUSE security updates for standard libraries.
@ -183,7 +182,6 @@ autoreconf -fi
# --with-drivers=FILES to have only the file format drivers
# but no printer drivers in the minimal Ghostscript.
# --without-x to not use the X Window System.
# --without-omni to disable the outdated and unmaintained omni driver.
# --enable-openjpeg because since Ghostscript 9.05 JasPer is deprecated
# (--without-jasper is now an unrecognized option by configure)
# and Ghostscript now ships modified OpenJPEG sources for JPEG2000 decoding
@ -192,6 +190,9 @@ autoreconf -fi
# see also http://bugs.ghostscript.com/show_bug.cgi?id=691430
# --without-ufst and --without-luratech because those are relevant to commercial releases only
# which would require a commercial license.
# --disable-compile-inits to disable compiling of resources (Fonts, init postscript files, ...)
# into the library, which is the upstream recommendation for distributions. This also allows
# unbundling the 35 Postscript Standard fonts, provided by the URW font package
# --without-libpaper disables libpaper support because SUSE does not have libpaper.
%define gs_font_path /usr/share/fonts/truetype:/usr/share/fonts/Type1:/usr/share/fonts/CID:/usr/share/fonts/URW
# See http://bugs.ghostscript.com/show_bug.cgi?id=693100
@ -208,6 +209,7 @@ export SUSE_ASNEEDED=0
--with-jbig2dec \
--enable-openjpeg \
--enable-dynamic \
--disable-compile-inits \
--without-ijs \
--disable-cups \
--disable-dbus \
@ -215,12 +217,14 @@ export SUSE_ASNEEDED=0
--with-drivers=FILES \
--without-x \
--disable-gtk \
--without-omni \
--without-ufst \
--without-luratech \
--without-libpaper
make
# Make libgs.so and two programs which use it, gsx and gsc:
# With --disable-gtk, gsx and gsc are identical. It provides a command line
# frontend to libgs equivalent (functional and command line arguments) to
# the gs binary, but uses the shared libgs instead of static linking
make so
# Configure and make libijs (that is not done regardless whether or not --with-ijs is used above):
pushd ijs
@ -238,9 +242,11 @@ make
popd
%install
make install DESTDIR=%{buildroot}
# Install libgs.so gsx gsc and some header files:
make soinstall DESTDIR=%{buildroot}
# Use gsc instead of gs, and remove duplicate gsx (see above)
mv %{buildroot}/%{_bindir}/{gsc,gs}
rm %{buildroot}/%{_bindir}/gsx
# Install libijs and its header files:
pushd ijs
make install DESTDIR=%{buildroot}
@ -278,7 +284,7 @@ done
# Do not pollute the build log file with zillions of meaningless messages:
set +x
cat /dev/null >catalog.devices
for D in $( %{buildroot}/usr/bin/gs -h | sed -n -e '/^Available devices:/,/^Search path:/p' | egrep -v '^Available devices:|^Search path:' )
for D in $( LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{buildroot}/usr/bin/gs -h | sed -n -e '/^Available devices:/,/^Search path:/p' | egrep -v '^Available devices:|^Search path:' )
do for F in devices/devs.mak devices/contrib.mak contrib/contrib.mak
do sed -n -e '/ Catalog /,/ End of catalog /p' $F | grep "[[:space:]]$D[[:space:]]" | grep -o '[[:alnum:]].*' | tr -s '[:blank:]' ' ' | sed -e 's/ /\t/' | expand -t16 >>catalog.devices
done
@ -287,25 +293,15 @@ done
set -x
install -m 644 catalog.devices $DOCDIR
# Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe
# see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets
%post
/sbin/ldconfig
exit 0
%post -p /sbin/ldconfig
# Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe
# see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets
%postun
/sbin/ldconfig
exit 0
%postun -p /sbin/ldconfig
%files
%defattr(-, root, root)
%{_bindir}/dvipdf
%{_bindir}/eps2eps
%{_bindir}/gs
%{_bindir}/gsx
%{_bindir}/gsc
%{_bindir}/gsbj
%{_bindir}/gsdj
%{_bindir}/gsdj500
@ -366,6 +362,8 @@ exit 0
%doc %{_defaultdocdir}/ghostscript
%dir %{_datadir}/ghostscript
%dir %{_datadir}/ghostscript/%{built_version}
%{_datadir}/ghostscript/%{built_version}/Resource
%{_datadir}/ghostscript/%{built_version}/iccprofiles
%doc %{_datadir}/ghostscript/%{built_version}/doc/
%{_datadir}/ghostscript/%{built_version}/examples/
%{_datadir}/ghostscript/%{built_version}/lib/

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Wed Feb 28 00:14:31 UTC 2018 - stefan.bruens@rwth-aachen.de
- Use -p /sbin/ldconfig instead of shell post(un) scriptlet, drop
explicit Prereq for ldconfig
- Use shared libgs library for gs binary instead of static linked
version
- Use --disable-compile-inits, to allow unbundling of Resource files
- Remove --disable-omni switch, has been removed in GS 9.20
- Keep patch ordering in full/mini consistent
- Remove patch backup files to avoid packaging
-------------------------------------------------------------------
Tue Feb 27 14:55:51 CET 2018 - novell@mirell.de

View File

@ -197,8 +197,6 @@ Recommends: cups-filters-ghostscript
# so that a RPM requirement is needed to make sure that Ghostscript has its fonts:
Requires: ghostscript-fonts-other
Requires: ghostscript-fonts-std
# Prerequire /sbin/ldconfig which is used in the traditional bash scriptlets for post/postun:
PreReq: /sbin/ldconfig
# Install into this non-root directory (required when norootforbuild is used):
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -228,7 +226,6 @@ For information how to use Ghostscript see
%package x11
Summary: X11 library for Ghostscript
Group: Productivity/Publishing/PS
# Require the exact matching version-release of the ghostscript main-package because
# a non-matching ghostscript main-package may let it fail or even crash (e.g. segfault)
# because all Ghostscript software is built from one same Ghostscript source tar ball
@ -236,6 +233,7 @@ Group: Productivity/Publishing/PS
# The exact matching version-release of the ghostscript main-package is available
# on the same package repository where the ghostscript-x11 sub-package is because
# all are built simulaneously from the same Ghostscript source package:
Group: Productivity/Publishing/PS
Requires: ghostscript = %{version}-%{release}
# Unfortunately ghostscript-library.spec and ghostscript-mini.spec have
# an unversioned "Provides: ghostscript" and for RPM this means that both
@ -292,10 +290,11 @@ This package contains the development files for Ghostscript.
# but the hunk for LCMS2 (lcms2/include/lcms2.h) is still needed
# see http://bugs.ghostscript.com/show_bug.cgi?id=695544
%patch11 -p1 -b .ppc64le-support.orig
%patch101 -p1
# Patch100 remove-zlib-h-dependency.patch removes dependency on zlib/zlib.h
# in makefiles as we do not use the zlib sources from the Ghostscript upstream tarball:
#patch100 -p1 -b remove-zlib-h-dependency.orig
%patch101 -p1
rm -f Resource/Init/*.ps.orig
# Do not use the freetype jpeg libpng tiff zlib sources from the Ghostscript upstream tarball
# because we prefer to use for long-established standard libraries the ones from SUSE
# in particular to automatically get SUSE security updates for standard libraries.
@ -321,7 +320,6 @@ autoreconf -fi
# --with-ijs to enable IJS printer driver support (in particular needed by HPIJS).
# --with-drivers=ALL to all file format drivers and all printer drivers.
# --with-x to use the X Window System.
# --without-omni to disable the outdated and unmaintained omni driver.
# --enable-openjpeg because since Ghostscript 9.05 JasPer is deprecated
# (--without-jasper is now an unrecognized option by configure)
# and Ghostscript now ships modified OpenJPEG sources for JPEG2000 decoding
@ -330,6 +328,9 @@ autoreconf -fi
# see also http://bugs.ghostscript.com/show_bug.cgi?id=691430
# --without-ufst and --without-luratech because those are relevant to commercial releases only
# which would require a commercial license.
# --disable-compile-inits to disable compiling of resources (Fonts, init postscript files, ...)
# into the library, which is the upstream recommendation for distributions. This also allows
# unbundling the 35 Postscript Standard fonts, provided by the URW font package
# --without-libpaper disables libpaper support because SUSE does not have libpaper.
%define gs_font_path /usr/share/fonts/truetype:/usr/share/fonts/Type1:/usr/share/fonts/CID:/usr/share/fonts/URW
# See http://bugs.ghostscript.com/show_bug.cgi?id=693100
@ -346,17 +347,20 @@ export SUSE_ASNEEDED=0
--with-jbig2dec \
--enable-openjpeg \
--enable-dynamic \
--disable-compile-inits \
--with-ijs \
--enable-cups \
--with-drivers=ALL \
--with-x \
--disable-gtk \
--without-omni \
--without-ufst \
--without-luratech \
--without-libpaper
make
# Make libgs.so and two programs which use it, gsx and gsc:
# With --disable-gtk, gsx and gsc are identical. It provides a command line
# frontend to libgs equivalent (functional and command line arguments) to
# the gs binary, but uses the shared libgs instead of static linking
make so
# Configure and make libijs (that is not done regardless whether or not --with-ijs is used above):
pushd ijs
@ -374,9 +378,11 @@ make
popd
%install
make install DESTDIR=%{buildroot}
# Install libgs.so gsx gsc and some header files:
make soinstall DESTDIR=%{buildroot}
# Use gsc instead of gs, and remove duplicate gsx (see above)
mv %{buildroot}/%{_bindir}/{gsc,gs}
rm %{buildroot}/%{_bindir}/gsx
# Install libijs and its header files:
pushd ijs
make install DESTDIR=%{buildroot}
@ -414,7 +420,7 @@ done
# Do not pollute the build log file with zillions of meaningless messages:
set +x
cat /dev/null >catalog.devices
for D in $( %{buildroot}/usr/bin/gs -h | sed -n -e '/^Available devices:/,/^Search path:/p' | egrep -v '^Available devices:|^Search path:' )
for D in $( LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{buildroot}/usr/bin/gs -h | sed -n -e '/^Available devices:/,/^Search path:/p' | egrep -v '^Available devices:|^Search path:' )
do for F in devices/devs.mak devices/contrib.mak contrib/contrib.mak
do sed -n -e '/ Catalog /,/ End of catalog /p' $F | grep "[[:space:]]$D[[:space:]]" | grep -o '[[:alnum:]].*' | tr -s '[:blank:]' ' ' | sed -e 's/ /\t/' | expand -t16 >>catalog.devices
done
@ -423,25 +429,15 @@ done
set -x
install -m 644 catalog.devices $DOCDIR
# Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe
# see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets
%post
/sbin/ldconfig
exit 0
%post -p /sbin/ldconfig
# Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe
# see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets
%postun
/sbin/ldconfig
exit 0
%postun -p /sbin/ldconfig
%files
%defattr(-, root, root)
%{_bindir}/dvipdf
%{_bindir}/eps2eps
%{_bindir}/gs
%{_bindir}/gsx
%{_bindir}/gsc
%{_bindir}/gsbj
%{_bindir}/gsdj
%{_bindir}/gsdj500
@ -502,6 +498,8 @@ exit 0
%doc %{_defaultdocdir}/ghostscript
%dir %{_datadir}/ghostscript
%dir %{_datadir}/ghostscript/%{built_version}
%{_datadir}/ghostscript/%{built_version}/Resource
%{_datadir}/ghostscript/%{built_version}/iccprofiles
%doc %{_datadir}/ghostscript/%{built_version}/doc/
%{_datadir}/ghostscript/%{built_version}/examples/
%{_datadir}/ghostscript/%{built_version}/lib/