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