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