2012-03-23 11:40:53 +01:00
#
# spec file for package ghostscript-mini
#
2021-03-08 11:18:16 +01:00
# Copyright (c) 2021 SUSE LLC
2012-03-23 11:40:53 +01:00
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
2019-08-20 12:24:25 +02:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2012-03-23 11:40:53 +01:00
#
2014-03-27 14:53:38 +01:00
2012-03-23 11:40:53 +01:00
Name : ghostscript-mini
BuildRequires : freetype2-devel
2015-11-27 16:27:55 +01:00
BuildRequires : libjpeg-devel
2018-03-16 14:33:21 +01:00
BuildRequires : liblcms2-devel
2012-03-23 11:40:53 +01:00
BuildRequires : libpng-devel
BuildRequires : libtiff-devel
BuildRequires : libtool
BuildRequires : pkg-config
2019-08-20 12:24:25 +02:00
BuildRequires : update-alternatives
2012-03-23 11:40:53 +01:00
BuildRequires : zlib-devel
2019-08-20 12:24:25 +02:00
Requires(post) : update-alternatives
2021-03-29 10:29:21 +02:00
Requires(preun) : update-alternatives
2012-03-23 11:40:53 +01:00
Summary : Minimal Ghostscript for minimal build requirements
2018-11-21 15:19:24 +01:00
License : AGPL-3.0-only
2019-09-09 09:14:34 +02:00
Group : Productivity/Office/Other
URL : https://www.ghostscript.com/
2014-09-10 14:31:06 +02:00
# Special version needed for Ghostscript release candidates (e.g. "Version: 9.14pre15rc1" for 9.15rc1).
# Version 9.15rc1 would be newer than 9.15 (run "zypper vcmp 9.15rc1 9.15") because the rpmvercmp algorithm
# would treat 9.15rc1 as 9.15.rc.1 (alphabetic and numeric sections get separated into different elements)
# and 9.15.rc.1 is newer than 9.15 (it has one more element in the list while previous elements are equal)
# so that we use an alphabetic prefix 'pre' to make it older than 9.15 (numbers are considered newer than letters).
# But only with the alphabetic prefix "9.pre15rc1" would be older than the previous version number "9.14"
# because rpmvercmp would treat 9.pre15rc1 as 9.pre.15.rc1 and letters are older than numbers
# so that we keep additionally the previous version number to upgrade from the previous version:
2019-09-09 09:14:34 +02:00
# Starting SLE12/rpm-4.10, one can use tildeversions: 9.15~rc1.
2018-11-21 15:19:24 +01:00
#Version: 9.25pre26rc1
2020-10-20 17:14:31 +02:00
Version : 9.53.3
2018-11-21 15:19:24 +01:00
Release : 0
2019-01-23 17:44:20 +01:00
# Normal version for Ghostscript releases is the upstream version:
2013-10-09 12:15:22 +02:00
# tarball_version is used below to specify the directory via "setup -n":
2014-09-10 14:31:06 +02:00
# Special tarball_version needed for Ghostscript release candidates e.g. "define tarball_version 9.15rc1".
2013-10-09 12:15:22 +02:00
# For Ghostscript releases tarball_version and version are the same (i.e. the upstream version):
2018-11-21 15:19:24 +01:00
%define tarball_version %{version}
#define tarball_version 9.26rc1
2013-10-09 12:15:22 +02:00
# built_version is used below in the install and files sections:
2014-09-10 14:31:06 +02:00
# Separated built_version needed in case of Ghostscript release candidates e.g. "define built_version 9.15".
2013-10-09 12:15:22 +02:00
# For Ghostscript releases built_version and version are the same (i.e. the upstream version):
2020-10-20 17:14:31 +02:00
%define built_version %{version}
#define built_version 9.26
2012-03-23 11:40:53 +01:00
# Source0...Source9 is for sources from upstream:
2013-10-09 12:15:22 +02:00
# Special URLs for Ghostscript release candidates:
2018-03-15 13:57:22 +01:00
# see https://github.com/ArtifexSoftware/ghostpdl-downloads/releases
2018-09-13 15:36:29 +02:00
# URL for Source0:
2018-11-09 13:40:49 +01:00
# wget -O ghostscript-9.26rc1.tar.gz https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9.26rc1/ghostscript-9.26rc1.tar.gz
2018-09-13 15:36:29 +02:00
# URL for MD5 checksums:
2018-11-09 13:40:49 +01:00
# wget -O gs9.26rc1.MD5SUMS https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9.26rc1/MD5SUMS
# MD5 checksum for Source0: 6539d5b270721938936d721f279a3520 ghostscript-9.26rc1.tar.gz
2018-11-21 15:19:24 +01:00
#Source0: ghostscript-%{tarball_version}.tar.gz
2013-10-09 12:15:22 +02:00
# Normal URLs for Ghostscript releases:
2018-03-22 13:49:03 +01:00
# URL for Source0:
2020-10-20 17:14:31 +02:00
# wget -O ghostscript-9.53.3.tar.gz https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9533/ghostscript-9.53.3.tar.gz
2017-11-30 11:44:29 +01:00
# URL for MD5 checksums:
2020-10-20 17:14:31 +02:00
# wget -O gs9533.MD5SUMS https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9533/MD5SUMS
# MD5 checksum for Source0: 807a5c4934a814e8a6cd83eff702f212 ghostscript-9.53.3.tar.gz
2018-11-21 15:19:24 +01:00
Source0 : ghostscript-%{version} .tar.gz
2019-03-22 12:27:22 +01:00
Source1 : apparmor_ghostscript
2012-03-23 11:40:53 +01:00
# Patch0...Patch9 is for patches from upstream:
2020-10-20 17:14:31 +02:00
# Patch2 41ef9a0bc36b9db7115fbe9623f989bfb47bbade.patch fixes compilation with FreeType 2.10.3+
# http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=41ef9a0bc36b9db7115fbe9623f989bfb47bbade
# c.f. https://bugs.ghostscript.com/show_bug.cgi?id=702985
Patch2 : 41ef9a0bc36b9db7115fbe9623f989bfb47bbade.patch
2012-03-23 11:40:53 +01:00
# Source10...Source99 is for sources from SUSE which are intended for upstream:
# Patch10...Patch99 is for patches from SUSE which are intended for upstream:
# Source100...Source999 is for sources from SUSE which are not intended for upstream:
# Patch100...Patch999 is for patches from SUSE which are not intended for upstream:
2015-11-19 13:58:39 +01:00
# 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 : remove-zlib-h-dependency.patch
2020-04-29 12:44:01 +02:00
# Patch101 ijs_exec_server_dont_use_sh.patch fixes IJS printing problem
# additionally allow exec'ing hpijs in apparmor profile was needed (bsc#1128467):
2019-03-22 12:27:22 +01:00
Patch101 : ijs_exec_server_dont_use_sh.patch
2015-11-19 13:58:39 +01:00
# RPM dependencies:
2021-03-08 11:35:08 +01:00
# The "Provides: ghostscript_any" is there to support "BuildRequires: ghostscript_any"
# so other packages can build with any available Ghostscript implementation,
# either ghostscript or ghostscript-mini ("BuildRequires: ghostscript-mini" should not
# be used because ghostscript-mini does not exist outside of OBS so other packages that
# use "BuildRequires: ghostscript-mini" could not be built in published products).
# The "Provides: ghostscript_any" does not affect end-users who should not get
# ghostscript-mini installed (but only the full featured ghostscript package)
# because ghostscript-mini (and ghostscript-mini-devel) are not published
# in openSUSE products, cf. https://build.opensuse.org/request/show/877083
2021-03-08 11:18:16 +01:00
Provides : ghostscript_any = %{version}
2012-03-23 11:40:53 +01:00
Conflicts : ghostscript
Conflicts : ghostscript-devel
2012-04-25 16:47:49 +02:00
Conflicts : ghostscript-library
2021-03-29 10:29:21 +02:00
Conflicts : ghostscript-x11
2012-03-23 11:40:53 +01:00
# Install into this non-root directory (required when norootforbuild is used):
BuildRoot : %{_tmppath} /%{name} -%{version} -build
%description
Crippled Minimal Ghostscript which is not meant
to be used by end-users.
Minimal Ghostscript provides only the file format drivers
in particular to output JPEG PNG PostScript and PDF files
but no printer drivers (in particular neither 'cups'
nor 'ijs' ) and no X11 drivers.
The ghostscript-mini package is only meant to be used
by the openSUSE build service to avoid possible loops
in the build dependencies because ghostscript-mini
has minimal build dependencies (in particular
neither CUPS nor X11 build dependencies).
2012-04-25 16:47:49 +02:00
For most packages which need to only run
Ghostscript during build, a single line
" B u i l d R e q u i r e s : g h o s t s c r i p t - m i n i "
should be sufficient in the RPM spec file.
For most packages which need Ghostscript
development files to build, a single line
" B u i l d R e q u i r e s : g h o s t s c r i p t - m i n i - d e v e l "
should be sufficient in the RPM spec file.
2012-03-23 11:56:35 +01:00
The ghostscript-mini package in the openSUSE build
service contains no sources and it must not contain
any source files. The ghostscript-mini package is only
a link to its matching ghostscript " p a r e n t " package.
Only that ghostscript package must contain all sources
and any changes must happen only for that ghostscript
package. This means any changes for the ghostscript-mini
2014-09-29 14:56:54 +02:00
package will be rejected in the openSUSE build service.
2012-03-23 11:56:35 +01:00
2012-03-23 11:40:53 +01:00
%package devel
Summary : Development files for Minimal Ghostscript
2012-04-25 16:47:49 +02:00
Group : Development/Libraries/C and C++
2012-03-23 11:40:53 +01:00
Requires : ghostscript-mini = %{version}
Conflicts : ghostscript
Conflicts : ghostscript-devel
2012-04-25 16:47:49 +02:00
Conflicts : ghostscript-library
2021-03-29 10:29:21 +02:00
Conflicts : ghostscript-x11
2012-03-23 11:40:53 +01:00
%description devel
This package contains the development files for Minimal Ghostscript.
%prep
2013-01-04 10:02:55 +01:00
# Be quiet when unpacking and
# use a directory name matching Source0 to make it work also for ghostscript-mini:
2013-10-09 12:15:22 +02:00
%setup -q -n ghostscript-%{tarball_version}
2020-10-20 17:14:31 +02:00
# Patch2 41ef9a0bc36b9db7115fbe9623f989bfb47bbade.patch fixes compilation with FreeType 2.10.3+
# http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=41ef9a0bc36b9db7115fbe9623f989bfb47bbade
# c.f. https://bugs.ghostscript.com/show_bug.cgi?id=702985
%patch2 -p1
2015-11-19 13:58:39 +01:00
# Patch100 remove-zlib-h-dependency.patch removes dependency on zlib/zlib.h
2018-03-16 14:33:21 +01:00
# in makefiles as we do not use the zlib sources from the Ghostscript upstream tarball.
# Again use the zlib sources from Ghostscript upstream
# and disable remove-zlib-h-dependency.patch because
# Ghostscript 9.21 does no longer build this way:
2017-04-12 14:35:15 +02:00
#patch100 -p1 -b remove-zlib-h-dependency.orig
2020-04-29 12:44:01 +02:00
# Patch101 ijs_exec_server_dont_use_sh.patch fixes IJS printing problem
# additionally allow exec'ing hpijs in apparmor profile was needed (bsc#1128467):
2019-03-22 12:27:22 +01:00
%patch101 -p1
2018-03-15 13:57:22 +01:00
# Remove patch backup files to avoid packaging
# cf. https://build.opensuse.org/request/show/581052
2018-03-12 11:33:44 +01:00
rm -f Resource/Init/*.ps.orig
2015-11-19 13:58:39 +01:00
# 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.
# In contrast we use e.g. lcms2 from the Ghostscript upstream tarball because this one
# is specially modified to work with Ghostscript so that we cannot use lcms2 from SUSE:
2017-04-12 14:35:15 +02:00
#rm -rf freetype jpeg libpng tiff zlib
2018-03-16 14:33:21 +01:00
# Again use the zlib sources from Ghostscript upstream
# and disable remove-zlib-h-dependency.patch because
# Ghostscript 9.21 does no longer build this way:
2019-04-04 16:27:19 +02:00
%if 0%{?suse_version} == 1315
# Again use the freetype sources from Ghostscript upstream because
# Ghostscript 9.27 does no longer build this way for SLE12:
rm -rf jpeg libpng tiff
%else
2017-04-12 14:35:15 +02:00
rm -rf freetype jpeg libpng tiff
2019-04-04 16:27:19 +02:00
%endif
2020-10-20 17:14:31 +02:00
%if 0%{?suse_version} >= 1550
rm -rf openjpeg
%endif
2018-03-16 14:33:21 +01:00
# In contrast to the above we use lcms2 from SUSE since Ghostscript 9.23rc1
# because that is what Ghostscript upstream recommends according to
# https://ghostscript.com/pipermail/gs-devel/2018-March/010061.html
# because singe Ghostscript 9.23rc1 there is no longer lcms2 in Ghostscript
# but now it is lcms2art (the beginning of a lcms2 fork - see News.htm).
# On SLE11 and on SLE12-SP1 there is liblcms2-2-2.5
# which is too old so that configure fails there with
# checking for local lcms2 library source... no
# checking for system lcms2 library... checking for _cmsCreateMutex in -llcms2... no
# configure: error: lcms2 not found, or too old
# (on SLE12-SP2 there is liblcms2-2-2.7 which is not too old)
# but there is no configure option to build it without lcms2
# so that for SLE11 and SLE12-SP1 it is built with lcms2art in Ghostscript
# i.e. lcms2art in Ghostscript is only removed when not SLE11 or SLE12-SP1
# cf. https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
%if 0%{?suse_version} == 1110 || 0%{?sle_version} == 120100
echo " B u i l d i n g i t w i t h l c m s 2 a r t i n G h o s t s c r i p t "
%else
rm -rf lcms2art
%endif
2017-09-15 10:07:56 +02:00
2012-03-23 11:40:53 +01:00
%build
2017-01-30 14:16:52 +01:00
# Derive build timestamp from latest changelog entry
export SOURCE_DATE_EPOCH=$(date -d " $ ( h e a d - n 2 %{_sourcedir} / %{name} . c h a n g e s | t a i l - n 1 | c u t - d - - f 1 ) " +%s)
2012-03-23 11:40:53 +01:00
# Set our preferred architecture-specific flags for the compiler and linker:
2019-09-09 09:14:34 +02:00
export CFLAGS=" %{optflags} - f n o - s t r i c t - a l i a s i n g "
export CXXFLAGS=" %{optflags} - f n o - s t r i c t - a l i a s i n g "
2012-03-23 11:40:53 +01:00
autoreconf -fi
2012-04-25 16:47:49 +02:00
# --docdir=%%{_defaultdocdir}/%%{name} does not work therefore it is not used.
2015-03-25 15:14:43 +01:00
# --disable-cups and --without-pdftoraster
2012-04-27 14:58:11 +02:00
# to have nothing related to CUPS in the minimal Ghostscript.
# --disable-dbus to have nothing related to D-Bus in the minimal Ghostscript.
2012-03-23 11:40:53 +01:00
# --without-ijs to disable IJS printer driver support in the minimal Ghostscript.
# --with-drivers=FILES to have only the file format drivers
2012-04-27 14:58:11 +02:00
# but no printer drivers in the minimal Ghostscript.
2012-03-23 11:40:53 +01:00
# --without-x to not use the X Window System.
2015-03-25 15:14:43 +01:00
# --enable-openjpeg because since Ghostscript 9.05 JasPer is deprecated
# (--without-jasper is now an unrecognized option by configure)
2012-04-27 14:58:11 +02:00
# and Ghostscript now ships modified OpenJPEG sources for JPEG2000 decoding
2015-03-25 15:14:43 +01:00
# (replacing JasPer - although JasPer is still included for this release)
2012-04-27 14:58:11 +02:00
# Performance, reliability and memory use whilst decoding JPX streams are all improved.
2015-03-25 15:14:43 +01:00
# see also http://bugs.ghostscript.com/show_bug.cgi?id=691430
2012-03-23 11:40:53 +01:00
# --without-ufst and --without-luratech because those are relevant to commercial releases only
2012-04-27 14:58:11 +02:00
# which would require a commercial license.
2018-03-12 11:33:44 +01:00
# --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
2012-03-23 11:40:53 +01:00
# --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
2012-09-24 12:58:49 +02:00
# See http://bugs.ghostscript.com/show_bug.cgi?id=693100
2012-09-24 12:58:16 +02:00
export SUSE_ASNEEDED=0
2012-03-23 11:40:53 +01:00
./configure --prefix=%{_prefix} \
--bindir=%{_bindir} \
2012-04-25 16:47:49 +02:00
--libdir=%{_libdir} \
2012-03-23 11:40:53 +01:00
--datadir=%{_datadir} \
2012-04-25 16:47:49 +02:00
--mandir=%{_mandir} \
2012-03-23 11:40:53 +01:00
--infodir=%{_infodir} \
--with-fontpath=%{gs_font_path} \
--with-libiconv=maybe \
--enable-freetype \
--with-jbig2dec \
--enable-openjpeg \
--enable-dynamic \
2018-03-12 11:33:44 +01:00
--disable-compile-inits \
2013-02-20 13:27:45 +01:00
--without-ijs \
2012-03-23 11:40:53 +01:00
--disable-cups \
2012-04-27 14:58:11 +02:00
--disable-dbus \
2012-03-23 11:40:53 +01:00
--without-pdftoraster \
--with-drivers=FILES \
--without-x \
--disable-gtk \
--without-ufst \
--without-luratech \
--without-libpaper
2018-03-12 11:33:44 +01:00
2012-04-25 16:47:49 +02:00
# Make libgs.so and two programs which use it, gsx and gsc:
2018-03-12 11:33:44 +01:00
# 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
2012-03-23 11:40:53 +01:00
make so
2013-02-20 13:27:45 +01:00
# Configure and make libijs (that is not done regardless whether or not --with-ijs is used above):
2013-01-04 10:02:55 +01:00
pushd ijs
./autogen.sh
2018-02-28 11:35:32 +01:00
autoreconf -fi
2013-01-04 10:02:55 +01:00
./configure --prefix=%{_prefix} \
--bindir=%{_bindir} \
--libdir=%{_libdir} \
--datadir=%{_datadir} \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--enable-shared \
--disable-static
make
popd
2012-03-23 11:40:53 +01:00
%install
2012-04-25 16:47:49 +02:00
# Install libgs.so gsx gsc and some header files:
2012-03-23 11:40:53 +01:00
make soinstall DESTDIR=%{buildroot}
2018-03-12 11:33:44 +01:00
# Use gsc instead of gs, and remove duplicate gsx (see above)
mv %{buildroot} /%{_bindir} /{gsc,gs}
rm %{buildroot} /%{_bindir} /gsx
2013-01-04 10:02:55 +01:00
# Install libijs and its header files:
pushd ijs
make install DESTDIR=%{buildroot}
popd
# Remove installed ijs example client and server and its .la file:
rm %{buildroot} %{_bindir} /ijs_client_example
rm %{buildroot} %{_bindir} /ijs_server_example
rm %{buildroot} %{_libdir} /libijs.la
2018-03-15 13:57:22 +01:00
# Install examples:
EXAMPLESDIR=%{buildroot} %{_datadir} /ghostscript/%{built_version} /examples
test -d $EXAMPLESDIR || install -d $EXAMPLESDIR
for E in examples/*
do install -m 644 $E $EXAMPLESDIR || :
done
test -d $EXAMPLESDIR/cjk || install -d $EXAMPLESDIR/cjk
for E in examples/cjk/*
do install -m 644 $E $EXAMPLESDIR/cjk || :
done
2012-04-25 16:47:49 +02:00
# Install documentation which is not installed by default
# see http://bugs.ghostscript.com/show_bug.cgi?id=693002
# and fail intentionally as notification if something changed:
2018-03-15 13:57:22 +01:00
DOCDIR=%{buildroot} %{_datadir} /doc/ghostscript/%{built_version}
2012-09-27 15:49:11 +02:00
for D in LICENSE
2012-04-25 16:47:49 +02:00
do test -e $DOCDIR/$( basename $D ) && exit 99
install -m 644 $D $DOCDIR
done
2018-03-15 13:57:22 +01:00
# Add a link named 'ghostscript' from SUSE's usual documentation directory /usr/share/doc/packages
# with link target Ghostscript's documentation directory e.g. /usr/share/doc/ghostscript/9.23
# as relative link to get the link independent of the buildroot prefix
# i.e. in /usr/share/doc/packages add the link ghostscript -> ../ghostscript/9.23
2012-04-25 16:47:49 +02:00
# because "configure --docdir=%%{_defaultdocdir}/%%{name}" does not work (see above):
2012-05-11 12:09:58 +02:00
install -d -m 755 %{buildroot} %{_defaultdocdir}
2012-04-25 16:47:49 +02:00
pushd %{buildroot} %{_defaultdocdir}
2018-03-15 13:57:22 +01:00
ln -s ../ghostscript/%{built_version} ghostscript
2012-04-25 16:47:49 +02:00
popd
2012-05-11 12:09:58 +02:00
# Extract the catalog of devices which are actually built-in in exactly this Ghostscript:
2015-03-25 15:14:43 +01:00
# If a needed source file is no longer accessible fail intentionally as notification
# that something changed which needs adaptions here:
2020-10-20 17:14:31 +02:00
catalog_devices_source_files=" d e v i c e s / d e v s . m a k d e v i c e s / d c o n t r i b . m a k c o n t r i b / c o n t r i b . m a k "
for F in $catalog_devices_source_files
2015-03-25 15:14:43 +01:00
do test -r $F || exit 99
done
2012-05-11 12:09:58 +02:00
# Do not pollute the build log file with zillions of meaningless messages:
set +x
cat /dev/null >catalog.devices
2018-03-12 11:33:44 +01:00
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:' )
2020-10-20 17:14:31 +02:00
do for F in $catalog_devices_source_files
2012-05-11 12:09:58 +02:00
do sed -n -e '/ Catalog /,/ End of catalog /p' $F | grep " [ [ : s p a c e : ] ] $ D [ [ : s p a c e : ] ] " | grep -o '[[:alnum:]].*' | tr -s '[:blank:]' ' ' | sed -e 's/ /\t/' | expand -t16 >>catalog.devices
done
done
# Switch back to the usual build log messages:
set -x
install -m 644 catalog.devices $DOCDIR
2012-03-23 11:40:53 +01:00
2019-08-20 12:24:25 +02:00
# Move /usr/bin/gs to /usr/bin/gs.bin to be able to use update-alternatives
install -d %buildroot%{_sysconfdir} /alternatives
mv %{buildroot} %{_bindir} /gs %{buildroot} %{_bindir} /gs.bin
ln -sf %{_bindir} /gs.bin %{buildroot} %{_sysconfdir} /alternatives/gs
ln -sf %{_sysconfdir} /alternatives/gs %{buildroot} %{_bindir} /gs
2019-03-22 12:27:22 +01:00
%post
/sbin/ldconfig
2019-08-20 12:24:25 +02:00
%{_sbindir} /update-alternatives \
--install %{_bindir} /gs gs %{_bindir} /gs.bin 15
2012-03-23 11:40:53 +01:00
2018-03-12 11:33:44 +01:00
%postun -p /sbin/ldconfig
2012-03-23 11:40:53 +01:00
2019-08-20 12:24:25 +02:00
%preun
if test $1 -eq 0 ; then
%{_sbindir} /update-alternatives \
--remove gs %{_bindir} /gs.bin
fi
2012-03-23 11:40:53 +01:00
%files
%defattr (-, root, root)
2019-08-20 12:24:25 +02:00
%ghost %config %{_sysconfdir} /alternatives/gs
2012-03-23 11:40:53 +01:00
%{_bindir} /dvipdf
%{_bindir} /eps2eps
%{_bindir} /gs
2019-08-20 12:24:25 +02:00
%{_bindir} /gs.bin
2012-03-23 11:40:53 +01:00
%{_bindir} /gsbj
%{_bindir} /gsdj
%{_bindir} /gsdj500
%{_bindir} /gslj
%{_bindir} /gslp
%{_bindir} /gsnd
%{_bindir} /lprsetup.sh
%{_bindir} /pdf2dsc
%{_bindir} /pdf2ps
%{_bindir} /pf2afm
%{_bindir} /pfbtopfa
%{_bindir} /pphs
%{_bindir} /printafm
%{_bindir} /ps2ascii
%{_bindir} /ps2epsi
%{_bindir} /ps2pdf
%{_bindir} /ps2pdf12
%{_bindir} /ps2pdf13
%{_bindir} /ps2pdf14
%{_bindir} /ps2pdfwr
%{_bindir} /ps2ps
%{_bindir} /ps2ps2
%{_bindir} /unix-lpr.sh
%doc %{_mandir} /man1/dvipdf.1.gz
%doc %{_mandir} /man1/eps2eps.1.gz
%doc %{_mandir} /man1/gs.1.gz
%doc %{_mandir} /man1/gsbj.1.gz
%doc %{_mandir} /man1/gsdj.1.gz
%doc %{_mandir} /man1/gsdj500.1.gz
%doc %{_mandir} /man1/gslj.1.gz
%doc %{_mandir} /man1/gslp.1.gz
%doc %{_mandir} /man1/gsnd.1.gz
%doc %{_mandir} /man1/pdf2dsc.1.gz
%doc %{_mandir} /man1/pdf2ps.1.gz
%doc %{_mandir} /man1/pf2afm.1.gz
%doc %{_mandir} /man1/pfbtopfa.1.gz
%doc %{_mandir} /man1/printafm.1.gz
%doc %{_mandir} /man1/ps2ascii.1.gz
%doc %{_mandir} /man1/ps2epsi.1.gz
%doc %{_mandir} /man1/ps2pdf.1.gz
%doc %{_mandir} /man1/ps2pdf12.1.gz
%doc %{_mandir} /man1/ps2pdf13.1.gz
%doc %{_mandir} /man1/ps2pdf14.1.gz
%doc %{_mandir} /man1/ps2pdfwr.1.gz
%doc %{_mandir} /man1/ps2ps.1.gz
%doc %{_mandir} /de/man1/dvipdf.1.gz
%doc %{_mandir} /de/man1/eps2eps.1.gz
%doc %{_mandir} /de/man1/gsnd.1.gz
%doc %{_mandir} /de/man1/pdf2dsc.1.gz
%doc %{_mandir} /de/man1/pdf2ps.1.gz
%doc %{_mandir} /de/man1/printafm.1.gz
%doc %{_mandir} /de/man1/ps2ascii.1.gz
%doc %{_mandir} /de/man1/ps2pdf.1.gz
%doc %{_mandir} /de/man1/ps2pdf12.1.gz
%doc %{_mandir} /de/man1/ps2pdf13.1.gz
%doc %{_mandir} /de/man1/ps2pdf14.1.gz
%doc %{_mandir} /de/man1/ps2ps.1.gz
2012-04-25 16:47:49 +02:00
%doc %{_defaultdocdir} /ghostscript
2018-03-15 13:57:22 +01:00
%dir %{_datadir} /doc/ghostscript
%doc %{_datadir} /doc/ghostscript/%{built_version}
2012-04-25 16:47:49 +02:00
%dir %{_datadir} /ghostscript
2013-10-09 12:15:22 +02:00
%dir %{_datadir} /ghostscript/%{built_version}
2018-03-12 11:33:44 +01:00
%{_datadir} /ghostscript/%{built_version} /Resource
%{_datadir} /ghostscript/%{built_version} /iccprofiles
2013-10-09 12:15:22 +02:00
%{_datadir} /ghostscript/%{built_version} /examples/
%{_datadir} /ghostscript/%{built_version} /lib/
2012-03-23 11:40:53 +01:00
%{_libdir} /libgs.so.*
%{_libdir} /ghostscript/
2013-01-04 10:02:55 +01:00
%{_libdir} /libijs-0.35.so
2012-03-23 11:40:53 +01:00
%files devel
%defattr (-,root,root)
%{_includedir} /ghostscript/
%{_libdir} /libgs.so
2013-01-04 10:02:55 +01:00
%{_includedir} /ijs/
%{_libdir} /libijs.so
%{_libdir} /pkgconfig/ijs.pc
2012-03-23 11:40:53 +01:00
%changelog