/[packages]/cauldron/ghostscript/current/SPECS/ghostscript.spec
ViewVC logotype

Annotation of /cauldron/ghostscript/current/SPECS/ghostscript.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1579003 - (hide annotations) (download)
Mon May 4 08:26:50 2020 UTC (4 weeks, 4 days ago) by ovitters
File size: 13457 byte(s)
SILENT change make macro to make_build
1 luigiwalser 289699 %define _disable_ld_no_undefined 1
2 blino 19330
3 kekepower 1556090 %define rel 1
4 wally 1251180
5 kekepower 1558034 %define gsverdir 952
6     %define gsver 9.52
7 blino 19330 %define ijsver 0.35
8 kekepower 1556145 # This is the offset of the previous version. Seems like the BS
9     # increases this automatically
10 kekepower 1558034 %define ijsreloffset 154
11 luigiwalser 289742 %define ijsrelno %(echo $((%{rel} + %{ijsreloffset})))
12     %define ijsrel %mkrel %{ijsrelno}
13 luigiwalser 289699
14 blino 19330 %define ijsmajor 1
15     %define libijs %mklibname ijs %{ijsmajor}
16 luigiwalser 289699 %define libijs_devel %mklibname -d ijs
17    
18 blino 19330 %define gsmajor 9
19     %define libgs %mklibname gs %{gsmajor}
20 luigiwalser 289699 %define libgs_devel %mklibname -d gs
21 blino 19330
22 luigiwalser 289699 %define bootstrap 0
23 blino 19330
24     %define GSx11SVGAmodule 1
25    
26     Summary: PostScript/PDF interpreter and renderer (Main executable)
27     Name: ghostscript
28 luigiwalser 289699 Version: %{gsver}
29 luigiwalser 289700 Release: %mkrel %{rel}
30 blino 443665 License: AGPLv3+
31 blino 19330 Group: Publishing
32 luigiwalser 1020958 URL: http://www.ghostscript.com/
33 ns80 1180067 Source0: https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs%gsverdir/ghostscript-%gsver.tar.xz
34 luigiwalser 289699 Source2: ps2pdfpress.bz2
35     Source3: http://www.linuxprinting.org/download/printing/sipixa6.upp.bz2
36 blino 19330
37 akien 1043163 # Don't define static openjpeg2, breaks linking
38 ns80 1556191 Patch0: ghostscript-9.51-openjpeg2-non-static.patch
39 luigiwalser 289699 # Fix some shell scripts
40 luigiwalser 1386226 Patch1: ghostscript-scripts.patch
41 luigiwalser 289699 # Build igcref.c with -O0 to work around bug #150771.
42 luigiwalser 1386226 Patch2: ghostscript-noopt.patch
43 luigiwalser 289699 # Define .runlibfileifexists.
44 luigiwalser 1386226 Patch3: ghostscript-runlibfileifexists.patch
45 luigiwalser 289699 # Restored Fontmap.local patch, incorrectly dropped after
46     # ghostscript-8.15.4-3 (bug #610301).
47     # Note: don't use -b here to avoid the backup file ending up in the
48     # package manifest.
49 luigiwalser 1386226 Patch4: ghostscript-Fontmap.local.patch
50 blino 19330
51 luigiwalser 289699 %if !%{bootstrap}
52 daviddavid 1430046 BuildRequires: pkgconfig(gtk+-3.0)
53 luigiwalser 289699 BuildRequires: cups-devel
54 ovitters 1144441 BuildRequires: pkgconfig(fontconfig)
55 luigiwalser 289699 %endif
56 blino 19330 BuildRequires: bison
57     BuildRequires: flex
58 luigiwalser 289699 BuildRequires: libtool
59     BuildRequires: unzip
60 blino 19330 BuildRequires: gettext-devel
61     BuildRequires: glibc-devel
62 ns80 1457922 BuildRequires: jbig2dec-devel >= 0.17
63 ovitters 1144441 BuildRequires: pkgconfig(libjpeg)
64 blino 19330 BuildRequires: libpaper-devel
65 luigiwalser 289699 BuildRequires: netpbm-devel
66 ovitters 1144441 BuildRequires: pkgconfig(libtiff-4)
67 luigiwalser 289699 BuildRequires: pkgconfig(freetype2)
68     BuildRequires: pkgconfig(ice)
69     BuildRequires: pkgconfig(jasper)
70 blino 444063 BuildRequires: pkgconfig(lcms2) >= 2.5
71 luigiwalser 289699 BuildRequires: pkgconfig(libidn)
72 luigiwalser 907481 BuildRequires: pkgconfig(libopenjp2)
73 fwang 434650 BuildRequires: pkgconfig(libpng)
74 luigiwalser 289699 BuildRequires: pkgconfig(libxml-2.0)
75     BuildRequires: pkgconfig(sm)
76     BuildRequires: pkgconfig(x11)
77     BuildRequires: pkgconfig(xext)
78     BuildRequires: pkgconfig(xt)
79     BuildRequires: pkgconfig(zlib)
80 blino 19330
81     Requires: ghostscript-common
82     Requires: update-alternatives
83 luigiwalser 289699 %if !%{GSx11SVGAmodule}
84     %rename ghostscript-module-X ghostscript-module-SVGALIB
85 blino 19330 %endif
86    
87     %description
88     Ghostscript is a set of software tools that provide a PostScript(TM)
89     interpreter, a set of C procedures (the Ghostscript library, which
90     implements the graphics capabilities in the PostScript language) and
91     an interpreter for Portable Document Format (PDF) files. Ghostscript
92     translates PostScript code into many common, bitmapped and vector
93     formats, like those understood by your printer or screen. Ghostscript
94     is normally used to display PostScript files and to print PostScript
95     files to non-PostScript printers.
96    
97     You should install ghostscript if you need to display PostScript or
98     PDF files, or if you have a non-PostScript printer.
99    
100 luigiwalser 289699 %package dvipdf
101     Summary: PostScript/PDF interpreter and renderer (DVI-to-PDF converter)
102     Group: Publishing
103     Requires: ghostscript
104     Requires: coreutils
105     Requires: dvips
106     Provides: dvipdf = %{version}-%{release}
107    
108 blino 19330 %description dvipdf
109     Tool to convert the DVI format of TeX into the PDF format. There are
110 boklm 64147 more such tools (for different quality levels) in the dvipdfm
111 blino 19330 package. All these tools use dvips of TeX to convert the DVI file to
112     PostScript, then they use GhostScript to generate the PDF file.
113    
114 luigiwalser 289699 %package common
115     Summary: PostScript/PDF interpreter and renderer (Common files)
116     Group: Publishing
117     Requires: urw-fonts >= 1.1
118     Requires: ghostscript-fonts
119    
120 blino 19330 %description common
121     Ghostscript is a PostScript/PDF interpreter. It can render both
122     PostScript and PDF files to devices which include X window, many
123     printer formats, and popular graphics file formats.
124    
125     This package contains the common data files needed by GhostScript.
126    
127 luigiwalser 289699 %package X
128     Summary: PostScript/PDF interpreter and renderer (with X11 screen display)
129     Group: Publishing
130     Requires: ghostscript-common
131     Requires: update-alternatives
132    
133 blino 19330 %description X
134     Ghostscript is a PostScript/PDF interpreter. It can render both
135     PostScript and PDF files to devices which include X window, many
136     printer formats, and popular graphics file formats.
137    
138     This package contains a GhostScript executable with GTK-based X
139     display support ("display" device, default, so it displays files by
140     simply entering "gs <file>" on the command line). It makes use of the
141     GhostScript shared library.
142    
143 luigiwalser 289699 %if %{GSx11SVGAmodule}
144     %package module-X
145     Summary: PostScript/PDF interpreter and renderer (Additional support for X)
146     Group: Publishing
147     Requires: ghostscript-common
148 blino 19330
149     %description module-X
150     Ghostscript is a PostScript/PDF interpreter. It can render both
151     PostScript and PDF files to devices which include X window, many
152     printer formats, and popular graphics file formats.
153    
154     This package enhances Ghostscript with X window support
155 luigiwalser 289699 %endif
156 blino 19330
157 luigiwalser 289699 %package -n %libgs
158     Summary: PostScript/PDF interpreter and renderer (GhostScript shared library)
159     Group: Publishing
160 blino 19330
161     %description -n %libgs
162     This is the API library for programs which use the PostScript and/or
163     PDF interpreters of GhostScript.
164    
165 luigiwalser 289699 %package -n %libgs_devel
166     Summary: Headers and links to compile against the "%{libgs}" library
167     Group: Development/C
168     Requires: %libgs >= %{gsver}
169     Provides: %{name}-devel = %{gsver}
170     Provides: libgs-devel = %{gsver}
171     Obsoletes: %{_lib}gs9-devel < %{gsver}
172     Obsoletes: %{_lib}gs8-devel < %{gsver}
173    
174     %description -n %libgs_devel
175 blino 19330 This package contains the static library and the header files needed
176     to compile applications using the GhostScript shared library.
177    
178 luigiwalser 289699 %package -n %{libijs}
179     Version: %{ijsver}
180     Release: %{ijsrel}
181     Summary: Dynamic library for the IJS printer driver plug-in interface
182     Group: Publishing
183     URL: http://www.linuxprinting.org/ijs/
184     Provides: libijs = %{ijsver}-%{ijsrel}
185    
186 blino 19330 %description -n %{libijs}
187     This is the API library for programs using the IJS printer driver
188     plug-in interface. Printer drivers using this interface can be added
189     to GhostScript (6.53 or newer) without needing to rebuild
190     GhostScript. Application programs providing an IJS interface can make
191     use of IJS printer drivers directly, without needing GhostScript.
192    
193 luigiwalser 289699 %package -n %{libijs_devel}
194     Version: %{ijsver}
195     Release: %{ijsrel}
196     Summary: Headers and links for compiling against the "%{libijs}" library
197     Group: Development/C
198     URL: http://www.linuxprinting.org/ijs/
199     Requires: %{libijs} >= %{ijsver}
200     Requires: multiarch-utils
201     Provides: libijs-devel = %{ijsver}-%{ijsrel}
202     Provides: ijs-devel = %{ijsver}-%{ijsrel}
203     Obsoletes: %{_lib}ijs1-devel < %{ijsver}-%{ijsrel}
204    
205 blino 19330 %description -n %{libijs_devel}
206     This package contains the static library and the header files needed
207     to compile applications using the IJS library.
208    
209 luigiwalser 289699 %package doc
210     Summary: Documentation for GhostScript
211     Group: Publishing
212 tv 405372 BuildArch: noarch
213 luigiwalser 289699
214 blino 19330 %description doc
215     This package contains documentation for GhostScript.
216    
217     %prep
218     %setup -q
219 tv 595472 rm -rf expat freetype icclib jasper jpeg jpegxr lcms2 libpng openjpeg zlib cups/libs
220 ns80 1457824 %autopatch -p1
221 daviddavid 1430046
222 luigiwalser 289699 # Don't ship backup files
223     find . -name "*.*~" |xargs rm -f
224 blino 19330
225     # prevent building and using bundled libs
226 fwang 398527 rm -rf jasper jbig2dec libpng jpeg tiff expat zlib lcms* freetype
227 blino 19330
228     # Convert manual pages to UTF-8
229     from8859_1() {
230 luigiwalser 289699 iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_"
231     mv "${1}_" "$1"
232 blino 19330 }
233     for i in man/de/*.1; do from8859_1 "$i"; done
234    
235     # Stuff for shared library support to ghostscript.
236     %if %{GSx11SVGAmodule}
237     # build a small README describing the features available.
238 blino 19364 cat <<EOF >README.shared.%{_vendor}
239 blino 19330 This version of ghostscript support shared modules dynamically loaded
240     at run time.
241    
242 blino 19365 There are currently two modules compiled with the %{distribution} version of
243 blino 19330 ghostscript, one to support all X11 devices (typically used by gv) and
244     another to support the svgalib devices. Look at the
245     ghostscript-module-??? packages.
246    
247     There is no configuration needed, just can add (or remove) the package
248     to add (or remove) the devices concerned in ghostscript.
249     EOF
250     %endif
251    
252     # ps2pdfpress
253     bzcat %{SOURCE2} > ps2pdfpress
254    
255     # UPP file for SiPix Pocket Printer A6
256     bzcat %{SOURCE3} > sipixa6.upp
257    
258     %build
259     # We have a Subversion version, so we must re-generate "configure"
260     ./autogen.sh
261    
262 wally 1478915 %configure \
263 blino 19330 --enable-dynamic \
264     %if !%{bootstrap}
265 luigiwalser 289699 --enable-fontconfig \
266 blino 19330 %endif
267 lmenut 87327 %ifarch %{ix86}
268 luigiwalser 289699 --disable-sse2 \
269 lmenut 87327 %endif
270 luigiwalser 289699 --with-drivers=ALL,opvp \
271     --with-fontpath="/usr/share/fonts/default/ghostscript:/usr/share/fonts/default/type1:/usr/share/ghostscript/fonts:/usr/share/ghostscript/%{gsver}/Resource:/usr/share/ghostscript/Resource:/usr/share/ghostscript/CIDFont:/usr/share/fonts/ttf:/usr/share/fonts/type1:/usr/share/fonts/default/Type1" \
272     --with-ijs \
273     --with-x \
274     --disable-compile-inits \
275     --with-system-libtiff \
276 blino 19330
277 tv 595424 # Build IJS
278     pushd ijs
279     ./autogen.sh
280 wally 1478915 %configure \
281 tv 595424 %ifarch %{ix86}
282     --disable-sse2 \
283     %endif
284     --enable-shared \
285     --disable-static
286    
287 ovitters 1579003 %make_build
288 tv 595424 popd
289    
290 blino 19330 # Set documentation dir
291 luigiwalser 289699 perl -p -i -e 's|^(docdir=).*$|$1\$\(datadir\)/doc/%{name}-doc-%{gsver}|' Makefile
292 blino 19330
293     # Fix references to X11 libraries
294     perl -p -i -e "s|(/usr/X11R6)/lib\b|\1/%{_lib}|g" Makefile base/*.mak
295    
296     # Correct paths for CJK fonts
297     perl -p -i -e "s:/usr/share/ghostscript/:/usr/share/ghostscript/Resource/:g" Resource/Init/gs_res.ps
298     perl -p -i -e "s:ghostscript/Resource/fonts:ghostscript/Resource/Font:g" Resource/Init/gs_res.ps
299    
300 luigiwalser 289699 # bork
301     perl -p -i -e "s|^EXTRALIBS=|EXTRALIBS=-L/%{_lib} -lz |g" Makefile
302    
303 blino 19330 # The RPM macro for make is not used here, as parallelization of the build
304     # process does not work.
305 luigiwalser 289699 %if %{GSx11SVGAmodule}
306 fwang 150967 make obj/X11.so
307 blino 19330 %endif
308     make so
309    
310     %install
311     # Make directories
312     install -d %{buildroot}%{_bindir}
313     install -d %{buildroot}%{_libdir}
314     install -d %{buildroot}%{_includedir}
315     install -d %{buildroot}%{_sysconfdir}
316     install -d %{buildroot}%{_mandir}/man1
317     %if !%{bootstrap}
318     install -d %{buildroot}%{_prefix}/lib/cups
319     install -d %{buildroot}%{_datadir}/cups/model
320     install -d %{buildroot}%{_sysconfdir}/cups
321     %endif
322    
323 luigiwalser 289699 pushd ijs*
324 wally 1478915 %configure \
325 luigiwalser 289699 --enable-shared \
326     --prefix=%{buildroot}%{_prefix} \
327     --libdir=%{buildroot}%{_libdir}
328    
329 blino 19330 # Work around bug in "configure" script
330     perl -p -i -e 's/\@OBJEXT\@/o/g' Makefile
331     perl -p -i -e 's/\@EXEEXT\@//g' Makefile
332     %makeinstall
333     # Fix prefixes in scripts
334 luigiwalser 289699 perl -p -i -e "s:%{buildroot}::g" %{buildroot}%{_libdir}/pkgconfig/ijs.pc
335     popd
336 blino 19330
337     ##### GHOSTSCRIPT
338 kekepower 1220923 mkdir -p %{buildroot}%{_docdir}/ghostscript-doc-%{gsver}
339 blino 19330
340     %if !%{bootstrap}
341     make \
342     prefix=%{_prefix} \
343     DESTDIR=%{buildroot} \
344 luigiwalser 289699 gssharedir=%{_libdir}/ghostscript/%{gsver} \
345 kekepower 1220923 docdir=%{_docdir}/ghostscript-doc-%{gsver} \
346 blino 19330 bindir=%{_bindir} \
347     mandir=%{_mandir} \
348     %endif
349    
350     make \
351     prefix=%{_prefix} \
352     DESTDIR=%{buildroot} \
353 luigiwalser 289699 gssharedir=%{_libdir}/ghostscript/%{gsver} \
354 kekepower 1220923 docdir=%{_docdir}/ghostscript-doc-%{gsver} \
355 blino 19330 bindir=%{_bindir} \
356 luigiwalser 289699 libdir=%{_libdir} \
357 blino 19330 mandir=%{_mandir} \
358 luigiwalser 289699 soinstall
359 blino 19330
360 luigiwalser 289699 %if %{GSx11SVGAmodule}
361 blino 19330 make \
362     prefix=%{_prefix} \
363     DESTDIR=%{buildroot} \
364 luigiwalser 289699 gssharedir=%{_libdir}/ghostscript/%{gsver} \
365 kekepower 1220923 docdir=%{_docdir}/ghostscript-doc-%{gsver} \
366 blino 19330 bindir=%{_bindir} \
367 luigiwalser 289699 libdir=%{_libdir} \
368 blino 19330 mandir=%{_mandir} \
369 luigiwalser 289699 install-shared
370 blino 19330 %endif
371    
372 luigiwalser 289699 ln -sf gs.1%{_extension} %{buildroot}%{_mandir}/man1/ghostscript.1%{_extension}
373 blino 19330
374     # ps2pdfpress
375     install -m 755 ps2pdfpress %{buildroot}%{_bindir}
376    
377     # UPP file for SiPix Pocket Printer A6
378 daviddavid 1430046 #mkdir -p %%{buildroot}%%{_datadir}/ghostscript/%%{gsver}/lib
379 luigiwalser 289699 install -m 644 sipixa6.upp %{buildroot}%{_datadir}/ghostscript/%{gsver}/lib/
380 blino 19330
381     # Correct permissions for all documentation files
382 kekepower 1220923 chmod -R a+rX %{buildroot}%{_docdir}
383     chmod -R go-w %{buildroot}%{_docdir}
384     chmod -R u+w %{buildroot}%{_docdir}
385 blino 19330
386 luigiwalser 289699 # remove libtool archive
387     rm -f %{buildroot}%{_libdir}/libijs.la
388 blino 19330
389 kekepower 1220756 # Remove dangling link (mga#22919)
390     rm -f %{buildroot}%{_datadir}/%{name}/%{gsver}/doc
391    
392 luigiwalser 289699 %post
393     # Set up update-alternatives entries
394     %{_sbindir}/update-alternatives --install %{_bindir}/gs gs %{_bindir}/gsc 200
395    
396     %post X
397     # Set up update-alternatives entries
398     %{_sbindir}/update-alternatives --install %{_bindir}/gs gs %{_bindir}/gsx 100
399    
400     %post common
401     # Initialize japanese fonts
402     if test -f /usr/share/fonts/ttf/japanese/cidinst; then
403     sh /usr/share/fonts/ttf/japanese/cidinst
404     fi
405    
406     %preun
407     if [ "$1" = 0 ]; then
408     # Remove update-alternatives entry
409     %{_sbindir}/update-alternatives --remove gs %{_bindir}/gsc
410     fi
411    
412     %preun X
413     if [ "$1" = 0 ]; then
414     # Remove update-alternatives entry
415     %{_sbindir}/update-alternatives --remove gs %{_bindir}/gsx
416     fi
417    
418 blino 19330 %files
419     %{_bindir}/gsc
420    
421     %files X
422     %{_bindir}/gsx
423    
424     %files common
425     %dir %{_datadir}/ghostscript
426 luigiwalser 289699 %{_datadir}/ghostscript/%{gsver}
427 blino 19330 %{_mandir}/man1/*
428     %lang(de) %{_mandir}/de/man1/*
429 daviddavid 1430458 #{_bindir}/[a-c]*
430 blino 19330 %{_bindir}/[e-f]*
431     #{_bindir}/gs-common
432     %{_bindir}/gs[a-b]*
433     %{_bindir}/gs[d-n]*
434     %{_bindir}/[j-l]*
435     %{_bindir}/[n-z]*
436    
437     %files doc
438 kekepower 1220923 %doc %{_docdir}/ghostscript-doc-%{gsver}
439 blino 19330
440     %files dvipdf
441     %{_bindir}/dvipdf
442    
443     %if %{GSx11SVGAmodule}
444     %files module-X
445 blino 19364 %doc README.shared.%{_vendor}
446 luigiwalser 289699 %dir %{_libdir}/ghostscript/%{gsver}
447     %{_libdir}/ghostscript/%{gsver}/X11.so
448 blino 19330 %endif
449    
450     %files -n %{libgs}
451 ovitters 876311 %{_libdir}/libgs.so.*%{gsmajor}{,.*}
452 blino 19330
453     %files -n %{libgs_devel}
454     %{_libdir}/libgs.so
455     %{_includedir}/ghostscript
456    
457     %files -n %{libijs}
458 fwang 150967 %{_libdir}/libijs-%{ijsver}.so
459 blino 19330
460     %files -n %{libijs_devel}
461     %doc ijs/README
462     %{_libdir}/libijs.so
463     %{_libdir}/pkgconfig/ijs.pc
464     %{_includedir}/ijs
465     %{_bindir}/ijs_client_example
466     %{_bindir}/ijs_server_example

  ViewVC Help
Powered by ViewVC 1.1.28