specfile: complete cleanup (according to FPG) & package layout update
The specfile has been completely rewritten from the ground up, to comply with Fedora Packaging Guidelines, and to incorporate comments from upstream. The subpackage layout was also updated into more sane and more granular scheme. The changes are described more in detail below: (Justifications for them can be found in the specfile's comments.) * libijs -- the IJS library has been debundled and is now provided as a separate package: https://src.fedoraproject.org/rpms/libijs * libgs -- new separate package, created from Ghostscript's shared library. It contains all necessary files for other software/packages that are build upon Ghostscript's functionality. * libgs-devel -- new separate subpackage, for development purposes or Fedora's build process. The 'ghostscript-devel' is still provided for now as a virtual subpackage. * ghostscript -- is no longer a metapackage. It's a regular package instead, and it contains Ghostscript's binaries as well as some typical conversion scripts people are used to (and expect to have installed together with Ghostscript by default). * ghostscript-tools-fonts -- new subpackage that contains 3 scripts that are useful only for people who are working with AFM, PFB or PFA files (conversions usually). * ghostscript-tools-printing -- new subpackage that contains only utilities for formatting and printing text files using either Ghostscript, or BubbleJet, DeskJet, DeskJet 500, & LaserJet printers. * ghostscript-core -- has became an empty metapackage for upgrade purposes. It will be removed once Fedora 28 is EOL, and all other packages has updated their specfiles to require correct subpackages. * LPR setup scripts are no longer being shipped. In case people still need those, then 'ghostscript-tools-lpr' will be created for it. * examples/ from 'ghostscript-doc' are no longer shipped. * Support for /usr/share/ghostscript/conf.d/ folder was dropped to use Ghostscript's default choice for rendering of CJK glyphs, which is Google Droid Sans Fallback font. In case this proves insufficent, the conf.d/ folder support will be re-established. * Symbolic links for direct resources locations have been added to speedup Ghostscript's startup time * Ghostscript's search path was updated to include only fonts locations, which will be used only as a backup (in case of broken symbolic links). * Documentation and resources paths no longer contain version string inside of them. * Ghostscript itself (as a whole) has been completely debundled (to a point where it still makes sense). It newly requires these packages: https://src.fedoraproject.org/rpms/adobe-mappings-cmap https://src.fedoraproject.org/rpms/adobe-mappings-pdf https://src.fedoraproject.org/rpms/libijs https://src.fedoraproject.org/rpms/urw-base35-fonts * As a result of debundling, 'poppler-data' is no longer a requirement for Ghostscript, and it is no longer necessary to do a rebuild of 'poppler-data' when Ghostscript is rebased.
This commit is contained in:
parent
870696a1b1
commit
fe7ddccb26
141
ghostscript-9.22-000-convert-de-man-pages-to-UTF-8.patch
Normal file
141
ghostscript-9.22-000-convert-de-man-pages-to-UTF-8.patch
Normal file
@ -0,0 +1,141 @@
|
||||
From 615b31526d06fcdac7abb9e37deac3ce5fb214b6 Mon Sep 17 00:00:00 2001
|
||||
From: "David Kaspar [Dee'Kej]" <dkaspar@redhat.com>
|
||||
Date: Thu, 16 Nov 2017 16:41:22 +0100
|
||||
Subject: [PATCH] man/de - all man pages converted to UTF-8 (from ISO-8859-1)
|
||||
|
||||
---
|
||||
man/de/dvipdf.1 | 4 ++--
|
||||
man/de/gsnd.1 | 2 +-
|
||||
man/de/pdf2ps.1 | 4 ++--
|
||||
man/de/printafm.1 | 2 +-
|
||||
man/de/ps2ascii.1 | 10 +++++-----
|
||||
man/de/ps2ps.1 | 4 ++--
|
||||
6 files changed, 13 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/man/de/dvipdf.1 b/man/de/dvipdf.1
|
||||
index 592e3a9..c7a0cd2 100644
|
||||
--- a/man/de/dvipdf.1
|
||||
+++ b/man/de/dvipdf.1
|
||||
@@ -10,7 +10,7 @@ Das Skript ruf
|
||||
.BR dvips (1)
|
||||
mit dem
|
||||
.B -q
|
||||
-Parameter auf und leitet die Ausgabe über eine Pipe an
|
||||
+Parameter auf und leitet die Ausgabe über eine Pipe an
|
||||
.BR gs (1)
|
||||
weiter, das mit den folgenden Paramtern aufgerufen wird:
|
||||
|
||||
@@ -23,7 +23,7 @@ und allen in der Kommandozeile angegeben Optionen.
|
||||
.SH SIEHE AUCH
|
||||
gs(1), dvips(1)
|
||||
.SH VERSION
|
||||
-Dieses Dokument wurde zuletzt für Ghostscript Version 7.21 durchgesehen.
|
||||
+Dieses Dokument wurde zuletzt für Ghostscript Version 7.21 durchgesehen.
|
||||
.SH AUTOR
|
||||
Artifex Software, Inc. sind die
|
||||
Hauptautoren von Ghostscript.
|
||||
diff --git a/man/de/gsnd.1 b/man/de/gsnd.1
|
||||
index 976fe04..a660081 100644
|
||||
--- a/man/de/gsnd.1
|
||||
+++ b/man/de/gsnd.1
|
||||
@@ -14,7 +14,7 @@ auf, gefolgt von allen anderen Argumenten der Kommandozeile.
|
||||
.SH SIEHE AUCH
|
||||
gs(1)
|
||||
.SH VERSION
|
||||
-Dieses Dokument wurde zuletzt für Ghostscript Version 7.21 durchgesehen.
|
||||
+Dieses Dokument wurde zuletzt für Ghostscript Version 7.21 durchgesehen.
|
||||
.SH AUTHOR
|
||||
Artifex Software, Inc. sind die
|
||||
Hauptautoren von Ghostscript.
|
||||
diff --git a/man/de/pdf2ps.1 b/man/de/pdf2ps.1
|
||||
index 6a61d58..5467891 100644
|
||||
--- a/man/de/pdf2ps.1
|
||||
+++ b/man/de/pdf2ps.1
|
||||
@@ -10,12 +10,12 @@ pdf2ps \- Ghostscript PDF nach PostScript Konverter
|
||||
in die Datei "Ausgabe.ps" im \fBPostScript\fR(tm)-Format zu konvertieren.
|
||||
Normalerweise darf die Ausgabe PostScript-Level-2-Konstrukte (nicht jedoch PostScript LanguageLevel 3)
|
||||
benutzen; die \fB-dLanguageLevel=1\fR Option erzwingt
|
||||
-Level 1, während \fB-dLanguageLevel=3\fR LanguageLevel-3-Konstrukte für die Ausgabe erlaubt.
|
||||
+Level 1, während \fB-dLanguageLevel=3\fR LanguageLevel-3-Konstrukte für die Ausgabe erlaubt.
|
||||
.SH DATEIEN
|
||||
Starten Sie "\fBgs -h\fR" um den Ort der Ghostscript-Dokumentation auf Ihrem System zu ermitteln,
|
||||
wo Sie weitere Datails finden.
|
||||
.SH VERSION
|
||||
-Dieses Dokument wurde zuletzt für Ghostscript Version 7.21 durchgesehen.
|
||||
+Dieses Dokument wurde zuletzt für Ghostscript Version 7.21 durchgesehen.
|
||||
.SH AUTOR
|
||||
Artifex Software, Inc. sind die
|
||||
Hauptautoren of Ghostscript.
|
||||
diff --git a/man/de/printafm.1 b/man/de/printafm.1
|
||||
index 73a23dd..dc75b98 100644
|
||||
--- a/man/de/printafm.1
|
||||
+++ b/man/de/printafm.1
|
||||
@@ -12,7 +12,7 @@ auf, um die Metrik einer Schrift im AFM-Format zur Standardausgabe (stdout) zu s
|
||||
.SH SIEHE AUCH
|
||||
gs(1)
|
||||
.SH VERSION
|
||||
-Das Dokument wurde zuletzt für Ghostscript Version 7.21 durchgesehen.
|
||||
+Das Dokument wurde zuletzt für Ghostscript Version 7.21 durchgesehen.
|
||||
.SH AUTOR
|
||||
Artifex Software, Inc. sind die
|
||||
Hauptautoren von Ghostscript.
|
||||
diff --git a/man/de/ps2ascii.1 b/man/de/ps2ascii.1
|
||||
index 784aac3..8f9c0ae 100644
|
||||
--- a/man/de/ps2ascii.1
|
||||
+++ b/man/de/ps2ascii.1
|
||||
@@ -2,7 +2,7 @@
|
||||
.\" Translation by Tobias Burnus <burnus@gmx.de> and Thomas Hoffmann
|
||||
.TH PS2ASCII 1 "8.Juli 2002" 7.21 "Ghostscript-Werkzeuge" \" -*- nroff -*-
|
||||
.SH NAME
|
||||
-ps2ascii \- Ghostscript-Übersetzer von PostScript oder PDF nach ASCII
|
||||
+ps2ascii \- Ghostscript-Ãœbersetzer von PostScript oder PDF nach ASCII
|
||||
.SH SYNTAX
|
||||
\fBps2ascii\fR [ \fIEingabe.ps\fR [ \fIAusgabe.txt\fR ] ]
|
||||
.br
|
||||
@@ -12,19 +12,19 @@ ps2ascii \- Ghostscript-
|
||||
\fBPostScript\fR(tm)- oder Adobe \fBPortable-Document-Format\fR-(PDF-)Datei zu extrahieren. Falls keine
|
||||
Dateien in der Kommandozeile angegeben werden,
|
||||
liest \fBgs\fR von der Standardeingabe; bei PDF-Dateien wird ein expliziter
|
||||
-Dateiname benötigt, keine Standardeingabe. Falls keine Ausgabedatei angegeben
|
||||
+Dateiname benötigt, keine Standardeingabe. Falls keine Ausgabedatei angegeben
|
||||
ist, wird zur Standardausgabe geschrieben.
|
||||
.PP
|
||||
\fBps2ascii\fR ignoriert die Schriftkodierung und kommt nicht sonderlich
|
||||
-gut mit Unterscheidung (Kerning) zurecht. Somit sollten Sie für PostScript
|
||||
-(aber gegenwärtig nicht für PDF) \fBpstotext\fR benutzen (siehe unten).
|
||||
+gut mit Unterscheidung (Kerning) zurecht. Somit sollten Sie für PostScript
|
||||
+(aber gegenwärtig nicht für PDF) \fBpstotext\fR benutzen (siehe unten).
|
||||
.SH DATEIEN
|
||||
Starten Sie "\fBgs -h\fR" um den Ort der Ghostscript-Dokumentation auf Ihrem System zu ermitteln,
|
||||
wo Sie weitere Datails finden.
|
||||
.SH SIEHE AUCH
|
||||
pstotext(1), http://www.research.digital.com/SRC/virtualpaper/pstotext.html
|
||||
.SH VERSION
|
||||
-Dies Dokument wurde zuletzt für Ghostscript version 7.21 durchgesehen.
|
||||
+Dies Dokument wurde zuletzt für Ghostscript version 7.21 durchgesehen.
|
||||
.SH AUTOR
|
||||
Artifex Software, Inc. sind die
|
||||
Hauptautoren von Ghostscript.
|
||||
diff --git a/man/de/ps2ps.1 b/man/de/ps2ps.1
|
||||
index 039efcf..2bb3d13 100644
|
||||
--- a/man/de/ps2ps.1
|
||||
+++ b/man/de/ps2ps.1
|
||||
@@ -14,13 +14,13 @@ ps2ps, eps2eps \- Ghostscript PostScript "Distiller"
|
||||
PostScript-Level-2-Konstrukte benutzen, aber
|
||||
\fB\-dLanguageLevel=1\fR erzwingt die Ausgabe von Level 1.
|
||||
.PP
|
||||
-\fBeps2eps\fR führt analoge Optimierungen bei Encapsulated
|
||||
+\fBeps2eps\fR führt analoge Optimierungen bei Encapsulated
|
||||
PostScript (EPS) Dateien durch.
|
||||
.SH DATEIEN
|
||||
Rufen Sie "\fBgs -h\fR" auf, um den Ort der Ghostscript-Dokumentation auf Ihrem System zu
|
||||
ermitteln, wo Sie weitere Informationen finden.
|
||||
.SH VERSION
|
||||
-Dieses Document wurde zuletzt für Ghostscript Version 7.21 überarbeitet.
|
||||
+Dieses Document wurde zuletzt für Ghostscript Version 7.21 überarbeitet.
|
||||
.SH AUTOR
|
||||
Artifex Software, Inc. sind die
|
||||
Hauptautoren von Ghostscript.
|
||||
--
|
||||
2.9.5
|
||||
|
@ -1,7 +1,33 @@
|
||||
diff -up ghostscript-9.22/Resource/Init/gs_init.ps.restore-flushpage ghostscript-9.22/Resource/Init/gs_init.ps
|
||||
--- ghostscript-9.22/Resource/Init/gs_init.ps.restore-flushpage 2017-11-29 14:58:35.449534983 -0500
|
||||
+++ ghostscript-9.22/Resource/Init/gs_init.ps 2017-11-29 14:59:25.903397616 -0500
|
||||
@@ -2163,7 +2163,7 @@ SAFER { .setsafeglobal } if
|
||||
From 19ebb5f1f497b6f2d50fe13d17d3e627dfb6c868 Mon Sep 17 00:00:00 2001
|
||||
From: Ken Sharp <ken.sharp@artifex.com>
|
||||
Date: Tue, 21 Nov 2017 16:46:18 +0000
|
||||
Subject: [PATCH] PS interpreter - restore the flushpage operator
|
||||
|
||||
Michael Katzmann, working at the Library of Congress, is using
|
||||
Ghostscript in a custom application, which also involves a barcode
|
||||
reader and an SQL database.
|
||||
|
||||
Currently this resides in an RPM at:
|
||||
|
||||
http://engineering.nlsbph.org/repo/fedora/fedora/updates/27/SRPMS/AddressCard-3.17-LoC.fc27.src.rpm
|
||||
|
||||
but its not usable without the barcode reader and SQL database....
|
||||
For reasons which are not completely clear to me, he wants to use
|
||||
flushpage to update the display part way through the operation.
|
||||
|
||||
We suspect that it would be possible to avoid this, but it would
|
||||
probably require some programming effort on the users part, and since
|
||||
flushpage doesn't look like a likely candidate for abuse, we've decided
|
||||
just to restore it.
|
||||
---
|
||||
Resource/Init/gs_init.ps | 11 ++++++++++-
|
||||
1 file changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps
|
||||
index 491f0ea..eb4db02 100644
|
||||
--- a/Resource/Init/gs_init.ps
|
||||
+++ b/Resource/Init/gs_init.ps
|
||||
@@ -2162,7 +2162,7 @@ SAFER { .setsafeglobal } if
|
||||
/.type1execchar /.type2execchar /.type42execchar /.setweightvector /.getuseciecolor /processcolors /.includecolorspace
|
||||
/.execn /.instopped /.stop /.stopped /.setcolorrendering /.setdevicecolorrendering /.buildcolorrendering1 /.builddevicecolorrendering1
|
||||
/.TransformPQR_scale_WB0 /.TransformPQR_scale_WB1 /.TransformPQR_scale_WB2 /.currentoverprintmode /.copydevice2
|
||||
@ -10,7 +36,7 @@ diff -up ghostscript-9.22/Resource/Init/gs_init.ps.restore-flushpage ghostscript
|
||||
/makewordimagedevice /.outputpage /.putdeviceparams /.setdevice /.currentshowpagecount
|
||||
/.setpagedevice /.currentpagedevice /.knownundef /.setmaxlength /.rectappend /.initialize_dsc_parser /.parse_dsc_comments
|
||||
/.fillCIDMap /.fillIdentityCIDMap /.buildcmap /.filenamelistseparator /.libfile /.getfilename
|
||||
@@ -2181,6 +2181,15 @@ SAFER { .setsafeglobal } if
|
||||
@@ -2180,6 +2180,15 @@ SAFER { .setsafeglobal } if
|
||||
/.systemvmSFD /.settrapparams /.currentsystemparams /.currentuserparams /.getsystemparam /.getuserparam /.setsystemparams /.setuserparams
|
||||
/.checkpassword /.locale_to_utf8 /.currentglobal /.gcheck /.imagepath
|
||||
|
||||
@ -26,3 +52,6 @@ diff -up ghostscript-9.22/Resource/Init/gs_init.ps.restore-flushpage ghostscript
|
||||
% Used by our own test suite files
|
||||
%/.fileposition %image-qa.ps
|
||||
%/.makeoperator /.setCPSImode % gs_cet.ps
|
||||
--
|
||||
2.9.5
|
||||
|
4272
ghostscript-9.22-003-remove-obsolete-font-files.patch
Normal file
4272
ghostscript-9.22-003-remove-obsolete-font-files.patch
Normal file
File diff suppressed because it is too large
Load Diff
69
ghostscript-9.22-004-add-without-versioned-path-option.patch
Normal file
69
ghostscript-9.22-004-add-without-versioned-path-option.patch
Normal file
@ -0,0 +1,69 @@
|
||||
From 427fa24afbda44adafe96e74f1c7c350ca98dd73 Mon Sep 17 00:00:00 2001
|
||||
From: "David Kaspar [Dee'Kej]" <dkaspar@redhat.com>
|
||||
Date: Wed, 29 Nov 2017 16:42:45 +0100
|
||||
Subject: [PATCH] configure.ac: --without-versioned-path option introduced
|
||||
|
||||
Using this option will result in Ghostscript being installed into a
|
||||
paths which do not contain its version in them, which can be useful
|
||||
on some distributions.
|
||||
|
||||
As a result of using this option, the Ghostscript's search path will
|
||||
be updated as well, to include correct files locations.
|
||||
|
||||
This option is disabled by default, and configure's help page states
|
||||
that using this option is dangerous, risky and unsupported.
|
||||
---
|
||||
Makefile.in | 4 ++--
|
||||
configure.ac | 21 +++++++++++++++++++++
|
||||
2 files changed, 23 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index deed8e6..303a6b7 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -95,8 +95,8 @@ datadir = @datadir@
|
||||
# The following must be substituted using @datadir@ and @libdir@
|
||||
# to avoid adding RPM generation paths (CUPS STR #1112)
|
||||
gsdir = @datadir@/ghostscript
|
||||
-gsdatadir = $(gsdir)/$(GS_DOT_VERSION)
|
||||
-gssharedir = @libdir@/ghostscript/$(GS_DOT_VERSION)
|
||||
+gsdatadir = $(gsdir)@VERSIONED_PATH@
|
||||
+gssharedir = @libdir@/ghostscript@VERSIONED_PATH@
|
||||
gsincludedir = @includedir@/ghostscript/
|
||||
|
||||
docdir=$(gsdatadir)/doc
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index d0f62d7..5baa9e8 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2728,6 +2728,27 @@ fi
|
||||
|
||||
AC_SUBST(EXEEXT)
|
||||
|
||||
+# --------------------------------------------------
|
||||
+# Check for disabling of versioned path option.
|
||||
+# By default the versioned path must be enabled!
|
||||
+# Using this option is user's own risk & responsibility.
|
||||
+# --------------------------------------------------
|
||||
+AC_ARG_WITH([versioned-path],
|
||||
+[ --without-versioned-path
|
||||
+ Do not use file paths containing the version of GS.
|
||||
+
|
||||
+ WARNING: This option is dangerous & unsupported, and
|
||||
+ you take full responsibility for using it!],
|
||||
+versioned_path=no)
|
||||
+
|
||||
+if test "x$versioned_path" != "xno"; then
|
||||
+ VERSIONED_PATH='/$(GS_DOT_VERSION)'
|
||||
+else
|
||||
+ VERSIONED_PATH=''
|
||||
+fi
|
||||
+
|
||||
+AC_SUBST(VERSIONED_PATH)
|
||||
+
|
||||
|
||||
if test x"$CCAUX" != x"$CC"; then
|
||||
|
||||
--
|
||||
2.9.5
|
||||
|
70
ghostscript-9.22-005-fix-docdir-parameter.patch
Normal file
70
ghostscript-9.22-005-fix-docdir-parameter.patch
Normal file
@ -0,0 +1,70 @@
|
||||
From 3bbbbbfbaf543e47cbddf6a1932d84b10e26a082 Mon Sep 17 00:00:00 2001
|
||||
From: "David Kaspar [Dee'Kej]" <dkaspar@redhat.com>
|
||||
Date: Mon, 11 Dec 2017 19:11:04 +0100
|
||||
Subject: [PATCH] Makefile.in: enable --docdir= parameter to be working
|
||||
|
||||
Previously, the Ghostscript was using custom path to the documentation
|
||||
(as docdir=$(gsdatadir)/doc). This was causing that value of --docdir=
|
||||
parameter of ./configure was accepted, but not used at all.
|
||||
|
||||
This commit fixes this issue, by using docdir=@docdir@@VERSIONED_PATH@
|
||||
instead. However, as a side effect this results in default path for
|
||||
documentation to changed to this (with --prefix=/usr):
|
||||
|
||||
/usr/share/doc/ghostscript/<version>/
|
||||
|
||||
To stay backward compatible, a symlink is automatically created to
|
||||
point from the old location (/usr/share/ghostscript/<version>/doc) to
|
||||
the new location.
|
||||
|
||||
NOTE: Trying to fix this issue with the location of documentation
|
||||
staying as it was would require some hacking inside the Autoconf
|
||||
itself, which is not desirable.
|
||||
---
|
||||
Makefile.in | 3 ++-
|
||||
base/unixinst.mak | 1 +
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index a554b42..ebf64d8 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -23,6 +23,7 @@
|
||||
# source, generated intermediate file, and object directories
|
||||
# for the graphics library (GL) and the PostScript/PDF interpreter (PS).
|
||||
|
||||
+PACKAGE=ghostscript
|
||||
BINDIR=./$(BUILDDIRPREFIX)bin
|
||||
GLSRCDIR=@srcdir@/base
|
||||
DEVSRCDIR=@srcdir@/devices
|
||||
@@ -91,6 +92,7 @@ mandir = @mandir@
|
||||
man1ext = 1
|
||||
man1dir = $(mandir)/man$(man1ext)
|
||||
datadir = @datadir@
|
||||
+docdir = @docdir@@VERSIONED_PATH@
|
||||
|
||||
# The following must be substituted using @datadir@ and @libdir@
|
||||
# to avoid adding RPM generation paths (CUPS STR #1112)
|
||||
@@ -99,7 +101,6 @@ gsdatadir = $(gsdir)@VERSIONED_PATH@
|
||||
gssharedir = @libdir@/ghostscript@VERSIONED_PATH@
|
||||
gsincludedir = @includedir@/ghostscript/
|
||||
|
||||
-docdir=$(gsdatadir)/doc
|
||||
exdir=$(gsdatadir)/examples
|
||||
GS_DOCDIR=$(docdir)
|
||||
|
||||
diff --git a/base/unixinst.mak b/base/unixinst.mak
|
||||
index 296e9fa..5977396 100644
|
||||
--- a/base/unixinst.mak
|
||||
+++ b/base/unixinst.mak
|
||||
@@ -163,6 +163,7 @@ install-doc: $(PSDOCDIR)/News.htm
|
||||
$(SH) -c 'for f in $(DOC_PAGES) ;\
|
||||
do if ( test -f $(PSDOCDIR)/$$f ); then $(INSTALL_DATA) $(PSDOCDIR)/$$f $(DESTDIR)$(docdir); fi;\
|
||||
done'
|
||||
+ ln -s $(docdir) $(DESTDIR)$(gsdatadir)/doc
|
||||
|
||||
# install the man pages for each locale
|
||||
MAN_LCDIRS=. de
|
||||
--
|
||||
2.9.5
|
||||
|
31
ghostscript-9.22-006-do-not-install-examples-folder.patch
Normal file
31
ghostscript-9.22-006-do-not-install-examples-folder.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From cdbb6be090587d190a37e21869874254a373f1e3 Mon Sep 17 00:00:00 2001
|
||||
From: "David Kaspar [Dee'Kej]" <dkaspar@redhat.com>
|
||||
Date: Mon, 11 Dec 2017 17:27:39 +0100
|
||||
Subject: [PATCH] base/unixinst.mak: do not install examples/ by default
|
||||
anymore
|
||||
|
||||
Those files in the examples/ folder are for testing purposes,
|
||||
and not really good examples for people trying to learn PostScript.
|
||||
|
||||
However, we are keeping the 'make install-examples' target for people
|
||||
who still wishes to use those files for some reason.
|
||||
---
|
||||
base/unixinst.mak | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/base/unixinst.mak b/base/unixinst.mak
|
||||
index fcc1222..296e9fa 100644
|
||||
--- a/base/unixinst.mak
|
||||
+++ b/base/unixinst.mak
|
||||
@@ -78,7 +78,7 @@ PSDOCDIR=$(PSLIBDIR)/../doc
|
||||
PSEXDIR=$(PSLIBDIR)/../examples
|
||||
PSMANDIR=$(PSLIBDIR)/../man
|
||||
|
||||
-install-data: install-libdata install-resdata$(COMPILE_INITS) install-iccdata$(COMPILE_INITS) install-doc install-man install-examples
|
||||
+install-data: install-libdata install-resdata$(COMPILE_INITS) install-iccdata$(COMPILE_INITS) install-doc install-man
|
||||
|
||||
# There's no point in providing a complete dependency list: we include
|
||||
# one file from each subdirectory just as a sanity check.
|
||||
--
|
||||
2.9.5
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 32d8df77bf3326f708c13d6913547c01ce6d728c Mon Sep 17 00:00:00 2001
|
||||
From 45540902fa5e9d0d23974d1622cc2e96d6edb723 Mon Sep 17 00:00:00 2001
|
||||
From: "David Kaspar [Dee'Kej]" <dkaspar@redhat.com>
|
||||
Date: Fri, 7 Oct 2016 13:57:01 +0200
|
||||
Subject: [PATCH] Make sure 'dvipdf' is being run securely
|
||||
@ -18,5 +18,5 @@ index 802aeab..c92dfb0 100755
|
||||
-exec dvips -Ppdf $DVIPSOPTIONS -q -f "$infile" | $GS_EXECUTABLE $OPTIONS -q -P- -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sstdout=%stderr -sOutputFile="$outfile" $OPTIONS -c .setpdfwrite -
|
||||
+exec dvips -R -Ppdf $DVIPSOPTIONS -q -f "$infile" | $GS_EXECUTABLE $OPTIONS -q -P- -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sstdout=%stderr -sOutputFile="$outfile" $OPTIONS -c .setpdfwrite -
|
||||
--
|
||||
2.7.4
|
||||
2.9.5
|
||||
|
635
ghostscript.spec
635
ghostscript.spec
@ -1,298 +1,465 @@
|
||||
%define gs_ver 9.22
|
||||
%define gs_dot_ver 9.22
|
||||
%{expand: %%define build_with_freetype %{?_with_freetype:1}%{!?_with_freetype:0}}
|
||||
Summary: A PostScript interpreter and renderer
|
||||
Name: ghostscript
|
||||
Version: %{gs_ver}
|
||||
#
|
||||
# Important notes regarding the package:
|
||||
# ======================================
|
||||
# 1) This package has GUI versions (*-x11, *-gtk), but we are not shipping the
|
||||
# desktop files, because the GUI versions are used for displaying of files
|
||||
# invoked from command line. The displaying GUI does not contain any buttons
|
||||
# or other means for user interaction. It can't even open a different file
|
||||
# from the GUI version. Therefore it does not make sense to ship desktop
|
||||
# files...
|
||||
|
||||
Release: 3%{?dist}
|
||||
# === GLOBAL MACROS ===========================================================
|
||||
|
||||
# Included CMap data is Redistributable, no modification permitted,
|
||||
# see http://bugzilla.redhat.com/487510
|
||||
License: AGPLv3+ and Redistributable, no modification permitted
|
||||
URL: http://www.ghostscript.com/
|
||||
Group: Applications/Publishing
|
||||
Source0: ghostscript-9.22.tar.xz
|
||||
# According to Fedora Package Guidelines, it is advised that packages that can
|
||||
# process untrusted input are build with position-independent code (PIC).
|
||||
#
|
||||
# Koji should override the compilation flags and add the -fPIC or -fPIE flags by
|
||||
# default. This is here just in case this wouldn't happen for some reason.
|
||||
# For more info: https://fedoraproject.org/wiki/Packaging:Guidelines#PIE
|
||||
%global _hardened_build 1
|
||||
|
||||
Patch1: ghostscript-9.22-fix-Fontmap.GS.patch
|
||||
Patch2: ghostscript-9.20-run-dvipdf-securely.patch
|
||||
# Restore flushpage (xdvi also needs it)
|
||||
# http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=19ebb5f1f497b6f2d50fe13d17d3e627dfb6c868
|
||||
Patch3: ghostscript-9.22-restore-flushpage.patch
|
||||
# By redefining the '_docdir_fmt' macro we override the default location of
|
||||
# documentation or license files. Instead of them being located in 'libgs'
|
||||
# folder, they are now located in 'ghostscript'.
|
||||
%global _docdir_fmt %{name}
|
||||
|
||||
Requires: %{name}-core%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-x11%{?_isa} = %{version}-%{release}
|
||||
BuildRequires: xz
|
||||
BuildRequires: libjpeg-devel, libXt-devel
|
||||
BuildRequires: zlib-devel, libpng-devel, unzip, gtk3-devel
|
||||
BuildRequires: glib2-devel, gnutls-devel
|
||||
# Omni requires libxml
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: libtiff-devel
|
||||
BuildRequires: cups-devel >= 1.1.13
|
||||
BuildRequires: libtool
|
||||
BuildRequires: jasper-devel
|
||||
BuildRequires: dbus-devel
|
||||
BuildRequires: poppler-data
|
||||
BuildRequires: lcms2-devel >= 2.4-5
|
||||
BuildRequires: openjpeg2-devel
|
||||
%{?_with_freetype:BuildRequires: freetype-devel}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{gs_ver}-root
|
||||
# NOTE: Artifex is using Github only as a mirror for providing the source
|
||||
# tarballs, and their release tags/branches do not use the dot in version
|
||||
# tag. This makes obtaining the current version harder, and might prevent
|
||||
# automatic builds of new releases...
|
||||
%global version_short %(echo "%{version}" | tr -d '.')
|
||||
|
||||
# Starting version of new sup-package layout scheme for Ghostscript, which is
|
||||
# conflicting with the previous sup-package layout scheme.
|
||||
#
|
||||
# NOTE: Remove this once F28 is EOL.
|
||||
%global conflicts_vers 9.22-4
|
||||
|
||||
# Obtain the location of Google Droid fonts directory:
|
||||
%global google_droid_fontpath %%(dirname $(fc-list : file | grep "DroidSansFallback"))
|
||||
|
||||
# =============================================================================
|
||||
|
||||
Name: ghostscript
|
||||
Summary: Interpreter for PostScript language & PDF
|
||||
Version: 9.22
|
||||
Release: 4%{?dist}
|
||||
|
||||
License: AGPLv3+
|
||||
|
||||
URL: https://ghostscript.com/
|
||||
Source: https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs%{version_short}/ghostscript-%{version}.tar.xz
|
||||
|
||||
# NOTE: The 'dvipdf' utility in 'ghostscript' package invokes 'dvips'.
|
||||
Requires: texlive-dvips
|
||||
Requires: libgs%{?_isa} = %{version}-%{release}
|
||||
|
||||
# Auxiliary build requirements:
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: git
|
||||
|
||||
# Already packaged Resources -- needed to build package correctly:
|
||||
BuildRequires: adobe-mappings-cmap-devel
|
||||
BuildRequires: adobe-mappings-pdf-devel
|
||||
BuildRequires: google-droid-sans-fonts
|
||||
BuildRequires: urw-base35-fonts-devel
|
||||
|
||||
# Already packaged software -- needed for debundling of Ghostscript:
|
||||
BuildRequires: cups-devel
|
||||
BuildRequires: dbus-devel
|
||||
BuildRequires: fontconfig-devel
|
||||
BuildRequires: freetype-devel
|
||||
BuildRequires: jbig2dec-devel
|
||||
BuildRequires: lcms2-devel
|
||||
BuildRequires: libidn-devel
|
||||
BuildRequires: libijs-devel
|
||||
BuildRequires: libjpeg-turbo-devel
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: libpaper-devel
|
||||
BuildRequires: libtiff-devel
|
||||
BuildRequires: openjpeg2-devel
|
||||
BuildRequires: zlib-devel
|
||||
|
||||
# Enabling the GUI possibilities of Ghostscript:
|
||||
BuildRequires: gtk3-devel
|
||||
BuildRequires: libXt-devel
|
||||
|
||||
# =============================================================================
|
||||
|
||||
# NOTE: 'autosetup' macro (below) uses 'git' for applying the patches:
|
||||
# ->> All the patches should be provided in 'git format-patch' format.
|
||||
# ->> Auxiliary repository will be created during 'fedpkg prep', you
|
||||
# can see all the applied patches there via 'git log'.
|
||||
|
||||
# Upstream patches -- official upstream patches released by upstream since the
|
||||
# ---------------- last rebase that are necessary for any reason:
|
||||
Patch000: ghostscript-9.22-000-convert-de-man-pages-to-UTF-8.patch
|
||||
Patch001: ghostscript-9.22-001-fix-Fontmap.GS.patch
|
||||
Patch002: ghostscript-9.22-002-restore-flushpage-operator.patch
|
||||
Patch003: ghostscript-9.22-003-remove-obsolete-font-files.patch
|
||||
Patch004: ghostscript-9.22-004-add-without-versioned-path-option.patch
|
||||
Patch005: ghostscript-9.22-005-fix-docdir-parameter.patch
|
||||
Patch006: ghostscript-9.22-006-do-not-install-examples-folder.patch
|
||||
|
||||
|
||||
# Downstream patches -- these should be always included when doing rebase:
|
||||
# ------------------
|
||||
Patch100: ghostscript-9.22-100-run-dvipdf-securely.patch
|
||||
|
||||
|
||||
# Downstream patches for RHEL -- patches that we keep only in RHEL for various
|
||||
# --------------------------- reasons, but are not enabled in Fedora:
|
||||
%if %{defined rhel} || %{defined centos}
|
||||
#Patch200: example200.patch
|
||||
%endif
|
||||
|
||||
|
||||
# Patches to be removed -- deprecated functionality which shall be removed at
|
||||
# --------------------- some point in the future:
|
||||
|
||||
# See bug #83516.
|
||||
Conflicts: ttfonts-ja < 1.2-23
|
||||
Conflicts: ttfonts-ko < 1.0.11-27
|
||||
Conflicts: ttfonts-zh_CN < 2.12-2
|
||||
Conflicts: ttfonts-zh_TW < 2.11-20
|
||||
|
||||
%description
|
||||
Ghostscript is a set of software that provides a PostScript
|
||||
interpreter, a set of C procedures (the Ghostscript library, which
|
||||
implements the graphics capabilities in the PostScript language) and
|
||||
an interpreter for Portable Document Format (PDF) files. Ghostscript
|
||||
translates PostScript code into many common, bitmapped formats, like
|
||||
those understood by your printer or screen. Ghostscript is normally
|
||||
used to display PostScript files and to print PostScript files to
|
||||
non-PostScript printers.
|
||||
This package provides useful conversion utilities based on Ghostscript software,
|
||||
for converting PS, PDF and other document formats between each other.
|
||||
|
||||
If you need to display PostScript files or print them to
|
||||
non-PostScript printers, you should install ghostscript. If you
|
||||
install ghostscript, you also need to install the urw-base35-fonts
|
||||
package.
|
||||
Ghostscript is a suite of software providing an interpreter for Adobe Systems'
|
||||
PostScript (PS) and Portable Document Format (PDF) page description languages.
|
||||
Its primary purpose includes displaying (rasterization & rendering) and printing
|
||||
of document pages, as well as conversions between different document formats.
|
||||
|
||||
%package devel
|
||||
Summary: Files for developing applications that use ghostscript
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Group: Development/Libraries
|
||||
# === SUBPACKAGES =============================================================
|
||||
|
||||
%description devel
|
||||
The header files for developing applications that use ghostscript.
|
||||
# Below requirements are resources, which are not detected by RPM automatically:
|
||||
%package -n libgs
|
||||
Summary: Library providing Ghostcript's core functionality
|
||||
Requires: adobe-mappings-cmap
|
||||
Requires: adobe-mappings-cmap-deprecated
|
||||
Requires: adobe-mappings-pdf
|
||||
Requires: google-droid-sans-fonts
|
||||
Requires: urw-base35-fonts
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for ghostscript
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Group: Documentation
|
||||
BuildArch: noarch
|
||||
# FIXME: Remove the line below once F28 is EOL.
|
||||
Conflicts: %{name}-core%{?_isa} < %{conflicts_vers}
|
||||
|
||||
%description doc
|
||||
The documentation files that come with ghostscript.
|
||||
%description -n libgs
|
||||
This library provides Ghostscript's core functionality, based on Ghostscript's
|
||||
API, which is useful for many packages that are build on top of Ghostscript.
|
||||
|
||||
%package x11
|
||||
Summary: The X11 driver for Ghostscript
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Group: Applications/Publishing
|
||||
# ---------------
|
||||
|
||||
%description x11
|
||||
%package -n libgs-devel
|
||||
Summary: Development files for Ghostscript's library
|
||||
Requires: libgs%{?_isa} = %{version}-%{release}
|
||||
|
||||
The X11 driver for Ghostscript.
|
||||
# This virtual provides is useful in case people get confused what *-devel
|
||||
# subpackage they should actually use (i.e. ghostscript-devel vss libgs-devel?).
|
||||
# By having this virtual provide both of the options above will work...
|
||||
Provides: %{name}-devel = %{version}-%{release}
|
||||
|
||||
%package core
|
||||
Summary: Parts of Ghostscript which do not require X11
|
||||
Requires: urw-base35-fonts
|
||||
Requires: poppler-data
|
||||
Group: Applications/Publishing
|
||||
# FIXME: Remove the lines below once F28 is EOL.
|
||||
Provides: %{name}-devel%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description core
|
||||
The parts of Ghostscript which do not require X11.
|
||||
Conflicts: %{name}-devel%{?_isa} < %{conflicts_vers}
|
||||
Conflicts: %{name}-devel < %{conflicts_vers}
|
||||
|
||||
Obsoletes: %{name}-devel%{?_isa} < %{conflicts_vers}
|
||||
Obsoletes: %{name}-devel < %{conflicts_vers}
|
||||
|
||||
%description -n libgs-devel
|
||||
This package contains development files that are useful for building packages
|
||||
against Ghostscript's library, which provides Ghostscript's core functionality.
|
||||
|
||||
# ---------------
|
||||
|
||||
%package tools-fonts
|
||||
Summary: Ghostscript's font utilities
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description tools-fonts
|
||||
This package provides utilities which are useful when you are working with AFM,
|
||||
PFB or PFA files, mostly for conversion purposes.
|
||||
|
||||
# ---------------
|
||||
|
||||
%package tools-printing
|
||||
Summary: Ghostscript's printing utilities
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description tools-printing
|
||||
This package provides utilities for formatting and printing text files using
|
||||
either Ghostscript, or BubbleJet, DeskJet, DeskJet 500, and LaserJet printers.
|
||||
|
||||
It also provides the utility 'pphs', which is useful for printing of Primary
|
||||
Hint Stream of a linearized PDF file.
|
||||
|
||||
# ---------------
|
||||
|
||||
%package gtk
|
||||
Summary: A GTK-enabled PostScript interpreter and renderer
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Group: Applications/Publishing
|
||||
Summary: Ghostscript's GTK-based document renderer
|
||||
Requires: libgs%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description gtk
|
||||
A GTK-enabled version of Ghostscript, called 'gsx'.
|
||||
This package provides GTK-based utility 'gsx', which can be used for displaying
|
||||
of various document files (including PS and PDF).
|
||||
|
||||
# ---------------
|
||||
|
||||
%package x11
|
||||
Summary: Ghostscript's X11-based driver for document rendering
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description x11
|
||||
This package provides X11-based driver for Ghostscript, which enables displaying
|
||||
of various document files (including PS and PDF).
|
||||
|
||||
# ---------------
|
||||
|
||||
%package doc
|
||||
Summary: Documentation files for Ghostscript
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
|
||||
%description doc
|
||||
This package provides detailed documentation files for Ghostscript software.
|
||||
|
||||
# ---------------
|
||||
|
||||
# FIXME: Remove this subpackage once F28 is EOL.
|
||||
%package core
|
||||
Summary: Temporary meta-package for Ghostscript upgrade
|
||||
|
||||
Requires: libgs%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-tools-fonts%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-tools-printing%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description core
|
||||
This meta-package will install all dependencies of previous 'ghostscript-core'
|
||||
package, which is necessary to enable smooth upgrade to new package scheme.
|
||||
|
||||
It will be removed once the Fedora 28 has reached EOL (End Of Life).
|
||||
|
||||
# === BUILD INSTRUCTIONS ======================================================
|
||||
|
||||
# Call the 'autosetup' macro to prepare the environment, but do not patch the
|
||||
# source code yet -- we need to remove bundled software before the build first:
|
||||
%prep
|
||||
%setup -q -n %{name}-%{gs_ver}
|
||||
rm -rf expat freetype icclib jasper jpeg jpegxr lcms lcms2 libpng openjpeg zlib cups/libs
|
||||
%autosetup -N -S git
|
||||
|
||||
# Fix the Fontmap.GS having wrong /Fontname for Helvetica-Narrow-Bold-Oblique:
|
||||
%patch1 -p1
|
||||
# Libraries that we already have packaged in Fedora (see Build Requirements):
|
||||
rm -rf cups/libs freetype ijs jbig2dec jpeg lcms2 libpng openjpeg tiff zlib
|
||||
|
||||
# Fix some shell scripts
|
||||
%patch2 -p1
|
||||
# Yeah, not actually needed in Fedora (^_^):
|
||||
rm -rf windows
|
||||
|
||||
# Restore flushpage
|
||||
%patch3 -p1
|
||||
# Add the remaining source code to the initial commit, patch the source code:
|
||||
git add --all --force .
|
||||
git commit --all --amend --no-edit > /dev/null
|
||||
%autopatch -p1
|
||||
|
||||
# Convert manual pages to UTF-8
|
||||
from8859_1() {
|
||||
iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_"
|
||||
mv "${1}_" "$1"
|
||||
}
|
||||
for i in man/de/*.1; do
|
||||
if [ "$(file --brief --mime-encoding "$i")" = iso-8859-1 ]; then
|
||||
from8859_1 "$i"
|
||||
fi
|
||||
done
|
||||
|
||||
# Convert ps files to UTF-8
|
||||
for i in examples/cjk/gsc*.ps; do from8859_1 "$i"; done
|
||||
# ---------------
|
||||
|
||||
%build
|
||||
# Compile without strict aliasing opts due to these files:
|
||||
# gdevescv.c gdevl4v.c gdevopvp.c gdevbbox.c gdevdbit.c gdevddrw.c
|
||||
# gdevp14.c gdevpdfd.c gdevpdfi.c gdevpdfo.c gdevpdft.c gdevpdfv.c
|
||||
# gdevpdte.c gdevpdtt.c gdevps.c gdevpx.c gscoord.c gscparam.c gscrd.c
|
||||
# gsdps1.c gsimage.c gspath1.c gsptype1.c gsptype2.c gstype2.c
|
||||
# gstype42.c gxccache.c gxchar.c gxclimag.c gxclpath.c gxfcopy.c
|
||||
# gximag3x.c gximage3.c gxipixel.c gxshade1.c gxstroke.c gxtype1.c
|
||||
# ibnum.c iscanbin.c zchar1.c zchar.c zcharx.c zfapi.c zfont32.c
|
||||
# zfunc0.c zfunc3.c zfunc4.c zpcolor.c zshade.c
|
||||
EXTRACFLAGS="-fno-strict-aliasing"
|
||||
# We need to rebuild the ./configure script (we have patched configure.ac file):
|
||||
autoreconf -fv
|
||||
|
||||
FONTPATH=
|
||||
for path in \
|
||||
%{_datadir}/fonts/urw-base35/ \
|
||||
%{_datadir}/fonts/ \
|
||||
%{_datadir}/%{name}/conf.d \
|
||||
%{_datadir}/poppler/cMap/*
|
||||
do
|
||||
FONTPATH="$FONTPATH${FONTPATH:+:}$path"
|
||||
done
|
||||
rm -f ijs/ltmain.sh
|
||||
autoreconf -fiv
|
||||
%configure --with-ijs --enable-dynamic --with-fontpath="$FONTPATH" \
|
||||
--with-drivers=ALL --disable-compile-inits --with-system-libtiff \
|
||||
--with-install-cups \
|
||||
CFLAGS="$CFLAGS $EXTRACFLAGS"
|
||||
# --enable-dynamic
|
||||
# ... enables dynamically loaded drivers
|
||||
#
|
||||
# --disable-compile-inits
|
||||
# ... disables compiling of init files (PS code, fonts, etc.) into resulting
|
||||
# binaries, so they are loaded dynamically
|
||||
#
|
||||
# --without-versioned-path
|
||||
# ... tells configure to not use version string in the resulting paths after
|
||||
# 'make_install' macro - this is safe, because only one version of
|
||||
# package can be installed at a given time on Fedora distribution,
|
||||
# so we won't end up with conflicting folders when doing rebase
|
||||
#
|
||||
# --with-fonthpath
|
||||
# ... searches for necessary fonts in these column-separated directories,
|
||||
# not just default ones
|
||||
#
|
||||
# -fno-strict-aliasing
|
||||
# ... according to upstream, strict aliasing optimization (enabled by
|
||||
# default with -O2 option) still causes parts of Ghostscript to
|
||||
# malfunction, so we need to disable this optimization technique
|
||||
%configure --enable-dynamic --disable-compile-inits --without-versioned-path \
|
||||
--with-fontpath="%{urw_base35_fontpath}:%{google_droid_fontpath}" \
|
||||
CFLAGS="${CFLAGS} -fno-strict-aliasing"
|
||||
|
||||
# Build IJS
|
||||
cd ijs
|
||||
./autogen.sh
|
||||
%configure --enable-shared --disable-static
|
||||
make
|
||||
cd ..
|
||||
%make_build so
|
||||
|
||||
%if %{build_with_freetype}
|
||||
FT_CFLAGS=$(pkg-config --cflags freetype2)
|
||||
make so RPM_OPT_FLAGS="$RPM_OPT_FLAGS $EXTRACFLAGS" prefix=%{_prefix} \
|
||||
FT_BRIDGE=1 FT_CFLAGS="$FT_CFLAGS" FT_LIB=freetype
|
||||
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS $EXTRACFLAGS" prefix=%{_prefix} \
|
||||
FT_BRIDGE=1 FT_CFLAGS="$FT_CFLAGS" FT_LIB=freetype
|
||||
%else
|
||||
make so RPM_OPT_FLAGS="$RPM_OPT_FLAGS $EXTRACFLAGS" prefix=%{_prefix}
|
||||
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS $EXTRACFLAGS" prefix=%{_prefix}
|
||||
%endif
|
||||
make cups
|
||||
# ---------------
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
mkdir -p $RPM_BUILD_ROOT
|
||||
mkdir -p $RPM_BUILD_ROOT/{%{_mandir},%{_bindir},%{_datadir},%{_docdir}}
|
||||
mkdir -p $RPM_BUILD_ROOT/{%{_libdir},%{_includedir}/ijs}
|
||||
# Using the 'make_install' macro with 'soinstall' target would result in some
|
||||
# files being installed unnecessary, so we are using traditional way:
|
||||
make DESTDIR=%{buildroot} soinstall
|
||||
|
||||
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`
|
||||
# Remove files that we do not want ship / support:
|
||||
# ------------------------------------------------
|
||||
# LPR-related scripts:
|
||||
rm -f %{buildroot}%{_bindir}/{lprsetup.sh,unix-lpr.sh}
|
||||
|
||||
mv -f $RPM_BUILD_ROOT%{_bindir}/gsc $RPM_BUILD_ROOT%{_bindir}/gs
|
||||
# Rename the dynamic binary to be used by default as 'gs' binary.
|
||||
mv -f %{buildroot}%{_bindir}/{gsc,gs}
|
||||
|
||||
cd ijs
|
||||
%makeinstall
|
||||
cd ..
|
||||
# Remove useless files from doc/ directory and doc/ symlink:
|
||||
rm -f %{buildroot}%{_docdir}/%{name}/{AUTHORS,COPYING,*.tex,*.hlp,*.txt}
|
||||
rm -f %{buildroot}%{_datadir}/%{name}/doc
|
||||
|
||||
echo ".so man1/gs.1" > $RPM_BUILD_ROOT/%{_mandir}/man1/ghostscript.1
|
||||
ln -sf gs $RPM_BUILD_ROOT%{_bindir}/ghostscript
|
||||
# ---------------
|
||||
|
||||
# Documentation
|
||||
install -m0644 doc/COPYING $RPM_BUILD_ROOT%{_docdir}/%{name}-%{gs_dot_ver}
|
||||
# Move html documentation into html/ subdir:
|
||||
install -m 0755 -d %{buildroot}%{_docdir}/%{name}/html
|
||||
mv -f %{buildroot}%{_docdir}/%{name}/{*.htm*,*.css,*.el,html}
|
||||
|
||||
# Don't ship libtool la files.
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/libijs.la
|
||||
# ---------------
|
||||
|
||||
# Don't ship ijs example client or server
|
||||
rm -f $RPM_BUILD_ROOT%{_bindir}/ijs_{client,server}_example
|
||||
# Create 'ghostscript' symlink for its binary:
|
||||
ln -s %{_bindir}/gs %{buildroot}%{_bindir}/ghostscript
|
||||
|
||||
# Don't ship URW fonts; we already have them.
|
||||
rm -rf $RPM_BUILD_ROOT%{_datadir}/ghostscript/%{gs_dot_ver}/Resource/Font
|
||||
# Create a man page symlink for 'ghostscript':
|
||||
ln -s %{_mandir}/man1/gs.1 %{buildroot}%{_mandir}/man1/ghostscript.1
|
||||
|
||||
# The man/de/man1 symlinks are broken (bug #66238).
|
||||
find $RPM_BUILD_ROOT%{_mandir}/de/man1 -type l | xargs rm -f
|
||||
# ---------------
|
||||
|
||||
# Don't ship fixmswrd.pl as it pulls in perl (bug #463948).
|
||||
rm -f $RPM_BUILD_ROOT%{_bindir}/fixmswrd.pl
|
||||
# According to upstream, using fontconfig for fonts lookup is quite a slow
|
||||
# process for Ghostscript startup, and they advise using the symlinks where
|
||||
# possible. The fontconfig (Ghostscript's search path) should be used preferably
|
||||
# as a fallback only.
|
||||
ln -fs %{google_droid_fontpath}/DroidSansFallback.ttf %{buildroot}%{_datadir}/%{name}/Resource/CIDFSubst/DroidSansFallback.ttf
|
||||
|
||||
# Don't ship CMaps (instead poppler-data paths are in search path).
|
||||
rm -f $RPM_BUILD_ROOT%{_datadir}/ghostscript/%{gs_dot_ver}/Resource/CMap/*
|
||||
for font in $(basename --multiple %{buildroot}%{_datadir}/%{name}/Resource/Font/*); do
|
||||
ln -fs %{urw_base35_fontpath}/${font}.t1 %{buildroot}%{_datadir}/%{name}/Resource/Font/${font}
|
||||
done
|
||||
|
||||
MAIN_PWD=`pwd`
|
||||
(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)
|
||||
# Using the system-wide available CMap files from Adobe via Ghostscript's search
|
||||
# path is not safe (nor was ever intended to be supported) way of doing so
|
||||
# according to upstream. Their preferred solution is to just create symlink for
|
||||
# each of the CMap files in Ghostscript's Resources/CMap folder.
|
||||
for file in $(basename --multiple %{buildroot}%{_datadir}/%{name}/Resource/CMap/*); do
|
||||
find %{adobe_mappings_rootpath} -type f -name ${file} -exec ln -fs {} %{buildroot}%{_datadir}/%{name}/Resource/CMap/${file} \;
|
||||
done
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
# === INSTALLATION INSTRUCTIONS ===============================================
|
||||
|
||||
%post core -p /sbin/ldconfig
|
||||
%post -n libgs -p /sbin/ldconfig
|
||||
%postun -n libgs -p /sbin/ldconfig
|
||||
|
||||
%postun core -p /sbin/ldconfig
|
||||
%post -n libgs-devel -p /sbin/ldconfig
|
||||
%postun -n libgs-devel -p /sbin/ldconfig
|
||||
|
||||
# === PACKAGING INSTRUCTIONS ==================================================
|
||||
|
||||
%files -n libgs
|
||||
%license LICENSE doc/COPYING
|
||||
|
||||
%files core -f rpm.sharelist
|
||||
%defattr(-,root,root)
|
||||
%dir %{_datadir}/ghostscript/%{gs_dot_ver}
|
||||
%dir %{_datadir}/ghostscript/%{gs_dot_ver}/Resource
|
||||
%dir %{_datadir}/ghostscript/%{gs_dot_ver}/Resource/Init
|
||||
%config %{_datadir}/ghostscript/%{gs_dot_ver}/Resource/Init/gs_init.ps
|
||||
%config %{_datadir}/ghostscript/%{gs_dot_ver}/Resource/Init/Fontmap*
|
||||
%dir %{_datadir}/ghostscript/%{gs_dot_ver}/Resource/CMap
|
||||
%dir %{_datadir}/ghostscript/%{gs_dot_ver}/Resource/CIDFont
|
||||
%dir %{_datadir}/ghostscript/%{gs_dot_ver}/Resource/CIDFSubst
|
||||
%dir %{_datadir}/ghostscript/%{gs_dot_ver}/Resource/ColorSpace
|
||||
%dir %{_datadir}/ghostscript/%{gs_dot_ver}/Resource/Decoding
|
||||
%dir %{_datadir}/ghostscript/%{gs_dot_ver}/Resource/Encoding
|
||||
%dir %{_datadir}/ghostscript/%{gs_dot_ver}/Resource/IdiomSet
|
||||
%dir %{_datadir}/ghostscript/%{gs_dot_ver}/Resource/SubstCID
|
||||
%{_datadir}/ghostscript/%{gs_dot_ver}/lib
|
||||
%{_datadir}/ghostscript/%{gs_dot_ver}/iccprofiles
|
||||
%{_mandir}/man*/*
|
||||
%lang(de) %{_mandir}/de/man*/*
|
||||
%{_libdir}/libgs.so.*
|
||||
%{_libdir}/libijs-*.so*
|
||||
%dir %{_libdir}/%{name}
|
||||
%dir %{_libdir}/%{name}/%{gs_dot_ver}
|
||||
%{_datadir}/%{name}/
|
||||
|
||||
# ---------------
|
||||
|
||||
%files -n libgs-devel
|
||||
%{_libdir}/libgs.so
|
||||
%{_includedir}/%{name}/
|
||||
|
||||
# ---------------
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/gs
|
||||
%{_bindir}/gsnd
|
||||
%{_bindir}/ghostscript
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root)
|
||||
%doc %{_datadir}/ghostscript/%{gs_dot_ver}/examples
|
||||
%doc %{_docdir}/%{name}-%{gs_dot_ver}
|
||||
# Useful conversion scripts:
|
||||
%{_bindir}/dvipdf
|
||||
%{_bindir}/eps2*
|
||||
%{_bindir}/pdf2*
|
||||
%{_bindir}/ps2*
|
||||
|
||||
%{_mandir}/man1/gs.1*
|
||||
%{_mandir}/man1/gsnd*
|
||||
%{_mandir}/man1/ghostscript*
|
||||
%{_mandir}/man1/dvipdf*
|
||||
%{_mandir}/man1/eps2*
|
||||
%{_mandir}/man1/pdf2*
|
||||
%{_mandir}/man1/ps2*
|
||||
|
||||
%lang(de) %{_mandir}/de/man1/gsnd*
|
||||
%lang(de) %{_mandir}/de/man1/dvipdf*
|
||||
%lang(de) %{_mandir}/de/man1/eps2*
|
||||
%lang(de) %{_mandir}/de/man1/pdf2*
|
||||
%lang(de) %{_mandir}/de/man1/ps2*
|
||||
|
||||
# ---------------
|
||||
|
||||
%files tools-fonts
|
||||
%{_bindir}/pf2afm
|
||||
%{_bindir}/pfbtopfa
|
||||
%{_bindir}/printafm
|
||||
|
||||
%{_mandir}/man1/pf2afm*
|
||||
%{_mandir}/man1/pfbtopfa*
|
||||
%{_mandir}/man1/printafm*
|
||||
|
||||
%lang(de) %{_mandir}/de/man1/printafm*
|
||||
|
||||
# ---------------
|
||||
|
||||
%files tools-printing
|
||||
%{_bindir}/gsbj
|
||||
%{_bindir}/gsdj
|
||||
%{_bindir}/gsdj500
|
||||
%{_bindir}/gslj
|
||||
%{_bindir}/gslp
|
||||
%{_bindir}/pphs
|
||||
|
||||
%{_mandir}/man1/gsbj*
|
||||
%{_mandir}/man1/gsdj*
|
||||
%{_mandir}/man1/gslj*
|
||||
%{_mandir}/man1/gslp*
|
||||
|
||||
# ---------------
|
||||
|
||||
%files gtk
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/gsx
|
||||
|
||||
%files x11
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/%{name}/%{gs_dot_ver}/X11.so
|
||||
# ---------------
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%dir %{_includedir}/ghostscript
|
||||
%{_includedir}/ghostscript/*.h
|
||||
%dir %{_includedir}/ijs
|
||||
%{_includedir}/ijs/*
|
||||
%{_libdir}/pkgconfig/ijs.pc
|
||||
%{_libdir}/libijs.so
|
||||
%{_libdir}/libgs.so
|
||||
%files x11
|
||||
%{_libdir}/%{name}/
|
||||
|
||||
# ---------------
|
||||
|
||||
%files doc
|
||||
%doc %{_docdir}/%{name}/
|
||||
|
||||
# ---------------
|
||||
|
||||
%files core
|
||||
|
||||
# =============================================================================
|
||||
|
||||
%changelog
|
||||
* Mon Dec 04 2017 David Kaspar [Dee'Kej] <dkaspar@redhat.com> - 9.22-2
|
||||
* Tue Jan 09 2018 David Kaspar [Dee'Kej] <dkaspar@redhat.com> - 9.22-4
|
||||
- complete cleanup in ghostscript specfile according to FPG
|
||||
- libgs -- new separate package (Ghostscript library)
|
||||
- libgs-devel -- new separate subpackage (devel files for Ghostscript library)
|
||||
- libijs -- now shipped as a separate package on Pagure
|
||||
- ghostscript-tools-fonts -- new subpackage
|
||||
- ghostscript-tools-printing -- new subpackage
|
||||
- ghostscript-core -- changed to transitional metapackage
|
||||
- package is now completely debundled from already packaged software/resources
|
||||
- versioned paths for documentation, resources, etc. are no longer used
|
||||
- LPR setup scripts removed (no longer shipped)
|
||||
- added symlinks for direct resources location to speedup Ghostscript startup times
|
||||
- Ghostscript's search path updated to include only fonts locations as a backup
|
||||
- support for /usr/share/ghostscript/conf.d dropped (using Google Droid Sans Fallback instead)
|
||||
- examples/ folder dropped from *-doc subpackage
|
||||
|
||||
* Mon Dec 04 2017 David Kaspar [Dee'Kej] <dkaspar@redhat.com> - 9.22-3
|
||||
- Fontmap.GS lookup path for Helvetica-Narrow-Bold-Oblique font fixed (bug #1517518)
|
||||
|
||||
* Wed Nov 29 2017 Tom Callaway <spot@fedoraproject.org> - 9.22-2
|
||||
|
Loading…
Reference in New Issue
Block a user