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