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