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