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