]> git.pld-linux.org Git - packages/ghostscript.git/blob - ghostscript.spec
- updated to 9.20
[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_without  system_lcms2    # build with included lcms2
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.20
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/gs920/%{name}-%{version}.tar.xz
27 # Source0-md5:  8f3d383d48da22345937b66b01ab2960
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
33 Patch3:         %{name}-svga-shared.patch
34 Patch6:         %{name}-gdevcd8-fixes.patch
35 Patch8:         %{name}-zlib.patch
36
37 # fedora
38 Patch20:        %{name}-scripts.patch
39 Patch21:        %{name}-runlibfileifexists.patch
40 Patch27:        %{name}-Fontmap.local.patch
41 Patch28:        %{name}-iccprofiles-initdir.patch
42
43 URL:            http://www.ghostscript.com/
44 BuildRequires:  autoconf >= 2.57
45 BuildRequires:  automake >= 1.6
46 %{?with_cairo:BuildRequires:    cairo-devel >= 1.2.0}
47 BuildRequires:  dbus-devel
48 BuildRequires:  docbook-style-dsssl
49 BuildRequires:  fontconfig-devel
50 %{?with_system_freetype:BuildRequires:  freetype-devel >= 1:2.6}
51 %{?with_gtk:BuildRequires:      gtk+3-devel >= 3.0}
52 %{?with_system_jbig2dec:BuildRequires:  jbig2dec-devel >= 0.12}
53 %{?with_system_lcms2:BuildRequires:     lcms2-devel >= 2.6}
54 BuildRequires:  libidn-devel
55 BuildRequires:  libpaper-devel
56 BuildRequires:  libpng-devel >= 2:1.6.17
57 BuildRequires:  libstdc++-devel
58 BuildRequires:  libtiff-devel >= 4.0.1
59 BuildRequires:  libtool
60 BuildRequires:  pkgconfig
61 # Required by 'gdevvglb' device.
62 %{?with_svga:BuildRequires:     svgalib-devel}
63 BuildRequires:  tar >= 1:1.22
64 # for documentation regeneration
65 %if %{with texdocs}
66 BuildRequires:  tetex
67 BuildRequires:  tetex-dvips
68 %endif
69 BuildRequires:  xorg-lib-libXext-devel
70 BuildRequires:  xorg-lib-libXt-devel
71 BuildRequires:  xz
72 BuildRequires:  zlib-devel >= 1.2.8
73 %{?with_system_lcms2:Requires:  lcms2 >= 2.6}
74 Obsoletes:      ghostscript-afpl
75 Obsoletes:      ghostscript-esp
76 Obsoletes:      ghostscript-gpl
77 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
78
79 %define         _ulibdir        %{_prefix}/lib
80
81 %description
82 cos nGhostscript is a PostScript interpreter. It can render both
83 PostScript and PDF compliant files to devices which include an X
84 window, many printer formats (including support for color printers),
85 and popular graphics file formats.
86
87 %description -l de.UTF-8
88 Ghostscipt ist ein PostScript-Interpretierer. Er kann sowohl
89 PostScript als auch PDF-konforme Dateien an Geräte ausgeben, zu denen
90 ein X-Fenster, viele Druckerformate (einschließlich Support für
91 Farbdrucker) und gängige Grafikdateiformate zählen.
92
93 %description -l fr.UTF-8
94 Ghostscript est un interpréteur PostScript. Il peut rendre des
95 fichiers PostScript ou PDF sur des périphériques dont une fenêtre X,de
96 nombreux types d'imprimantes (dont un support pour imprimantes
97 couleur), et des formats de fichiers graphiques populaires.
98
99 %description -l ja.UTF-8
100 Ghostscript は PostScript インタープリタです。ポストスクリプトと PDF をレンダリングし、X window
101 や他のプリンタフォーマットで出力 します。このパッケージは日本語対応しています。
102
103 %description -l pl.UTF-8
104 Ghostcript jest interpreterem PostScriptu, języka używanego do opisu
105 formatu dokumentu. Ghostscript potrafi przetworzyć dokument w formacie
106 PostScript i PDF na szereg postaci wyjściowych: drukarki (włączając
107 kolorowe), okno X-Window i popularne formaty graficzne.
108
109 %description -l tr.UTF-8
110 GhostScript, PostScript ve PDF uyumlu dosyaları, X penceresinde
111 gösterebilir ve birçok yazıcının (renkli yazıcılar dahil) basabileceği
112 biçime getirebilir.
113
114 %package gtk
115 Summary:        Ghostscript with GTK+ console
116 Summary(pl.UTF-8):      Ghostscript z konsolą GTK+
117 Group:          Applications/Graphics
118 Requires:       %{name} = %{version}-%{release}
119 Obsoletes:      ghostscript-afpl-gtk
120 Obsoletes:      ghostscript-esp-gtk
121 Obsoletes:      ghostscript-gpl-gtk
122
123 %description gtk
124 Ghostscript with GTK+ console.
125
126 %description gtk -l pl.UTF-8
127 Ghostscript z konsolą GTK+.
128
129 %package svga
130 Summary:        SVGAlib drivers for Ghostscript
131 Summary(pl.UTF-8):      Sterowniki SVGAlib dla Ghostscripta
132 Group:          Applications/Graphics
133 Requires:       %{name} = %{version}-%{release}
134
135 %description svga
136 SVGAlib output drivers for Ghostscript: lvga256, vgalib.
137
138 %description svga -l pl.UTF-8
139 Sterowniki wyjściowe SVGAlib dla Ghostscripta: lvga256, vgalib.
140
141 %package x11
142 Summary:        X Window System drivers for Ghostscript
143 Summary(pl.UTF-8):      Sterowniki systemu X Window dla Ghostscripta
144 Group:          Applications/Graphics
145 Requires:       %{name} = %{version}-%{release}
146
147 %description x11
148 X Window System output drivers for Ghostscript: x11, x11alpha.
149
150 %description x11 -l pl.UTF-8
151 Sterowniki wyjściowe systemu X Window dla Ghostscripta: x11, x11alpha.
152
153 %package devel
154 Summary:        libgs header files
155 Summary(pl.UTF-8):      Pliki nagłówkowe libgs
156 Group:          Development/Libraries
157 Requires:       %{name} = %{version}-%{release}
158 Obsoletes:      ghostscript-afpl-devel
159 Obsoletes:      ghostscript-esp-devel
160
161 %description devel
162 Header files for libgs - ghostscript shared library.
163
164 %description devel -l pl.UTF-8
165 Pliki nagłówkowe libgs - współdzielonej biblioteki ghostscript.
166
167 %package doc
168 Summary:        Documentation for ghostscript
169 Group:          Documentation
170 %if "%{_rpmversion}" >= "5"
171 BuildArch:      noarch
172 %endif
173
174 %description doc
175 The documentation files that come with ghostscript.
176
177 %package ijs
178 Summary:        IJS (InkJet Server) shared library
179 Summary(pl.UTF-8):      Biblioteka współdzielona IJS (InkJet Server)
180 Group:          Libraries
181 Conflicts:      ghostscript < 9.10-2
182
183 %description ijs
184 IJS (InkJet Server) Raster Image Transport Protocol shared library.
185
186 %description ijs -l pl.UTF-8
187 Biblioteka współdzielona protokołu transportu obrazów rastrowych IJS
188 (InkJet Server).
189
190 %package ijs-devel
191 Summary:        IJS development files
192 Summary(pl.UTF-8):      Pliki dla programistów IJS
193 Group:          Development/Libraries
194 Requires:       %{name}-ijs = %{version}-%{release}
195 Obsoletes:      ghostscript-afpl-ijs-devel
196 Obsoletes:      ghostscript-esp-ijs-devel
197
198 %description ijs-devel
199 IJS development files.
200
201 %description ijs-devel -l pl.UTF-8
202 Pliki do tworzenia programów z użyciem biblioteki IJS.
203
204 %package ijs-static
205 Summary:        Static libijs library
206 Summary(pl.UTF-8):      Statyczna biblioteka IJS
207 Group:          Development/Libraries
208 Requires:       %{name}-ijs-devel = %{version}-%{release}
209 Obsoletes:      ghostscript-afpl-ijs-static
210 Obsoletes:      ghostscript-esp-ijs-static
211
212 %description ijs-static
213 Static libijs library.
214
215 %description ijs-static -l pl.UTF-8
216 Statyczna wersja biblioteki IJS.
217
218 %prep
219 %setup -q
220 %patch0 -p1
221 %patch1 -p1
222
223 %patch3 -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 # lcms2 is 2.6 with some minor future changes (one already in 2.7, two post-2.7, extra_xform.h ???)
245 %{?with_system_lcms2:%{__rm} -r lcms2}
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}/font2c
331 %attr(755,root,root) %{_bindir}/ghostscript
332 %attr(755,root,root) %{_bindir}/gs
333 %attr(755,root,root) %{_bindir}/gsbj
334 %attr(755,root,root) %{_bindir}/gsc
335 %attr(755,root,root) %{_bindir}/gsdj
336 %attr(755,root,root) %{_bindir}/gsdj500
337 %attr(755,root,root) %{_bindir}/gslj
338 %attr(755,root,root) %{_bindir}/gslp
339 %attr(755,root,root) %{_bindir}/gsnd
340 %attr(755,root,root) %{_bindir}/pdf2dsc
341 %attr(755,root,root) %{_bindir}/pdf2ps
342 %attr(755,root,root) %{_bindir}/pf2afm
343 %attr(755,root,root) %{_bindir}/pfbtopfa
344 %attr(755,root,root) %{_bindir}/printafm
345 %attr(755,root,root) %{_bindir}/ps2ascii
346 %attr(755,root,root) %{_bindir}/ps2epsi
347 %attr(755,root,root) %{_bindir}/ps2pdf
348 %attr(755,root,root) %{_bindir}/ps2pdf12
349 %attr(755,root,root) %{_bindir}/ps2pdf13
350 %attr(755,root,root) %{_bindir}/ps2pdf14
351 %attr(755,root,root) %{_bindir}/ps2pdfwr
352 %attr(755,root,root) %{_bindir}/ps2ps
353 %attr(755,root,root) %{_bindir}/ps2ps2
354 %attr(755,root,root) %{_bindir}/pphs
355 %attr(755,root,root) %{_bindir}/wftopfa
356 %attr(755,root,root) %{_libdir}/libgs.so.*.*
357 %attr(755,root,root) %ghost %{_libdir}/libgs.so.9
358 %dir %{_libdir}/%{name}
359 %dir %{_libdir}/%{name}/%{version}
360 %dir %{_datadir}/%{name}
361 %dir %{_datadir}/%{name}/%{version}
362 %{_datadir}/%{name}/%{version}/Resource
363 %{_datadir}/%{name}/%{version}/iccprofiles
364 %dir %{_datadir}/%{name}/%{version}/lib
365 %{_datadir}/%{name}/%{version}/examples
366 %{_datadir}/%{name}/%{version}/lib/*.ppd
367 %{_datadir}/%{name}/%{version}/lib/*.ps
368 %{_datadir}/%{name}/%{version}/lib/*.rpd
369 %{_datadir}/%{name}/%{version}/lib/*.src
370 %{_datadir}/%{name}/%{version}/lib/*.upp
371 %{_datadir}/%{name}/%{version}/lib/*.x[bp]m
372 %{_mandir}/man1/dvipdf.1*
373 %{_mandir}/man1/eps2eps.1*
374 %{_mandir}/man1/font2c.1*
375 %{_mandir}/man1/ghostscript.1*
376 %{_mandir}/man1/gs.1*
377 %{_mandir}/man1/gsbj.1*
378 %{_mandir}/man1/gsdj.1*
379 %{_mandir}/man1/gsdj500.1*
380 %{_mandir}/man1/gslj.1*
381 %{_mandir}/man1/gslp.1*
382 %{_mandir}/man1/gsnd.1*
383 %{_mandir}/man1/pdf2dsc.1*
384 %{_mandir}/man1/pdf2ps.1*
385 %{_mandir}/man1/pf2afm.1*
386 %{_mandir}/man1/pfbtopfa.1*
387 %{_mandir}/man1/printafm.1*
388 %{_mandir}/man1/ps2ascii.1*
389 %{_mandir}/man1/ps2epsi.1*
390 %{_mandir}/man1/ps2pdf.1*
391 %{_mandir}/man1/ps2pdf12.1*
392 %{_mandir}/man1/ps2pdf13.1*
393 %{_mandir}/man1/ps2pdf14.1*
394 %{_mandir}/man1/ps2pdfwr.1*
395 %{_mandir}/man1/ps2ps.1*
396 %{_mandir}/man1/wftopfa.1*
397 %lang(cs) %{_mandir}/cs/man1/*
398 %lang(de) %{_mandir}/de/man1/*
399 %lang(es) %{_mandir}/es/man1/*
400 %lang(fr) %{_mandir}/fr/man1/*
401 %lang(pl) %{_mandir}/pl/man1/*
402
403 %files doc
404 %doc %{_docdir}/%{name}-%{version}
405
406 %if %{with gtk}
407 %files gtk
408 %defattr(644,root,root,755)
409 %attr(755,root,root) %{_bindir}/gsx
410 %endif
411
412 %if %{with svga}
413 %files svga
414 %defattr(644,root,root,755)
415 %attr(755,root,root) %{_libdir}/%{name}/%{version}/lvga256.so
416 %attr(755,root,root) %{_libdir}/%{name}/%{version}/vgalib.so
417 %endif
418
419 %files x11
420 %defattr(644,root,root,755)
421 %attr(755,root,root) %{_libdir}/%{name}/%{version}/X11.so
422
423 %files devel
424 %defattr(644,root,root,755)
425 %attr(755,root,root) %{_libdir}/libgs.so
426 %{_includedir}/ghostscript
427
428 %files ijs
429 %defattr(644,root,root,755)
430 %doc ijs/README
431 %attr(755,root,root) %{_bindir}/ijs_client_example
432 %attr(755,root,root) %{_bindir}/ijs_server_example
433 %attr(755,root,root) %{_libdir}/libijs-*.so
434
435 %files ijs-devel
436 %defattr(644,root,root,755)
437 %attr(755,root,root) %{_libdir}/libijs.so
438 %{_libdir}/libijs.la
439 %{_includedir}/ijs
440 %{_pkgconfigdir}/ijs.pc
441
442 %files ijs-static
443 %defattr(644,root,root,755)
444 %{_libdir}/libijs.a
This page took 0.083881 seconds and 3 git commands to generate.