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