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