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