2 # - tesseract OCR support (experimental)
4 # http://dl.sourceforge.net/djvu/gsdjvu-1.3.tar.gz (or newer)
7 %bcond_without cairo # cairo support (disable for cairo bootstrap)
8 %bcond_without system_freetype # system freetype
9 %bcond_without system_jbig2dec # system jbig2dec
10 %bcond_with system_libjpeg # system libjpeg (incompatible with D_MAX_BLOCKS_IN_MCU=64 variant)
11 %bcond_with system_libtiff # system libtiff (incompatible with modified libjpeg)
12 %bcond_with system_lcms2 # build with included lcms2 (which is thread safe)
13 %bcond_without gtk # gsx (GTK+ based frontend)
14 %bcond_without texdocs # skip tetex BRs
16 Summary: PostScript & PDF interpreter and renderer
17 Summary(de.UTF-8): PostScript & PDF Interpreter und Renderer
18 Summary(fr.UTF-8): Interpréteur et visualisateur PostScript & PDF
19 Summary(ja.UTF-8): PostScript インタープリタ・レンダラー
20 Summary(pl.UTF-8): Bezpłatny interpreter i renderer PostScriptu i PDF
21 Summary(tr.UTF-8): PostScript & PDF yorumlayıcı ve gösterici
26 Group: Applications/Graphics
27 #Source0Download: https://github.com/ArtifexSoftware/ghostpdl-downloads/releases
28 Source0: https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9531/%{name}-%{version}.tar.xz
29 # Source0-md5: 3052b8787050a5d33eb2c2e9c9723766
30 Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
31 # Source1-md5: 9b5953aa0cc155f4364f20036b848585
32 Patch0: %{name}-missquotes.patch
33 Patch2: ijs-pkgconfig.patch
35 Patch6: %{name}-gdevcd8-fixes.patch
36 Patch8: %{name}-zlib.patch
39 Patch20: %{name}-scripts.patch
40 Patch21: %{name}-9.53.3-drop-ft-callback-def.patch
42 Patch28: %{name}-iccprofiles-initdir.patch
44 URL: http://www.ghostscript.com/
45 BuildRequires: autoconf >= 2.63
46 BuildRequires: automake >= 1.6
47 %{?with_cairo:BuildRequires: cairo-devel >= 1.2.0}
48 BuildRequires: cups-devel >= 1.5
49 BuildRequires: dbus-devel
50 BuildRequires: docbook-style-dsssl
51 BuildRequires: fontconfig-devel
52 %{?with_system_freetype:BuildRequires: freetype-devel >= 1:2.10.1}
53 %{?with_gtk:BuildRequires: gtk+3-devel >= 3.0}
54 %{?with_system_jbig2dec:BuildRequires: jbig2dec-devel >= 0.19}
55 %{?with_system_lcms2:BuildRequires: lcms2-devel >= 2.6}
56 BuildRequires: libidn-devel
57 %{?with_system_libjpeg:BuildRequires: libjpeg-devel >= 9c}
58 BuildRequires: libpaper-devel
59 BuildRequires: libpng-devel >= 2:1.6.37
60 BuildRequires: libstdc++-devel
61 %{?with_system_libtiff:BuildRequires: libtiff-devel >= 4.1.0}
62 BuildRequires: libtool
63 BuildRequires: pkgconfig
64 BuildRequires: tar >= 1:1.22
65 # for documentation regeneration
68 BuildRequires: tetex-dvips
70 BuildRequires: xorg-lib-libX11-devel
71 BuildRequires: xorg-lib-libXext-devel
72 BuildRequires: xorg-lib-libXt-devel
74 BuildRequires: zlib-devel >= 1.2.11
75 %{?with_system_freetype:Requires: freetype >= 1:2.10.1}
76 %{?with_system_jbig2dec:Requires: jbig2dec >= 0.19}
77 %{?with_system_lcms2:Requires: lcms2 >= 2.6}
78 %{?with_system_libjpeg:Requires: libjpeg >= 9c}
79 Requires: libpng >= 2:1.6.37
80 %{?with_system_libtiff:Requires: libtiff >= 4.1.0}
81 Requires: zlib >= 1.2.11
82 Obsoletes: ghostscript-afpl
83 Obsoletes: ghostscript-esp
84 Obsoletes: ghostscript-gpl
85 Obsoletes: ghostscript-svga
86 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
88 %define _ulibdir %{_prefix}/lib
91 cos nGhostscript is a PostScript interpreter. It can render both
92 PostScript and PDF compliant files to devices which include an X
93 window, many printer formats (including support for color printers),
94 and popular graphics file formats.
96 %description -l de.UTF-8
97 Ghostscipt ist ein PostScript-Interpretierer. Er kann sowohl
98 PostScript als auch PDF-konforme Dateien an Geräte ausgeben, zu denen
99 ein X-Fenster, viele Druckerformate (einschließlich Support für
100 Farbdrucker) und gängige Grafikdateiformate zählen.
102 %description -l fr.UTF-8
103 Ghostscript est un interpréteur PostScript. Il peut rendre des
104 fichiers PostScript ou PDF sur des périphériques dont une fenêtre X,de
105 nombreux types d'imprimantes (dont un support pour imprimantes
106 couleur), et des formats de fichiers graphiques populaires.
108 %description -l ja.UTF-8
109 Ghostscript は PostScript インタープリタです。ポストスクリプトと PDF をレンダリングし、X window
110 や他のプリンタフォーマットで出力 します。このパッケージは日本語対応しています。
112 %description -l pl.UTF-8
113 Ghostcript jest interpreterem PostScriptu, języka używanego do opisu
114 formatu dokumentu. Ghostscript potrafi przetworzyć dokument w formacie
115 PostScript i PDF na szereg postaci wyjściowych: drukarki (włączając
116 kolorowe), okno X-Window i popularne formaty graficzne.
118 %description -l tr.UTF-8
119 GhostScript, PostScript ve PDF uyumlu dosyaları, X penceresinde
120 gösterebilir ve birçok yazıcının (renkli yazıcılar dahil) basabileceği
124 Summary: Ghostscript with GTK+ console
125 Summary(pl.UTF-8): Ghostscript z konsolą GTK+
126 Group: Applications/Graphics
127 Requires: %{name} = %{version}-%{release}
128 Obsoletes: ghostscript-afpl-gtk
129 Obsoletes: ghostscript-esp-gtk
130 Obsoletes: ghostscript-gpl-gtk
133 Ghostscript with GTK+ console.
135 %description gtk -l pl.UTF-8
136 Ghostscript z konsolą GTK+.
139 Summary: X Window System drivers for Ghostscript
140 Summary(pl.UTF-8): Sterowniki systemu X Window dla Ghostscripta
141 Group: Applications/Graphics
142 Requires: %{name} = %{version}-%{release}
145 X Window System output drivers for Ghostscript: x11, x11alpha.
147 %description x11 -l pl.UTF-8
148 Sterowniki wyjściowe systemu X Window dla Ghostscripta: x11, x11alpha.
151 Summary: libgs header files
152 Summary(pl.UTF-8): Pliki nagłówkowe libgs
153 Group: Development/Libraries
154 Requires: %{name} = %{version}-%{release}
155 Obsoletes: ghostscript-afpl-devel
156 Obsoletes: ghostscript-esp-devel
159 Header files for libgs - ghostscript shared library.
161 %description devel -l pl.UTF-8
162 Pliki nagłówkowe libgs - współdzielonej biblioteki ghostscript.
165 Summary: Documentation for ghostscript
170 The documentation files that come with ghostscript.
173 Summary: IJS (InkJet Server) shared library
174 Summary(pl.UTF-8): Biblioteka współdzielona IJS (InkJet Server)
176 Conflicts: ghostscript < 9.10-2
179 IJS (InkJet Server) Raster Image Transport Protocol shared library.
181 %description ijs -l pl.UTF-8
182 Biblioteka współdzielona protokołu transportu obrazów rastrowych IJS
186 Summary: IJS development files
187 Summary(pl.UTF-8): Pliki dla programistów IJS
188 Group: Development/Libraries
189 Requires: %{name}-ijs = %{version}-%{release}
190 Obsoletes: ghostscript-afpl-ijs-devel
191 Obsoletes: ghostscript-esp-ijs-devel
193 %description ijs-devel
194 IJS development files.
196 %description ijs-devel -l pl.UTF-8
197 Pliki do tworzenia programów z użyciem biblioteki IJS.
200 Summary: Static libijs library
201 Summary(pl.UTF-8): Statyczna biblioteka IJS
202 Group: Development/Libraries
203 Requires: %{name}-ijs-devel = %{version}-%{release}
204 Obsoletes: ghostscript-afpl-ijs-static
205 Obsoletes: ghostscript-esp-ijs-static
207 %description ijs-static
208 Static libijs library.
210 %description ijs-static -l pl.UTF-8
211 Statyczna wersja biblioteki IJS.
228 %{?with_system_freetype:%{__rm} -r freetype}
230 %{?with_system_jbig2dec:%{__rm} -r jbig2dec}
231 # (unmodified) libpng 1.6.37 and zlib 1.2.11
232 %{__rm} -r libpng zlib
233 # libjpeg (9c without CLAMP_DC fixes) is built with different configuration (D_MAX_BLOCKS_IN_MCU=64)
234 %{?with_system_libjpeg:%{__rm} -r jpeg}
235 # openjpeg is 2.3.1 + few custom fixes; stick to bundled for now
236 # lcms2mt is thread safe version of lcms2
237 %{?with_system_lcms2:%{__rm} -r lcms2mt}
243 CFLAGS="%{rpmcflags} -DA4" \
244 %{!?with_cairo:--disable-cairo} \
245 --disable-compile-inits \
248 --with-fontpath="%{_datadir}/fonts:%{_datadir}/fonts/Type1" \
252 %{?with_system_libtiff:--with-system-libtiff} \
266 docdir=%{_docdir}/%{name}-%{version}
269 docdir=%{_docdir}/%{name}-%{version}
272 rm -rf $RPM_BUILD_ROOT
274 %{__make} soinstall \
275 DESTDIR=$RPM_BUILD_ROOT \
276 docdir=%{_docdir}/%{name}-%{version}
279 DESTDIR=$RPM_BUILD_ROOT \
280 docdir=%{_docdir}/%{name}-%{version}
282 %{__make} -C ijs install \
283 DESTDIR=$RPM_BUILD_ROOT
285 cp -p base/gserrors.h $RPM_BUILD_ROOT%{_includedir}/ghostscript
287 cp -p LICENSE $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
289 %{__rm} $RPM_BUILD_ROOT%{_bindir}/*.sh \
290 $RPM_BUILD_ROOT%{_mandir}/man1/{ps2pdf1{2,3},eps2eps}.1 \
291 $RPM_BUILD_ROOT%{_mandir}/de/man1/{ps2pdf1{2,3},eps2eps}.1
293 echo ".so gs.1" > $RPM_BUILD_ROOT%{_mandir}/man1/ghostscript.1
294 echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/man1/ps2pdf12.1
295 echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/man1/ps2pdf13.1
296 echo ".so ps2ps.1" > $RPM_BUILD_ROOT%{_mandir}/man1/eps2eps.1
297 echo ".so gslp.1" > $RPM_BUILD_ROOT%{_mandir}/man1/gsbj.1
298 echo ".so gslp.1" > $RPM_BUILD_ROOT%{_mandir}/man1/gsdj.1
299 echo ".so gslp.1" > $RPM_BUILD_ROOT%{_mandir}/man1/gsdj500.1
300 echo ".so gslp.1" > $RPM_BUILD_ROOT%{_mandir}/man1/gslj.1
302 echo ".so ps2ps.1" > $RPM_BUILD_ROOT%{_mandir}/de/man1/eps2eps.1
303 echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/de/man1/ps2pdf12.1
304 echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/de/man1/ps2pdf13.1
306 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
307 %{__rm} $RPM_BUILD_ROOT%{_mandir}/README.ghostscript-non-english-man-pages
309 ln -sf gs $RPM_BUILD_ROOT%{_bindir}/gsc
310 ln -sf gs $RPM_BUILD_ROOT%{_bindir}/ghostscript
313 rm -rf $RPM_BUILD_ROOT
315 %post -p /sbin/ldconfig
316 %postun -p /sbin/ldconfig
318 %post ijs -p /sbin/ldconfig
319 %postun ijs -p /sbin/ldconfig
322 %defattr(644,root,root,755)
323 %attr(755,root,root) %{_bindir}/dvipdf
324 %attr(755,root,root) %{_bindir}/eps2eps
325 %attr(755,root,root) %{_bindir}/ghostscript
326 %attr(755,root,root) %{_bindir}/gs
327 %attr(755,root,root) %{_bindir}/gsbj
328 %attr(755,root,root) %{_bindir}/gsc
329 %attr(755,root,root) %{_bindir}/gsdj
330 %attr(755,root,root) %{_bindir}/gsdj500
331 %attr(755,root,root) %{_bindir}/gslj
332 %attr(755,root,root) %{_bindir}/gslp
333 %attr(755,root,root) %{_bindir}/gsnd
334 %attr(755,root,root) %{_bindir}/pdf2dsc
335 %attr(755,root,root) %{_bindir}/pdf2ps
336 %attr(755,root,root) %{_bindir}/pf2afm
337 %attr(755,root,root) %{_bindir}/pfbtopfa
338 %attr(755,root,root) %{_bindir}/printafm
339 %attr(755,root,root) %{_bindir}/ps2ascii
340 %attr(755,root,root) %{_bindir}/ps2epsi
341 %attr(755,root,root) %{_bindir}/ps2pdf
342 %attr(755,root,root) %{_bindir}/ps2pdf12
343 %attr(755,root,root) %{_bindir}/ps2pdf13
344 %attr(755,root,root) %{_bindir}/ps2pdf14
345 %attr(755,root,root) %{_bindir}/ps2pdfwr
346 %attr(755,root,root) %{_bindir}/ps2ps
347 %attr(755,root,root) %{_bindir}/ps2ps2
348 %attr(755,root,root) %{_bindir}/pphs
349 %attr(755,root,root) %{_libdir}/libgs.so.*.*
350 %attr(755,root,root) %ghost %{_libdir}/libgs.so.9
351 %dir %{_libdir}/%{name}
352 %dir %{_libdir}/%{name}/%{version}
353 %dir %{_datadir}/%{name}
354 %dir %{_datadir}/%{name}/%{version}
355 %{_datadir}/%{name}/%{version}/Resource
356 %{_datadir}/%{name}/%{version}/iccprofiles
357 %dir %{_datadir}/%{name}/%{version}/lib
358 %{_datadir}/%{name}/%{version}/lib/*.ppd
359 %{_datadir}/%{name}/%{version}/lib/*.ps
360 %{_datadir}/%{name}/%{version}/lib/*.rpd
361 %{_datadir}/%{name}/%{version}/lib/*.upp
362 %{_datadir}/%{name}/%{version}/lib/*.x[bp]m
363 %{_mandir}/man1/dvipdf.1*
364 %{_mandir}/man1/eps2eps.1*
365 %{_mandir}/man1/ghostscript.1*
366 %{_mandir}/man1/gs.1*
367 %{_mandir}/man1/gsbj.1*
368 %{_mandir}/man1/gsdj.1*
369 %{_mandir}/man1/gsdj500.1*
370 %{_mandir}/man1/gslj.1*
371 %{_mandir}/man1/gslp.1*
372 %{_mandir}/man1/gsnd.1*
373 %{_mandir}/man1/pdf2dsc.1*
374 %{_mandir}/man1/pdf2ps.1*
375 %{_mandir}/man1/pf2afm.1*
376 %{_mandir}/man1/pfbtopfa.1*
377 %{_mandir}/man1/printafm.1*
378 %{_mandir}/man1/ps2ascii.1*
379 %{_mandir}/man1/ps2epsi.1*
380 %{_mandir}/man1/ps2pdf.1*
381 %{_mandir}/man1/ps2pdf12.1*
382 %{_mandir}/man1/ps2pdf13.1*
383 %{_mandir}/man1/ps2pdf14.1*
384 %{_mandir}/man1/ps2pdfwr.1*
385 %{_mandir}/man1/ps2ps.1*
386 %lang(cs) %{_mandir}/cs/man1/*
387 %lang(de) %{_mandir}/de/man1/*
388 %lang(es) %{_mandir}/es/man1/*
389 %lang(fr) %{_mandir}/fr/man1/*
390 %lang(pl) %{_mandir}/pl/man1/*
393 %defattr(644,root,root,755)
394 %doc %{_docdir}/%{name}-%{version}
398 %defattr(644,root,root,755)
399 %attr(755,root,root) %{_bindir}/gsx
403 %defattr(644,root,root,755)
404 %attr(755,root,root) %{_libdir}/%{name}/%{version}/X11.so
407 %defattr(644,root,root,755)
408 %attr(755,root,root) %{_libdir}/libgs.so
409 %{_includedir}/ghostscript
412 %defattr(644,root,root,755)
414 %attr(755,root,root) %{_bindir}/ijs_client_example
415 %attr(755,root,root) %{_bindir}/ijs_server_example
416 %attr(755,root,root) %{_libdir}/libijs-*.so
419 %defattr(644,root,root,755)
420 %attr(755,root,root) %{_libdir}/libijs.so
423 %{_pkgconfigdir}/ijs.pc
426 %defattr(644,root,root,755)