]> git.pld-linux.org Git - packages/ghostscript.git/blob - ghostscript.spec
32b88aa7ed17a75c01618c46c6d11777feb7b257
[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.52
21 Release:        2
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/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
31
32 Patch6:         %{name}-gdevcd8-fixes.patch
33 Patch8:         %{name}-zlib.patch
34
35 # fedora
36 Patch20:        %{name}-scripts.patch
37
38 Patch28:        %{name}-iccprofiles-initdir.patch
39
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
61 %if %{with texdocs}
62 BuildRequires:  tetex
63 BuildRequires:  tetex-dvips
64 %endif
65 BuildRequires:  xorg-lib-libX11-devel
66 BuildRequires:  xorg-lib-libXext-devel
67 BuildRequires:  xorg-lib-libXt-devel
68 BuildRequires:  xz
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)
81
82 %define         _ulibdir        %{_prefix}/lib
83
84 %description
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.
89
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.
95
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.
101
102 %description -l ja.UTF-8
103 Ghostscript は PostScript インタープリタです。ポストスクリプトと PDF をレンダリングし、X window
104 や他のプリンタフォーマットで出力 します。このパッケージは日本語対応しています。
105
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.
111
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
115 biçime getirebilir.
116
117 %package gtk
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
125
126 %description gtk
127 Ghostscript with GTK+ console.
128
129 %description gtk -l pl.UTF-8
130 Ghostscript z konsolą GTK+.
131
132 %package x11
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}
137
138 %description x11
139 X Window System output drivers for Ghostscript: x11, x11alpha.
140
141 %description x11 -l pl.UTF-8
142 Sterowniki wyjściowe systemu X Window dla Ghostscripta: x11, x11alpha.
143
144 %package devel
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
151
152 %description devel
153 Header files for libgs - ghostscript shared library.
154
155 %description devel -l pl.UTF-8
156 Pliki nagłówkowe libgs - współdzielonej biblioteki ghostscript.
157
158 %package doc
159 Summary:        Documentation for ghostscript
160 Group:          Documentation
161 %if "%{_rpmversion}" >= "5"
162 BuildArch:      noarch
163 %endif
164
165 %description doc
166 The documentation files that come with ghostscript.
167
168 %package ijs
169 Summary:        IJS (InkJet Server) shared library
170 Summary(pl.UTF-8):      Biblioteka współdzielona IJS (InkJet Server)
171 Group:          Libraries
172 Conflicts:      ghostscript < 9.10-2
173
174 %description ijs
175 IJS (InkJet Server) Raster Image Transport Protocol shared library.
176
177 %description ijs -l pl.UTF-8
178 Biblioteka współdzielona protokołu transportu obrazów rastrowych IJS
179 (InkJet Server).
180
181 %package ijs-devel
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
188
189 %description ijs-devel
190 IJS development files.
191
192 %description ijs-devel -l pl.UTF-8
193 Pliki do tworzenia programów z użyciem biblioteki IJS.
194
195 %package ijs-static
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
202
203 %description ijs-static
204 Static libijs library.
205
206 %description ijs-static -l pl.UTF-8
207 Statyczna wersja biblioteki IJS.
208
209 %prep
210 %setup -q
211 %patch0 -p1
212 %patch2 -p1
213
214 %patch6 -p1
215 %patch8 -p1
216
217 %patch20 -p1
218
219 %patch28 -p1
220
221 %build
222 # use system libs:
223 # freetype 2.10.1
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}
233 %{__aclocal}
234 %{__autoconf}
235 %configure \
236         CFLAGS="%{rpmcflags} -DA4" \
237         %{!?with_cairo:--disable-cairo} \
238         --disable-compile-inits \
239         --enable-dynamic \
240         --with-drivers=ALL \
241         --with-fontpath="%{_datadir}/fonts:%{_datadir}/fonts/Type1" \
242         --with-ijs \
243         --with-jbig2dec \
244         --with-pdftoraster \
245         --with-system-libtiff \
246         --with-x
247
248 cd ijs
249 %{__libtoolize}
250 %{__aclocal}
251 %{__autoconf}
252 %{__automake}
253 %configure \
254         --enable-shared
255 %{__make}
256 cd ..
257
258 %{__make} -j1 so \
259         docdir=%{_docdir}/%{name}-%{version}
260
261 %{__make} -j1 \
262         docdir=%{_docdir}/%{name}-%{version}
263
264 %install
265 rm -rf $RPM_BUILD_ROOT
266
267 %{__make} soinstall \
268         DESTDIR=$RPM_BUILD_ROOT \
269         docdir=%{_docdir}/%{name}-%{version}
270
271 %{__make} install \
272         DESTDIR=$RPM_BUILD_ROOT \
273         docdir=%{_docdir}/%{name}-%{version}
274
275 %{__make} -C ijs install \
276         DESTDIR=$RPM_BUILD_ROOT
277
278 cp -p base/gserrors.h $RPM_BUILD_ROOT%{_includedir}/ghostscript
279
280 cp -p LICENSE $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
281
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
285
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
294
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
298
299 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
300 %{__rm} $RPM_BUILD_ROOT%{_mandir}/README.ghostscript-non-english-man-pages
301
302 ln -sf gs $RPM_BUILD_ROOT%{_bindir}/gsc
303 ln -sf gs $RPM_BUILD_ROOT%{_bindir}/ghostscript
304
305 %clean
306 rm -rf $RPM_BUILD_ROOT
307
308 %post   -p /sbin/ldconfig
309 %postun -p /sbin/ldconfig
310
311 %post   ijs -p /sbin/ldconfig
312 %postun ijs -p /sbin/ldconfig
313
314 %files
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/*
385
386 %files doc
387 %defattr(644,root,root,755)
388 %doc %{_docdir}/%{name}-%{version}
389
390 %if %{with gtk}
391 %files gtk
392 %defattr(644,root,root,755)
393 %attr(755,root,root) %{_bindir}/gsx
394 %endif
395
396 %files x11
397 %defattr(644,root,root,755)
398 %attr(755,root,root) %{_libdir}/%{name}/%{version}/X11.so
399
400 %files devel
401 %defattr(644,root,root,755)
402 %attr(755,root,root) %{_libdir}/libgs.so
403 %{_includedir}/ghostscript
404
405 %files ijs
406 %defattr(644,root,root,755)
407 %doc ijs/README
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
411
412 %files ijs-devel
413 %defattr(644,root,root,755)
414 %attr(755,root,root) %{_libdir}/libijs.so
415 %{_libdir}/libijs.la
416 %{_includedir}/ijs
417 %{_pkgconfigdir}/ijs.pc
418
419 %files ijs-static
420 %defattr(644,root,root,755)
421 %{_libdir}/libijs.a
This page took 0.10277 seconds and 2 git commands to generate.