]> git.pld-linux.org Git - packages/ghostscript.git/blob - ghostscript.spec
- up to 9.24 which has important SECURITY fixes; use internal lcms2 which is supposed...
[packages/ghostscript.git] / ghostscript.spec
1 # TODO:
2 # - add djvu driver:
3 #   http://dl.sourceforge.net/djvu/gsdjvu-1.3.tar.gz (or newer)
4 #
5 # Conditional build:
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_with     svga            # svgalib display support (vgalib,lvga256 devices) [broken in sources]
11 %bcond_without  gtk             # gsx (GTK+ based frontend)
12 %bcond_without  texdocs         # skip tetex BRs
13
14 Summary:        PostScript & PDF interpreter and renderer
15 Summary(de.UTF-8):      PostScript & PDF Interpreter und Renderer
16 Summary(fr.UTF-8):      Interpréteur et visualisateur PostScript & PDF
17 Summary(ja.UTF-8):      PostScript インタープリタ・レンダラー
18 Summary(pl.UTF-8):      Bezpłatny interpreter i renderer PostScriptu i PDF
19 Summary(tr.UTF-8):      PostScript & PDF yorumlayıcı ve gösterici
20 Name:           ghostscript
21 Version:        9.24
22 Release:        1
23 License:        AGPL v3+
24 Group:          Applications/Graphics
25 #Source0Download: https://github.com/ArtifexSoftware/ghostpdl-downloads/releases
26 Source0:        https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs924/%{name}-%{version}.tar.xz
27 # Source0-md5:  258c73e4ec0da94c95ea3cbd2968889a
28 Source1:        http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
29 # Source1-md5:  9b5953aa0cc155f4364f20036b848585
30 Patch0:         %{name}-missquotes.patch
31 Patch1:         %{name}-setuid.patch
32 Patch2:         ijs-pkgconfig.patch
33
34 Patch6:         %{name}-gdevcd8-fixes.patch
35 Patch8:         %{name}-zlib.patch
36
37
38 # fedora
39 Patch20:        %{name}-scripts.patch
40 Patch21:        %{name}-runlibfileifexists.patch
41 Patch27:        %{name}-Fontmap.local.patch
42 Patch28:        %{name}-iccprofiles-initdir.patch
43
44 URL:            http://www.ghostscript.com/
45 BuildRequires:  autoconf >= 2.57
46 BuildRequires:  automake >= 1.6
47 %{?with_cairo:BuildRequires:    cairo-devel >= 1.2.0}
48 BuildRequires:  dbus-devel
49 BuildRequires:  docbook-style-dsssl
50 BuildRequires:  fontconfig-devel
51 %{?with_system_freetype:BuildRequires:  freetype-devel >= 1:2.6}
52 %{?with_gtk:BuildRequires:      gtk+3-devel >= 3.0}
53 %{?with_system_jbig2dec:BuildRequires:  jbig2dec-devel >= 0.12}
54 %{?with_system_lcms2:BuildRequires:     lcms2-devel >= 2.6}
55 BuildRequires:  libidn-devel
56 BuildRequires:  libpaper-devel
57 BuildRequires:  libpng-devel >= 2:1.6.17
58 BuildRequires:  libstdc++-devel
59 BuildRequires:  libtiff-devel >= 4.0.1
60 BuildRequires:  libtool
61 BuildRequires:  pkgconfig
62 # Required by 'gdevvglb' device.
63 %{?with_svga:BuildRequires:     svgalib-devel}
64 BuildRequires:  tar >= 1:1.22
65 # for documentation regeneration
66 %if %{with texdocs}
67 BuildRequires:  tetex
68 BuildRequires:  tetex-dvips
69 %endif
70 BuildRequires:  xorg-lib-libXext-devel
71 BuildRequires:  xorg-lib-libXt-devel
72 BuildRequires:  xz
73 BuildRequires:  zlib-devel >= 1.2.8
74 %{?with_system_lcms2:Requires:  lcms2 >= 2.6}
75 Obsoletes:      ghostscript-afpl
76 Obsoletes:      ghostscript-esp
77 Obsoletes:      ghostscript-gpl
78 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
79
80 %define         _ulibdir        %{_prefix}/lib
81
82 %description
83 cos nGhostscript is a PostScript interpreter. It can render both
84 PostScript and PDF compliant files to devices which include an X
85 window, many printer formats (including support for color printers),
86 and popular graphics file formats.
87
88 %description -l de.UTF-8
89 Ghostscipt ist ein PostScript-Interpretierer. Er kann sowohl
90 PostScript als auch PDF-konforme Dateien an Geräte ausgeben, zu denen
91 ein X-Fenster, viele Druckerformate (einschließlich Support für
92 Farbdrucker) und gängige Grafikdateiformate zählen.
93
94 %description -l fr.UTF-8
95 Ghostscript est un interpréteur PostScript. Il peut rendre des
96 fichiers PostScript ou PDF sur des périphériques dont une fenêtre X,de
97 nombreux types d'imprimantes (dont un support pour imprimantes
98 couleur), et des formats de fichiers graphiques populaires.
99
100 %description -l ja.UTF-8
101 Ghostscript は PostScript インタープリタです。ポストスクリプトと PDF をレンダリングし、X window
102 や他のプリンタフォーマットで出力 します。このパッケージは日本語対応しています。
103
104 %description -l pl.UTF-8
105 Ghostcript jest interpreterem PostScriptu, języka używanego do opisu
106 formatu dokumentu. Ghostscript potrafi przetworzyć dokument w formacie
107 PostScript i PDF na szereg postaci wyjściowych: drukarki (włączając
108 kolorowe), okno X-Window i popularne formaty graficzne.
109
110 %description -l tr.UTF-8
111 GhostScript, PostScript ve PDF uyumlu dosyaları, X penceresinde
112 gösterebilir ve birçok yazıcının (renkli yazıcılar dahil) basabileceği
113 biçime getirebilir.
114
115 %package gtk
116 Summary:        Ghostscript with GTK+ console
117 Summary(pl.UTF-8):      Ghostscript z konsolą GTK+
118 Group:          Applications/Graphics
119 Requires:       %{name} = %{version}-%{release}
120 Obsoletes:      ghostscript-afpl-gtk
121 Obsoletes:      ghostscript-esp-gtk
122 Obsoletes:      ghostscript-gpl-gtk
123
124 %description gtk
125 Ghostscript with GTK+ console.
126
127 %description gtk -l pl.UTF-8
128 Ghostscript z konsolą GTK+.
129
130 %package svga
131 Summary:        SVGAlib drivers for Ghostscript
132 Summary(pl.UTF-8):      Sterowniki SVGAlib dla Ghostscripta
133 Group:          Applications/Graphics
134 Requires:       %{name} = %{version}-%{release}
135
136 %description svga
137 SVGAlib output drivers for Ghostscript: lvga256, vgalib.
138
139 %description svga -l pl.UTF-8
140 Sterowniki wyjściowe SVGAlib dla Ghostscripta: lvga256, vgalib.
141
142 %package x11
143 Summary:        X Window System drivers for Ghostscript
144 Summary(pl.UTF-8):      Sterowniki systemu X Window dla Ghostscripta
145 Group:          Applications/Graphics
146 Requires:       %{name} = %{version}-%{release}
147
148 %description x11
149 X Window System output drivers for Ghostscript: x11, x11alpha.
150
151 %description x11 -l pl.UTF-8
152 Sterowniki wyjściowe systemu X Window dla Ghostscripta: x11, x11alpha.
153
154 %package devel
155 Summary:        libgs header files
156 Summary(pl.UTF-8):      Pliki nagłówkowe libgs
157 Group:          Development/Libraries
158 Requires:       %{name} = %{version}-%{release}
159 Obsoletes:      ghostscript-afpl-devel
160 Obsoletes:      ghostscript-esp-devel
161
162 %description devel
163 Header files for libgs - ghostscript shared library.
164
165 %description devel -l pl.UTF-8
166 Pliki nagłówkowe libgs - współdzielonej biblioteki ghostscript.
167
168 %package doc
169 Summary:        Documentation for ghostscript
170 Group:          Documentation
171 %if "%{_rpmversion}" >= "5"
172 BuildArch:      noarch
173 %endif
174
175 %description doc
176 The documentation files that come with ghostscript.
177
178 %package ijs
179 Summary:        IJS (InkJet Server) shared library
180 Summary(pl.UTF-8):      Biblioteka współdzielona IJS (InkJet Server)
181 Group:          Libraries
182 Conflicts:      ghostscript < 9.10-2
183
184 %description ijs
185 IJS (InkJet Server) Raster Image Transport Protocol shared library.
186
187 %description ijs -l pl.UTF-8
188 Biblioteka współdzielona protokołu transportu obrazów rastrowych IJS
189 (InkJet Server).
190
191 %package ijs-devel
192 Summary:        IJS development files
193 Summary(pl.UTF-8):      Pliki dla programistów IJS
194 Group:          Development/Libraries
195 Requires:       %{name}-ijs = %{version}-%{release}
196 Obsoletes:      ghostscript-afpl-ijs-devel
197 Obsoletes:      ghostscript-esp-ijs-devel
198
199 %description ijs-devel
200 IJS development files.
201
202 %description ijs-devel -l pl.UTF-8
203 Pliki do tworzenia programów z użyciem biblioteki IJS.
204
205 %package ijs-static
206 Summary:        Static libijs library
207 Summary(pl.UTF-8):      Statyczna biblioteka IJS
208 Group:          Development/Libraries
209 Requires:       %{name}-ijs-devel = %{version}-%{release}
210 Obsoletes:      ghostscript-afpl-ijs-static
211 Obsoletes:      ghostscript-esp-ijs-static
212
213 %description ijs-static
214 Static libijs library.
215
216 %description ijs-static -l pl.UTF-8
217 Statyczna wersja biblioteki IJS.
218
219 %prep
220 %setup -q
221 %patch0 -p1
222 %patch1 -p1
223 %patch2 -p1
224
225 %patch6 -p1
226 %patch8 -p1
227
228 %patch20 -p1
229 %patch21 -p1
230
231 %patch27 -p1
232 %patch28 -p1
233
234 %build
235 # use system libs:
236 # freetype 2.5.5 + few pre-2.6 fixes from git
237 %{?with_system_freetype:%{__rm} -r freetype}
238 # jbig2dec 0.12 + minor updates
239 %{?with_system_jbig2dec:%{__rm} -r jbig2dec}
240 # (unmodified) libpng 1.6.17 and zlib 1.2.8
241 %{__rm} -r libpng zlib
242 # (unmodified) libjpeg 9a is built with different configuration (D_MAX_BLOCKS_IN_MCU=64)
243 # openjpeg is 2.1.0 + fixes; stick to bundled for now
244 # lcms2mt is thread safe version of lcms2
245 %{?with_system_lcms2:%{__rm} -r lcms2mt}
246 %{__aclocal}
247 %{__autoconf}
248 %configure \
249         CFLAGS="%{rpmcflags} -DA4" \
250         %{!?with_cairo:--disable-cairo} \
251         --disable-compile-inits \
252         --enable-dynamic \
253         --with-drivers=ALL%{?with_svga:,svga} \
254         --with-fontpath="%{_datadir}/fonts:%{_datadir}/fonts/Type1" \
255         --with-ijs \
256         --with-jbig2dec \
257         --with-pdftoraster \
258         --with-system-libtiff \
259         --with-x
260
261 cd ijs
262 %{__libtoolize}
263 %{__aclocal}
264 %{__autoconf}
265 %{__automake}
266 %configure \
267         --enable-shared
268 %{__make}
269 cd ..
270
271 %{__make} -j1 so \
272         docdir=%{_docdir}/%{name}-%{version}
273
274 %{__make} -j1 \
275         docdir=%{_docdir}/%{name}-%{version}
276
277 %install
278 rm -rf $RPM_BUILD_ROOT
279
280 %{__make} soinstall \
281         DESTDIR=$RPM_BUILD_ROOT \
282         docdir=%{_docdir}/%{name}-%{version}
283
284 %{__make} install \
285         DESTDIR=$RPM_BUILD_ROOT \
286         docdir=%{_docdir}/%{name}-%{version}
287
288 %{__make} -C ijs install \
289         DESTDIR=$RPM_BUILD_ROOT
290
291 cp -p base/gserrors.h $RPM_BUILD_ROOT%{_includedir}/ghostscript
292
293 %{__rm} $RPM_BUILD_ROOT%{_bindir}/*.sh \
294         $RPM_BUILD_ROOT%{_mandir}/man1/{ps2pdf1{2,3},eps2eps}.1 \
295         $RPM_BUILD_ROOT%{_mandir}/de/man1/{ps2pdf1{2,3},eps2eps}.1
296
297 echo ".so gs.1"     > $RPM_BUILD_ROOT%{_mandir}/man1/ghostscript.1
298 echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/man1/ps2pdf12.1
299 echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/man1/ps2pdf13.1
300 echo ".so ps2ps.1"  > $RPM_BUILD_ROOT%{_mandir}/man1/eps2eps.1
301 echo ".so gslp.1"   > $RPM_BUILD_ROOT%{_mandir}/man1/gsbj.1
302 echo ".so gslp.1"   > $RPM_BUILD_ROOT%{_mandir}/man1/gsdj.1
303 echo ".so gslp.1"   > $RPM_BUILD_ROOT%{_mandir}/man1/gsdj500.1
304 echo ".so gslp.1"   > $RPM_BUILD_ROOT%{_mandir}/man1/gslj.1
305
306 echo ".so ps2ps.1"  > $RPM_BUILD_ROOT%{_mandir}/de/man1/eps2eps.1
307 echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/de/man1/ps2pdf12.1
308 echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/de/man1/ps2pdf13.1
309
310 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
311 %{__rm} $RPM_BUILD_ROOT%{_mandir}/README.ghostscript-non-english-man-pages
312
313 #mv -f $RPM_BUILD_ROOT%{_bindir}/{gsc,gs}
314 ln -sf gs $RPM_BUILD_ROOT%{_bindir}/gsc
315 ln -sf gs $RPM_BUILD_ROOT%{_bindir}/ghostscript
316
317 %clean
318 rm -rf $RPM_BUILD_ROOT
319
320 %post   -p /sbin/ldconfig
321 %postun -p /sbin/ldconfig
322
323 %post   ijs -p /sbin/ldconfig
324 %postun ijs -p /sbin/ldconfig
325
326 %files
327 %defattr(644,root,root,755)
328 %attr(755,root,root) %{_bindir}/dvipdf
329 %attr(755,root,root) %{_bindir}/eps2eps
330 %attr(755,root,root) %{_bindir}/ghostscript
331 %attr(755,root,root) %{_bindir}/gs
332 %attr(755,root,root) %{_bindir}/gsbj
333 %attr(755,root,root) %{_bindir}/gsc
334 %attr(755,root,root) %{_bindir}/gsdj
335 %attr(755,root,root) %{_bindir}/gsdj500
336 %attr(755,root,root) %{_bindir}/gslj
337 %attr(755,root,root) %{_bindir}/gslp
338 %attr(755,root,root) %{_bindir}/gsnd
339 %attr(755,root,root) %{_bindir}/pdf2dsc
340 %attr(755,root,root) %{_bindir}/pdf2ps
341 %attr(755,root,root) %{_bindir}/pf2afm
342 %attr(755,root,root) %{_bindir}/pfbtopfa
343 %attr(755,root,root) %{_bindir}/printafm
344 %attr(755,root,root) %{_bindir}/ps2ascii
345 %attr(755,root,root) %{_bindir}/ps2epsi
346 %attr(755,root,root) %{_bindir}/ps2pdf
347 %attr(755,root,root) %{_bindir}/ps2pdf12
348 %attr(755,root,root) %{_bindir}/ps2pdf13
349 %attr(755,root,root) %{_bindir}/ps2pdf14
350 %attr(755,root,root) %{_bindir}/ps2pdfwr
351 %attr(755,root,root) %{_bindir}/ps2ps
352 %attr(755,root,root) %{_bindir}/ps2ps2
353 %attr(755,root,root) %{_bindir}/pphs
354 %attr(755,root,root) %{_libdir}/libgs.so.*.*
355 %attr(755,root,root) %ghost %{_libdir}/libgs.so.9
356 %dir %{_libdir}/%{name}
357 %dir %{_libdir}/%{name}/%{version}
358 %dir %{_datadir}/%{name}
359 %dir %{_datadir}/%{name}/%{version}
360 %{_datadir}/%{name}/%{version}/Resource
361 %{_datadir}/%{name}/%{version}/iccprofiles
362 %dir %{_datadir}/%{name}/%{version}/lib
363 %{_datadir}/%{name}/%{version}/lib/*.ppd
364 %{_datadir}/%{name}/%{version}/lib/*.ps
365 %{_datadir}/%{name}/%{version}/lib/*.rpd
366 %{_datadir}/%{name}/%{version}/lib/*.src
367 %{_datadir}/%{name}/%{version}/lib/*.upp
368 %{_datadir}/%{name}/%{version}/lib/*.x[bp]m
369 %{_mandir}/man1/dvipdf.1*
370 %{_mandir}/man1/eps2eps.1*
371 %{_mandir}/man1/ghostscript.1*
372 %{_mandir}/man1/gs.1*
373 %{_mandir}/man1/gsbj.1*
374 %{_mandir}/man1/gsdj.1*
375 %{_mandir}/man1/gsdj500.1*
376 %{_mandir}/man1/gslj.1*
377 %{_mandir}/man1/gslp.1*
378 %{_mandir}/man1/gsnd.1*
379 %{_mandir}/man1/pdf2dsc.1*
380 %{_mandir}/man1/pdf2ps.1*
381 %{_mandir}/man1/pf2afm.1*
382 %{_mandir}/man1/pfbtopfa.1*
383 %{_mandir}/man1/printafm.1*
384 %{_mandir}/man1/ps2ascii.1*
385 %{_mandir}/man1/ps2epsi.1*
386 %{_mandir}/man1/ps2pdf.1*
387 %{_mandir}/man1/ps2pdf12.1*
388 %{_mandir}/man1/ps2pdf13.1*
389 %{_mandir}/man1/ps2pdf14.1*
390 %{_mandir}/man1/ps2pdfwr.1*
391 %{_mandir}/man1/ps2ps.1*
392 %lang(cs) %{_mandir}/cs/man1/*
393 %lang(de) %{_mandir}/de/man1/*
394 %lang(es) %{_mandir}/es/man1/*
395 %lang(fr) %{_mandir}/fr/man1/*
396 %lang(pl) %{_mandir}/pl/man1/*
397
398 %files doc
399 %doc %{_docdir}/%{name}-%{version}
400
401 %if %{with gtk}
402 %files gtk
403 %defattr(644,root,root,755)
404 %attr(755,root,root) %{_bindir}/gsx
405 %endif
406
407 %if %{with svga}
408 %files svga
409 %defattr(644,root,root,755)
410 %attr(755,root,root) %{_libdir}/%{name}/%{version}/lvga256.so
411 %attr(755,root,root) %{_libdir}/%{name}/%{version}/vgalib.so
412 %endif
413
414 %files x11
415 %defattr(644,root,root,755)
416 %attr(755,root,root) %{_libdir}/%{name}/%{version}/X11.so
417
418 %files devel
419 %defattr(644,root,root,755)
420 %attr(755,root,root) %{_libdir}/libgs.so
421 %{_includedir}/ghostscript
422
423 %files ijs
424 %defattr(644,root,root,755)
425 %doc ijs/README
426 %attr(755,root,root) %{_bindir}/ijs_client_example
427 %attr(755,root,root) %{_bindir}/ijs_server_example
428 %attr(755,root,root) %{_libdir}/libijs-*.so
429
430 %files ijs-devel
431 %defattr(644,root,root,755)
432 %attr(755,root,root) %{_libdir}/libijs.so
433 %{_libdir}/libijs.la
434 %{_includedir}/ijs
435 %{_pkgconfigdir}/ijs.pc
436
437 %files ijs-static
438 %defattr(644,root,root,755)
439 %{_libdir}/libijs.a
This page took 0.227531 seconds and 4 git commands to generate.