]>
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/ |
bafd8782 JB |
41 | BuildRequires: autoconf >= 2.53 |
42 | BuildRequires: automake >= 1.6 | |
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} | |
0411d6a2 | 56 | BuildRequires: tar >= 1:1.22 |
8e79132b | 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 | ||
747dc7d6 AM |
67 | %define _ulibdir %{_prefix}/lib |
68 | ||
8e79132b | 69 | %description |
c1dd3860 ER |
70 | cos nGhostscript is a PostScript interpreter. It can render both |
71 | PostScript and PDF compliant files to devices which include an X | |
72 | window, many printer formats (including support for color printers), | |
73 | and popular graphics file formats. | |
8e79132b | 74 | |
9a147310 | 75 | %description -l de.UTF-8 |
8e79132b | 76 | Ghostscipt ist ein PostScript-Interpretierer. Er kann sowohl |
9a147310 JR |
77 | PostScript als auch PDF-konforme Dateien an Geräte ausgeben, zu denen |
78 | ein X-Fenster, viele Druckerformate (einschließlich Support für | |
79 | Farbdrucker) und gängige Grafikdateiformate zählen. | |
8e79132b | 80 | |
9a147310 JR |
81 | %description -l fr.UTF-8 |
82 | Ghostscript est un interpréteur PostScript. Il peut rendre des | |
83 | fichiers PostScript ou PDF sur des périphériques dont une fenêtre X,de | |
8e79132b | 84 | nombreux types d'imprimantes (dont un support pour imprimantes |
85 | couleur), et des formats de fichiers graphiques populaires. | |
86 | ||
9a147310 JR |
87 | %description -l ja.UTF-8 |
88 | Ghostscript は PostScript インタープリタです。ポストスクリプトと PDF | |
89 | をレンダリングし、X window や他のプリンタフォーマットで出力 | |
90 | します。このパッケージは日本語対応しています。 | |
8e79132b | 91 | |
9a147310 JR |
92 | %description -l pl.UTF-8 |
93 | Ghostcript jest interpreterem PostScriptu, języka używanego do opisu | |
94 | formatu dokumentu. Ghostscript potrafi przetworzyć dokument w formacie | |
95 | PostScript i PDF na szereg postaci wyjściowych: drukarki (włączając | |
8e79132b | 96 | kolorowe), okno X-Window i popularne formaty graficzne. |
97 | ||
9a147310 JR |
98 | %description -l tr.UTF-8 |
99 | GhostScript, PostScript ve PDF uyumlu dosyaları, X penceresinde | |
100 | gösterebilir ve birçok yazıcının (renkli yazıcılar dahil) basabileceği | |
101 | biçime getirebilir. | |
8e79132b | 102 | |
790f5716 | 103 | %package cups |
8548969f JB |
104 | Summary: Ghostscript CUPS files |
105 | Summary(pl.UTF-8): Pliki Ghostscripta dla CUPS-a | |
790f5716 AG |
106 | Group: Applications/Graphics |
107 | Requires: %{name} = %{version}-%{release} | |
108 | ||
109 | %description cups | |
8548969f JB |
110 | This package contains CUPS files provided by ghostscript. |
111 | ||
112 | %description cups -l pl.UTF-8 | |
113 | Ten pakiet zawiera pliki dla CUPS-a dostarczane przez ghostscript. | |
790f5716 | 114 | |
8e79132b | 115 | %package gtk |
116 | Summary: Ghostscript with GTK+ console | |
6d9b3c9a | 117 | Summary(pl.UTF-8): Ghostscript z konsolą GTK+ |
8e79132b | 118 | Group: Applications/Graphics |
119 | Requires: %{name} = %{version}-%{release} | |
120 | Obsoletes: ghostscript-afpl-gtk | |
0ec4d2db | 121 | Obsoletes: ghostscript-gpl-gtk |
b925fe6f | 122 | Obsoletes: ghostscript-esp-gtk |
8e79132b | 123 | |
124 | %description gtk | |
125 | Ghostscript with GTK+ console. | |
126 | ||
9a147310 JR |
127 | %description gtk -l pl.UTF-8 |
128 | Ghostscript z konsolą GTK+. | |
8e79132b | 129 | |
130 | %package devel | |
131 | Summary: libgs header files | |
6d9b3c9a | 132 | Summary(pl.UTF-8): Pliki nagłówkowe libgs |
8e79132b | 133 | Group: Development/Libraries |
134 | Requires: %{name} = %{version}-%{release} | |
135 | Obsoletes: ghostscript-afpl-devel | |
b925fe6f | 136 | Obsoletes: ghostscript-esp-devel |
8e79132b | 137 | |
138 | %description devel | |
139 | Header files for libgs - ghostscript shared library. | |
140 | ||
9a147310 JR |
141 | %description devel -l pl.UTF-8 |
142 | Pliki nagłówkowe libgs - współdzielonej biblioteki ghostscript. | |
8e79132b | 143 | |
144 | %package ijs-devel | |
145 | Summary: IJS development files | |
6d9b3c9a | 146 | Summary(pl.UTF-8): Pliki dla programistów IJS |
8e79132b | 147 | Group: Development/Libraries |
148 | Requires: %{name} = %{version}-%{release} | |
149 | Obsoletes: ghostscript-afpl-ijs-devel | |
b925fe6f | 150 | Obsoletes: ghostscript-esp-ijs-devel |
8e79132b | 151 | |
152 | %description ijs-devel | |
153 | IJS development files. | |
154 | ||
9a147310 JR |
155 | %description ijs-devel -l pl.UTF-8 |
156 | Pliki do tworzenia programów z użyciem biblioteki IJS. | |
8e79132b | 157 | |
158 | %package ijs-static | |
159 | Summary: Static libijs library | |
6d9b3c9a | 160 | Summary(pl.UTF-8): Statyczna biblioteka IJS |
8e79132b | 161 | Group: Development/Libraries |
162 | Requires: %{name}-ijs-devel = %{version}-%{release} | |
163 | Obsoletes: ghostscript-afpl-ijs-static | |
b925fe6f | 164 | Obsoletes: ghostscript-esp-ijs-static |
8e79132b | 165 | |
166 | %description ijs-static | |
167 | Static libijs library. | |
168 | ||
9a147310 | 169 | %description ijs-static -l pl.UTF-8 |
8e79132b | 170 | Statyczna wersja biblioteki IJS. |
171 | ||
172 | %prep | |
a9cac4bf | 173 | %setup -q |
8e79132b | 174 | %patch0 -p1 |
175 | %patch1 -p1 | |
176 | %patch2 -p1 | |
b925fe6f | 177 | #%patch3 -p1 |
640897c5 AG |
178 | #%%patch4 -p1 |
179 | #%%patch5 -p1 | |
8e79132b | 180 | |
181 | %build | |
182 | # workarounds | |
183 | touch ijs/ijs-config.1 | |
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} | |
193 | cd .. | |
8e79132b | 194 | %{__aclocal} |
195 | %{__autoconf} | |
d0535cb0 | 196 | CFLAGS="%{rpmcflags} -DA4 -fPIC" |
8e79132b | 197 | export CFLAGS |
198 | %configure \ | |
199 | --with-fontpath="%{_datadir}/fonts:%{_datadir}/fonts/Type1" \ | |
200 | --with-ijs \ | |
201 | --with-jbig2dec \ | |
202 | --with-jasper \ | |
d0535cb0 | 203 | --with-x \ |
f1a64408 | 204 | --with-drivers=ALL%{?with_svga:,vgalib,lvga256} \ |
d0535cb0 | 205 | --enable-dynamic |
8e79132b | 206 | |
207 | cd ijs | |
208 | %{__libtoolize} | |
209 | %{__aclocal} | |
210 | %{__autoconf} | |
211 | %{__automake} | |
212 | %configure \ | |
213 | --enable-shared | |
214 | cd .. | |
215 | ||
d0535cb0 | 216 | %{__make} -j1 \ |
c1dd3860 | 217 | docdir=%{_docdir}/%{name}-%{version} |
8e79132b | 218 | |
d0535cb0 | 219 | %{__make} -j1 so \ |
c1dd3860 | 220 | docdir=%{_docdir}/%{name}-%{version} |
8e79132b | 221 | |
222 | %install | |
223 | rm -rf $RPM_BUILD_ROOT | |
bafd8782 | 224 | install -d $RPM_BUILD_ROOT{%{_datadir}/ghostscript/lib,%{_libdir},%{_includedir}/ghostscript} |
8e79132b | 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 | |
bafd8782 | 242 | %{__rm} -r $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 | 322 | %{_includedir}/ghostscript |
8e79132b | 323 | |
324 | %files ijs-devel | |
325 | %defattr(644,root,root,755) | |
326 | %attr(755,root,root) %{_bindir}/ijs-config | |
327 | %attr(755,root,root) %{_libdir}/libijs.so | |
328 | %{_includedir}/ijs | |
329 | %{_libdir}/libijs.la | |
bafd8782 | 330 | %{_pkgconfigdir}/ijs.pc |
8e79132b | 331 | |
332 | %files ijs-static | |
333 | %defattr(644,root,root,755) | |
334 | %{_libdir}/libijs.a |