]>
Commit | Line | Data |
---|---|---|
8e79132b | 1 | # |
2 | # TODO: | |
90556ff1 JB |
3 | # - fix svga bcond |
4 | # - cups subpackage? | |
5 | # - add djvu driver: | |
6 | # http://dl.sourceforge.net/djvu/gsdjvu-1.3.tar.gz (or newer) | |
8e79132b | 7 | # |
8 | # Conditional build: | |
b37cb06d | 9 | %bcond_without system_jbig2dec # build with included jbig2dec |
8e79132b | 10 | %bcond_with svga # with svgalib display support (vgalib and lvga256 devices) |
0ec4d2db | 11 | %bcond_without gtk # without gsx |
8e79132b | 12 | # |
8e79132b | 13 | Summary: PostScript & PDF interpreter and renderer |
6d9b3c9a ER |
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 | |
9d77d33e | 19 | Name: ghostscript |
790f5716 AG |
20 | Version: 8.64 |
21 | Release: 0.1 | |
8e79132b | 22 | License: GPL |
23 | Group: Applications/Graphics | |
6f65d88f | 24 | Source0: http://dl.sourceforge.net/ghostscript/%{name}-%{version}.tar.bz2 |
790f5716 | 25 | # Source0-md5: b13289cb2115f38f40c5e064f87e228a |
a9cac4bf JB |
26 | Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2 |
27 | # Source1-md5: 9b5953aa0cc155f4364f20036b848585 | |
8e79132b | 28 | Patch0: %{name}-missquotes.patch |
29 | Patch1: %{name}-setuid.patch | |
30 | Patch2: %{name}-time_h.patch | |
31 | Patch3: %{name}-am.patch | |
32 | # no device for cdj850 in non-espgs ghostscript | |
33 | # look for patch in old spec for GNU ghostscript | |
34 | #Patch4: %{name}-gdevcd8-fixes.patch | |
35 | #Patch5: %{name}-glib.patch | |
8e79132b | 36 | URL: http://www.ghostscript.com/ |
38eaa2ed PG |
37 | # https://bugzilla.redhat.com/show_bug.cgi?id=487742 |
38 | # https://bugzilla.redhat.com/show_bug.cgi?id=487744 | |
39 | # Patches in RH: | |
40 | BuildRequires: security(CVE-2009-0583) | |
41 | BuildRequires: security(CVE-2009-0584) | |
06ca90a7 PG |
42 | ### |
43 | # Secunia Research 09/04/2009 | |
44 | # Fix in RH: | |
45 | # https://rhn.redhat.com/errata/RHSA-2009-0421.html | |
46 | BuildRequires: security(CVE-2009-0196) | |
3bd82353 PG |
47 | # http://bugs.ghostscript.com/show_bug.cgi?id=690211 |
48 | BuildRequires: security(690211) | |
8e79132b | 49 | BuildRequires: autoconf |
50 | BuildRequires: automake | |
51 | BuildRequires: docbook-style-dsssl | |
52 | BuildRequires: glib2-devel | |
53 | %{?with_system_jbig2dec:BuildRequires: jbig2dec-devel} | |
54 | # for gsx | |
55 | %{?with_gtk:BuildRequires: gtk+-devel} | |
56 | BuildRequires: libpng-devel >= 1.0.8 | |
57 | BuildRequires: libstdc++-devel | |
58 | BuildRequires: libtiff-devel | |
59 | BuildRequires: libtool | |
60 | BuildRequires: pkgconfig | |
8e79132b | 61 | # Required by 'gdevvglb' device. |
62 | %{?with_svga:BuildRequires: svgalib-devel} | |
63 | # for documentation regeneration | |
64 | BuildRequires: tetex | |
65 | BuildRequires: tetex-dvips | |
66 | BuildRequires: xorg-lib-libXext-devel | |
67 | BuildRequires: xorg-lib-libXt-devel | |
68 | Obsoletes: ghostscript-afpl | |
9d77d33e | 69 | Obsoletes: ghostscript-gpl |
b925fe6f | 70 | Obsoletes: ghostscript-esp |
8e79132b | 71 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
72 | ||
73 | %description | |
c1dd3860 ER |
74 | cos nGhostscript is a PostScript interpreter. It can render both |
75 | PostScript and PDF compliant files to devices which include an X | |
76 | window, many printer formats (including support for color printers), | |
77 | and popular graphics file formats. | |
8e79132b | 78 | |
9a147310 | 79 | %description -l de.UTF-8 |
8e79132b | 80 | Ghostscipt ist ein PostScript-Interpretierer. Er kann sowohl |
9a147310 JR |
81 | PostScript als auch PDF-konforme Dateien an Geräte ausgeben, zu denen |
82 | ein X-Fenster, viele Druckerformate (einschließlich Support für | |
83 | Farbdrucker) und gängige Grafikdateiformate zählen. | |
8e79132b | 84 | |
9a147310 JR |
85 | %description -l fr.UTF-8 |
86 | Ghostscript est un interpréteur PostScript. Il peut rendre des | |
87 | fichiers PostScript ou PDF sur des périphériques dont une fenêtre X,de | |
8e79132b | 88 | nombreux types d'imprimantes (dont un support pour imprimantes |
89 | couleur), et des formats de fichiers graphiques populaires. | |
90 | ||
9a147310 JR |
91 | %description -l ja.UTF-8 |
92 | Ghostscript は PostScript インタープリタです。ポストスクリプトと PDF | |
93 | をレンダリングし、X window や他のプリンタフォーマットで出力 | |
94 | します。このパッケージは日本語対応しています。 | |
8e79132b | 95 | |
9a147310 JR |
96 | %description -l pl.UTF-8 |
97 | Ghostcript jest interpreterem PostScriptu, języka używanego do opisu | |
98 | formatu dokumentu. Ghostscript potrafi przetworzyć dokument w formacie | |
99 | PostScript i PDF na szereg postaci wyjściowych: drukarki (włączając | |
8e79132b | 100 | kolorowe), okno X-Window i popularne formaty graficzne. |
101 | ||
9a147310 JR |
102 | %description -l tr.UTF-8 |
103 | GhostScript, PostScript ve PDF uyumlu dosyaları, X penceresinde | |
104 | gösterebilir ve birçok yazıcının (renkli yazıcılar dahil) basabileceği | |
105 | biçime getirebilir. | |
8e79132b | 106 | |
790f5716 | 107 | %package cups |
8548969f JB |
108 | Summary: Ghostscript CUPS files |
109 | Summary(pl.UTF-8): Pliki Ghostscripta dla CUPS-a | |
790f5716 AG |
110 | Group: Applications/Graphics |
111 | Requires: %{name} = %{version}-%{release} | |
112 | ||
113 | %description cups | |
8548969f JB |
114 | This package contains CUPS files provided by ghostscript. |
115 | ||
116 | %description cups -l pl.UTF-8 | |
117 | Ten pakiet zawiera pliki dla CUPS-a dostarczane przez ghostscript. | |
790f5716 | 118 | |
8e79132b | 119 | %package gtk |
120 | Summary: Ghostscript with GTK+ console | |
6d9b3c9a | 121 | Summary(pl.UTF-8): Ghostscript z konsolą GTK+ |
8e79132b | 122 | Group: Applications/Graphics |
123 | Requires: %{name} = %{version}-%{release} | |
124 | Obsoletes: ghostscript-afpl-gtk | |
0ec4d2db | 125 | Obsoletes: ghostscript-gpl-gtk |
b925fe6f | 126 | Obsoletes: ghostscript-esp-gtk |
8e79132b | 127 | |
128 | %description gtk | |
129 | Ghostscript with GTK+ console. | |
130 | ||
9a147310 JR |
131 | %description gtk -l pl.UTF-8 |
132 | Ghostscript z konsolą GTK+. | |
8e79132b | 133 | |
134 | %package devel | |
135 | Summary: libgs header files | |
6d9b3c9a | 136 | Summary(pl.UTF-8): Pliki nagłówkowe libgs |
8e79132b | 137 | Group: Development/Libraries |
138 | Requires: %{name} = %{version}-%{release} | |
139 | Obsoletes: ghostscript-afpl-devel | |
b925fe6f | 140 | Obsoletes: ghostscript-esp-devel |
8e79132b | 141 | |
142 | %description devel | |
143 | Header files for libgs - ghostscript shared library. | |
144 | ||
9a147310 JR |
145 | %description devel -l pl.UTF-8 |
146 | Pliki nagłówkowe libgs - współdzielonej biblioteki ghostscript. | |
8e79132b | 147 | |
148 | %package ijs-devel | |
149 | Summary: IJS development files | |
6d9b3c9a | 150 | Summary(pl.UTF-8): Pliki dla programistów IJS |
8e79132b | 151 | Group: Development/Libraries |
152 | Requires: %{name} = %{version}-%{release} | |
153 | Obsoletes: ghostscript-afpl-ijs-devel | |
b925fe6f | 154 | Obsoletes: ghostscript-esp-ijs-devel |
8e79132b | 155 | |
156 | %description ijs-devel | |
157 | IJS development files. | |
158 | ||
9a147310 JR |
159 | %description ijs-devel -l pl.UTF-8 |
160 | Pliki do tworzenia programów z użyciem biblioteki IJS. | |
8e79132b | 161 | |
162 | %package ijs-static | |
163 | Summary: Static libijs library | |
6d9b3c9a | 164 | Summary(pl.UTF-8): Statyczna biblioteka IJS |
8e79132b | 165 | Group: Development/Libraries |
166 | Requires: %{name}-ijs-devel = %{version}-%{release} | |
167 | Obsoletes: ghostscript-afpl-ijs-static | |
b925fe6f | 168 | Obsoletes: ghostscript-esp-ijs-static |
8e79132b | 169 | |
170 | %description ijs-static | |
171 | Static libijs library. | |
172 | ||
9a147310 | 173 | %description ijs-static -l pl.UTF-8 |
8e79132b | 174 | Statyczna wersja biblioteki IJS. |
175 | ||
176 | %prep | |
a9cac4bf | 177 | %setup -q |
8e79132b | 178 | %patch0 -p1 |
179 | %patch1 -p1 | |
180 | %patch2 -p1 | |
b925fe6f | 181 | #%patch3 -p1 |
640897c5 AG |
182 | #%%patch4 -p1 |
183 | #%%patch5 -p1 | |
8e79132b | 184 | |
185 | %build | |
186 | # workarounds | |
187 | touch ijs/ijs-config.1 | |
188 | %if %{with system_jbig2dec} | |
189 | if [ -d jbig2dec ]; then | |
190 | rm -rf jbig2dec | |
191 | fi | |
192 | %endif | |
d0535cb0 AM |
193 | cd jasper |
194 | %{__libtoolize} | |
195 | %{__aclocal} | |
196 | %{__autoconf} | |
197 | cd .. | |
8e79132b | 198 | %{__aclocal} |
199 | %{__autoconf} | |
d0535cb0 | 200 | CFLAGS="%{rpmcflags} -DA4 -fPIC" |
8e79132b | 201 | export CFLAGS |
202 | %configure \ | |
203 | --with-fontpath="%{_datadir}/fonts:%{_datadir}/fonts/Type1" \ | |
204 | --with-ijs \ | |
205 | --with-jbig2dec \ | |
206 | --with-jasper \ | |
d0535cb0 | 207 | --with-x \ |
f1a64408 | 208 | --with-drivers=ALL%{?with_svga:,vgalib,lvga256} \ |
d0535cb0 | 209 | --enable-dynamic |
8e79132b | 210 | |
211 | cd ijs | |
212 | %{__libtoolize} | |
213 | %{__aclocal} | |
214 | %{__autoconf} | |
215 | %{__automake} | |
216 | %configure \ | |
217 | --enable-shared | |
218 | cd .. | |
219 | ||
d0535cb0 | 220 | %{__make} -j1 \ |
c1dd3860 | 221 | docdir=%{_docdir}/%{name}-%{version} |
8e79132b | 222 | |
d0535cb0 | 223 | %{__make} -j1 so \ |
c1dd3860 | 224 | docdir=%{_docdir}/%{name}-%{version} |
8e79132b | 225 | |
226 | %install | |
227 | rm -rf $RPM_BUILD_ROOT | |
2940958e | 228 | install -d $RPM_BUILD_ROOT{%{_datadir}/ghostscript/lib,%{_libdir},%{_includedir}/{ghostscript,ps}} |
8e79132b | 229 | |
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 | |
790f5716 | 242 | install lib/{pdfopt,pdfwrite}.ps Resource/Init/gs_frsd.ps $RPM_BUILD_ROOT%{_datadir}/%{name}/lib |
8e79132b | 243 | |
2940958e | 244 | # Headers |
790f5716 | 245 | install base/gdevdsp{,2}.h psi/{iapi,ierrors}.h $RPM_BUILD_ROOT%{_includedir}/ghostscript |
2940958e | 246 | |
9d77d33e | 247 | rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/doc \ |
8e79132b | 248 | $RPM_BUILD_ROOT%{_bindir}/*.sh \ |
8b7d594e AM |
249 | $RPM_BUILD_ROOT%{_mandir}/man1/{ps2pdf1{2,3},gsbj,gsdj,gsdj500,gslj,eps2eps}.1 \ |
250 | $RPM_BUILD_ROOT%{_mandir}/de/man1/{ps2pdf1{2,3},eps2eps}.1 | |
8e79132b | 251 | |
252 | echo ".so gs.1" > $RPM_BUILD_ROOT%{_mandir}/man1/ghostscript.1 | |
253 | echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/man1/ps2pdf12.1 | |
254 | echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/man1/ps2pdf13.1 | |
255 | echo ".so ps2ps.1" > $RPM_BUILD_ROOT%{_mandir}/man1/eps2eps.1 | |
256 | echo ".so gslp.1" > $RPM_BUILD_ROOT%{_mandir}/man1/gsbj.1 | |
257 | echo ".so gslp.1" > $RPM_BUILD_ROOT%{_mandir}/man1/gsdj.1 | |
258 | echo ".so gslp.1" > $RPM_BUILD_ROOT%{_mandir}/man1/gsdj500.1 | |
259 | echo ".so gslp.1" > $RPM_BUILD_ROOT%{_mandir}/man1/gslj.1 | |
260 | ||
8b7d594e AM |
261 | echo ".so ps2ps.1" > $RPM_BUILD_ROOT%{_mandir}/de/man1/eps2eps.1 |
262 | echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/de/man1/ps2pdf12.1 | |
263 | echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/de/man1/ps2pdf13.1 | |
264 | ||
265 | ||
a9cac4bf | 266 | bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir} |
8e79132b | 267 | |
268 | #mv -f $RPM_BUILD_ROOT%{_bindir}/{gsc,gs} | |
269 | ln -sf gs $RPM_BUILD_ROOT%{_bindir}/gsc | |
270 | ln -sf gs $RPM_BUILD_ROOT%{_bindir}/ghostscript | |
271 | ||
272 | %clean | |
273 | rm -rf $RPM_BUILD_ROOT | |
274 | ||
275 | %post -p /sbin/ldconfig | |
276 | %postun -p /sbin/ldconfig | |
277 | ||
278 | %files | |
279 | %defattr(644,root,root,755) | |
c1dd3860 | 280 | %doc %{_docdir}/%{name}-%{version} |
8e79132b | 281 | %attr(755,root,root) %{_bindir}/[bdeflpsux]* |
790f5716 | 282 | %attr(755,root,root) %{_bindir}/ghostscript |
8e79132b | 283 | %attr(755,root,root) %{_bindir}/gs |
284 | %attr(755,root,root) %{_bindir}/wftopfa | |
285 | %attr(755,root,root) %{_bindir}/gs[!x]* | |
286 | %attr(755,root,root) %{_bindir}/ijs_*_example | |
287 | %attr(755,root,root) %{_libdir}/libgs.so.*.* | |
288 | %attr(755,root,root) %{_libdir}/libijs-*.so | |
9f441a61 | 289 | %dir %{_libdir}/%{name} |
d0535cb0 AM |
290 | %dir %{_libdir}/%{name}/*.* |
291 | %attr(755,root,root) %{_libdir}/%{name}/*.*/*.so | |
9d77d33e | 292 | %dir %{_datadir}/%{name} |
293 | %dir %{_datadir}/%{name}/lib | |
294 | %{_datadir}/%{name}/lib/*.* | |
295 | %dir %{_datadir}/%{name}/%{version} | |
296 | %dir %{_datadir}/%{name}/%{version}/lib | |
8e79132b | 297 | # "*.*" will not match "Fontmap". It is OK. |
9d77d33e | 298 | %{_datadir}/%{name}/%{version}/lib/*.* |
6f65d88f | 299 | %{_datadir}/%{name}/%{version}/lib/pphs |
9d77d33e | 300 | %{_datadir}/%{name}/%{version}/Resource |
301 | %{_datadir}/%{name}/%{version}/examples | |
8e79132b | 302 | %{_mandir}/man*/* |
303 | %lang(cs) %{_mandir}/cs/man*/* | |
304 | %lang(de) %{_mandir}/de/man*/* | |
305 | %lang(es) %{_mandir}/es/man*/* | |
306 | %lang(fr) %{_mandir}/fr/man*/* | |
307 | %lang(pl) %{_mandir}/pl/man*/* | |
308 | ||
790f5716 AG |
309 | %files cups |
310 | %defattr(644,root,root,755) | |
311 | /etc/cups/* | |
312 | %{_libdir}/cups/* | |
313 | %{_datadir}/cups/* | |
314 | ||
8e79132b | 315 | %if %{with gtk} |
316 | %files gtk | |
317 | %defattr(644,root,root,755) | |
318 | %attr(755,root,root) %{_bindir}/gsx | |
319 | %endif | |
320 | ||
321 | %files devel | |
322 | %defattr(644,root,root,755) | |
8e79132b | 323 | %attr(755,root,root) %{_libdir}/libgs.so |
2940958e MB |
324 | %{_includedir}/ghostscript |
325 | %{_includedir}/ps | |
8e79132b | 326 | |
327 | %files ijs-devel | |
328 | %defattr(644,root,root,755) | |
329 | %attr(755,root,root) %{_bindir}/ijs-config | |
330 | %attr(755,root,root) %{_libdir}/libijs.so | |
331 | %{_includedir}/ijs | |
332 | %{_libdir}/libijs.la | |
333 | %{_pkgconfigdir}/*.pc | |
334 | ||
335 | %files ijs-static | |
336 | %defattr(644,root,root,755) | |
337 | %{_libdir}/libijs.a |