]>
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) | |
42 | ## | |
8e79132b | 43 | BuildRequires: autoconf |
44 | BuildRequires: automake | |
45 | BuildRequires: docbook-style-dsssl | |
46 | BuildRequires: glib2-devel | |
47 | %{?with_system_jbig2dec:BuildRequires: jbig2dec-devel} | |
48 | # for gsx | |
49 | %{?with_gtk:BuildRequires: gtk+-devel} | |
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} | |
57 | # for documentation regeneration | |
58 | BuildRequires: tetex | |
59 | BuildRequires: tetex-dvips | |
60 | BuildRequires: xorg-lib-libXext-devel | |
61 | BuildRequires: xorg-lib-libXt-devel | |
62 | Obsoletes: ghostscript-afpl | |
9d77d33e | 63 | Obsoletes: ghostscript-gpl |
b925fe6f | 64 | Obsoletes: ghostscript-esp |
8e79132b | 65 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
66 | ||
67 | %description | |
c1dd3860 ER |
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. | |
8e79132b | 72 | |
9a147310 | 73 | %description -l de.UTF-8 |
8e79132b | 74 | Ghostscipt ist ein PostScript-Interpretierer. Er kann sowohl |
9a147310 JR |
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. | |
8e79132b | 78 | |
9a147310 JR |
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 | |
8e79132b | 82 | nombreux types d'imprimantes (dont un support pour imprimantes |
83 | couleur), et des formats de fichiers graphiques populaires. | |
84 | ||
9a147310 JR |
85 | %description -l ja.UTF-8 |
86 | Ghostscript は PostScript インタープリタです。ポストスクリプトと PDF | |
87 | をレンダリングし、X window や他のプリンタフォーマットで出力 | |
88 | します。このパッケージは日本語対応しています。 | |
8e79132b | 89 | |
9a147310 JR |
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 | |
8e79132b | 94 | kolorowe), okno X-Window i popularne formaty graficzne. |
95 | ||
9a147310 JR |
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. | |
8e79132b | 100 | |
790f5716 | 101 | %package cups |
8548969f JB |
102 | Summary: Ghostscript CUPS files |
103 | Summary(pl.UTF-8): Pliki Ghostscripta dla CUPS-a | |
790f5716 AG |
104 | Group: Applications/Graphics |
105 | Requires: %{name} = %{version}-%{release} | |
106 | ||
107 | %description cups | |
8548969f JB |
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. | |
790f5716 | 112 | |
8e79132b | 113 | %package gtk |
114 | Summary: Ghostscript with GTK+ console | |
6d9b3c9a | 115 | Summary(pl.UTF-8): Ghostscript z konsolą GTK+ |
8e79132b | 116 | Group: Applications/Graphics |
117 | Requires: %{name} = %{version}-%{release} | |
118 | Obsoletes: ghostscript-afpl-gtk | |
0ec4d2db | 119 | Obsoletes: ghostscript-gpl-gtk |
b925fe6f | 120 | Obsoletes: ghostscript-esp-gtk |
8e79132b | 121 | |
122 | %description gtk | |
123 | Ghostscript with GTK+ console. | |
124 | ||
9a147310 JR |
125 | %description gtk -l pl.UTF-8 |
126 | Ghostscript z konsolą GTK+. | |
8e79132b | 127 | |
128 | %package devel | |
129 | Summary: libgs header files | |
6d9b3c9a | 130 | Summary(pl.UTF-8): Pliki nagłówkowe libgs |
8e79132b | 131 | Group: Development/Libraries |
132 | Requires: %{name} = %{version}-%{release} | |
133 | Obsoletes: ghostscript-afpl-devel | |
b925fe6f | 134 | Obsoletes: ghostscript-esp-devel |
8e79132b | 135 | |
136 | %description devel | |
137 | Header files for libgs - ghostscript shared library. | |
138 | ||
9a147310 JR |
139 | %description devel -l pl.UTF-8 |
140 | Pliki nagłówkowe libgs - współdzielonej biblioteki ghostscript. | |
8e79132b | 141 | |
142 | %package ijs-devel | |
143 | Summary: IJS development files | |
6d9b3c9a | 144 | Summary(pl.UTF-8): Pliki dla programistów IJS |
8e79132b | 145 | Group: Development/Libraries |
146 | Requires: %{name} = %{version}-%{release} | |
147 | Obsoletes: ghostscript-afpl-ijs-devel | |
b925fe6f | 148 | Obsoletes: ghostscript-esp-ijs-devel |
8e79132b | 149 | |
150 | %description ijs-devel | |
151 | IJS development files. | |
152 | ||
9a147310 JR |
153 | %description ijs-devel -l pl.UTF-8 |
154 | Pliki do tworzenia programów z użyciem biblioteki IJS. | |
8e79132b | 155 | |
156 | %package ijs-static | |
157 | Summary: Static libijs library | |
6d9b3c9a | 158 | Summary(pl.UTF-8): Statyczna biblioteka IJS |
8e79132b | 159 | Group: Development/Libraries |
160 | Requires: %{name}-ijs-devel = %{version}-%{release} | |
161 | Obsoletes: ghostscript-afpl-ijs-static | |
b925fe6f | 162 | Obsoletes: ghostscript-esp-ijs-static |
8e79132b | 163 | |
164 | %description ijs-static | |
165 | Static libijs library. | |
166 | ||
9a147310 | 167 | %description ijs-static -l pl.UTF-8 |
8e79132b | 168 | Statyczna wersja biblioteki IJS. |
169 | ||
170 | %prep | |
a9cac4bf | 171 | %setup -q |
8e79132b | 172 | %patch0 -p1 |
173 | %patch1 -p1 | |
174 | %patch2 -p1 | |
b925fe6f | 175 | #%patch3 -p1 |
640897c5 AG |
176 | #%%patch4 -p1 |
177 | #%%patch5 -p1 | |
8e79132b | 178 | |
179 | %build | |
180 | # workarounds | |
181 | touch ijs/ijs-config.1 | |
182 | %if %{with system_jbig2dec} | |
183 | if [ -d jbig2dec ]; then | |
184 | rm -rf jbig2dec | |
185 | fi | |
186 | %endif | |
d0535cb0 AM |
187 | cd jasper |
188 | %{__libtoolize} | |
189 | %{__aclocal} | |
190 | %{__autoconf} | |
191 | cd .. | |
8e79132b | 192 | %{__aclocal} |
193 | %{__autoconf} | |
d0535cb0 | 194 | CFLAGS="%{rpmcflags} -DA4 -fPIC" |
8e79132b | 195 | export CFLAGS |
196 | %configure \ | |
197 | --with-fontpath="%{_datadir}/fonts:%{_datadir}/fonts/Type1" \ | |
198 | --with-ijs \ | |
199 | --with-jbig2dec \ | |
200 | --with-jasper \ | |
d0535cb0 | 201 | --with-x \ |
f1a64408 | 202 | --with-drivers=ALL%{?with_svga:,vgalib,lvga256} \ |
d0535cb0 | 203 | --enable-dynamic |
8e79132b | 204 | |
205 | cd ijs | |
206 | %{__libtoolize} | |
207 | %{__aclocal} | |
208 | %{__autoconf} | |
209 | %{__automake} | |
210 | %configure \ | |
211 | --enable-shared | |
212 | cd .. | |
213 | ||
d0535cb0 | 214 | %{__make} -j1 \ |
c1dd3860 | 215 | docdir=%{_docdir}/%{name}-%{version} |
8e79132b | 216 | |
d0535cb0 | 217 | %{__make} -j1 so \ |
c1dd3860 | 218 | docdir=%{_docdir}/%{name}-%{version} |
8e79132b | 219 | |
220 | %install | |
221 | rm -rf $RPM_BUILD_ROOT | |
2940958e | 222 | install -d $RPM_BUILD_ROOT{%{_datadir}/ghostscript/lib,%{_libdir},%{_includedir}/{ghostscript,ps}} |
8e79132b | 223 | |
224 | ||
225 | %{__make} install \ | |
d0535cb0 AM |
226 | DESTDIR=$RPM_BUILD_ROOT \ |
227 | docdir=%{_docdir}/%{name}-%{version} | |
8e79132b | 228 | |
229 | %{__make} soinstall \ | |
d0535cb0 AM |
230 | DESTDIR=$RPM_BUILD_ROOT \ |
231 | docdir=%{_docdir}/%{name}-%{version} | |
8e79132b | 232 | |
a9cac4bf | 233 | %{__make} -C ijs install \ |
8e79132b | 234 | DESTDIR=$RPM_BUILD_ROOT |
8e79132b | 235 | |
790f5716 | 236 | install lib/{pdfopt,pdfwrite}.ps Resource/Init/gs_frsd.ps $RPM_BUILD_ROOT%{_datadir}/%{name}/lib |
8e79132b | 237 | |
2940958e | 238 | # Headers |
790f5716 | 239 | install base/gdevdsp{,2}.h psi/{iapi,ierrors}.h $RPM_BUILD_ROOT%{_includedir}/ghostscript |
2940958e | 240 | |
9d77d33e | 241 | rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/doc \ |
8e79132b | 242 | $RPM_BUILD_ROOT%{_bindir}/*.sh \ |
8b7d594e AM |
243 | $RPM_BUILD_ROOT%{_mandir}/man1/{ps2pdf1{2,3},gsbj,gsdj,gsdj500,gslj,eps2eps}.1 \ |
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 | ||
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} |
8e79132b | 275 | %attr(755,root,root) %{_bindir}/[bdeflpsux]* |
790f5716 | 276 | %attr(755,root,root) %{_bindir}/ghostscript |
8e79132b | 277 | %attr(755,root,root) %{_bindir}/gs |
278 | %attr(755,root,root) %{_bindir}/wftopfa | |
279 | %attr(755,root,root) %{_bindir}/gs[!x]* | |
280 | %attr(755,root,root) %{_bindir}/ijs_*_example | |
281 | %attr(755,root,root) %{_libdir}/libgs.so.*.* | |
282 | %attr(755,root,root) %{_libdir}/libijs-*.so | |
9f441a61 | 283 | %dir %{_libdir}/%{name} |
d0535cb0 AM |
284 | %dir %{_libdir}/%{name}/*.* |
285 | %attr(755,root,root) %{_libdir}/%{name}/*.*/*.so | |
9d77d33e | 286 | %dir %{_datadir}/%{name} |
287 | %dir %{_datadir}/%{name}/lib | |
288 | %{_datadir}/%{name}/lib/*.* | |
289 | %dir %{_datadir}/%{name}/%{version} | |
290 | %dir %{_datadir}/%{name}/%{version}/lib | |
8e79132b | 291 | # "*.*" will not match "Fontmap". It is OK. |
9d77d33e | 292 | %{_datadir}/%{name}/%{version}/lib/*.* |
6f65d88f | 293 | %{_datadir}/%{name}/%{version}/lib/pphs |
9d77d33e | 294 | %{_datadir}/%{name}/%{version}/Resource |
295 | %{_datadir}/%{name}/%{version}/examples | |
8e79132b | 296 | %{_mandir}/man*/* |
297 | %lang(cs) %{_mandir}/cs/man*/* | |
298 | %lang(de) %{_mandir}/de/man*/* | |
299 | %lang(es) %{_mandir}/es/man*/* | |
300 | %lang(fr) %{_mandir}/fr/man*/* | |
301 | %lang(pl) %{_mandir}/pl/man*/* | |
302 | ||
790f5716 AG |
303 | %files cups |
304 | %defattr(644,root,root,755) | |
305 | /etc/cups/* | |
306 | %{_libdir}/cups/* | |
307 | %{_datadir}/cups/* | |
308 | ||
8e79132b | 309 | %if %{with gtk} |
310 | %files gtk | |
311 | %defattr(644,root,root,755) | |
312 | %attr(755,root,root) %{_bindir}/gsx | |
313 | %endif | |
314 | ||
315 | %files devel | |
316 | %defattr(644,root,root,755) | |
8e79132b | 317 | %attr(755,root,root) %{_libdir}/libgs.so |
2940958e MB |
318 | %{_includedir}/ghostscript |
319 | %{_includedir}/ps | |
8e79132b | 320 | |
321 | %files ijs-devel | |
322 | %defattr(644,root,root,755) | |
323 | %attr(755,root,root) %{_bindir}/ijs-config | |
324 | %attr(755,root,root) %{_libdir}/libijs.so | |
325 | %{_includedir}/ijs | |
326 | %{_libdir}/libijs.la | |
327 | %{_pkgconfigdir}/*.pc | |
328 | ||
329 | %files ijs-static | |
330 | %defattr(644,root,root,755) | |
331 | %{_libdir}/libijs.a |