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