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