6 %bcond_without system_jbig2dec # build with included jbig2dec
7 %bcond_with svga # with svgalib display support (vgalib and lvga256 devices)
8 %bcond_without gtk # without gsx
10 Summary: PostScript & PDF interpreter and renderer
11 Summary(de.UTF-8): PostScript & PDF Interpreter und Renderer
12 Summary(fr.UTF-8): Interpréteur et visualisateur PostScript & PDF
13 Summary(ja.UTF-8): PostScript インタープリタ・レンダラー
14 Summary(pl.UTF-8): Bezpłatny interpreter i renderer PostScriptu i PDF
15 Summary(tr.UTF-8): PostScript & PDF yorumlayıcı ve gösterici
20 Group: Applications/Graphics
21 Source0: http://dl.sourceforge.net/ghostscript/%{name}-%{version}-gpl.tar.bz2
22 # Source0-md5: 5d0ad0da8297fe459a788200f0eaeeba
23 # we need to link with libjpeg recompiled with our parameters
24 Source2: ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
25 # Source2-md5: dbd5f3b47ed13132f04c685d608a7547
26 Source5: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
27 # Source5-md5: 9b5953aa0cc155f4364f20036b848585
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
36 Patch6: %{name}-ijs_pkgconfig_64.patch
37 URL: http://www.ghostscript.com/
38 BuildRequires: autoconf
39 BuildRequires: automake
40 BuildRequires: docbook-style-dsssl
41 BuildRequires: glib2-devel
42 %{?with_system_jbig2dec:BuildRequires: jbig2dec-devel}
44 %{?with_gtk:BuildRequires: gtk+-devel}
45 BuildRequires: jasper-devel
46 BuildRequires: libpng-devel >= 1.0.8
47 BuildRequires: libstdc++-devel
48 BuildRequires: libtiff-devel
49 BuildRequires: libtool
50 BuildRequires: pkgconfig
51 # Required by 'gdevvglb' device.
52 %{?with_svga:BuildRequires: svgalib-devel}
53 # for documentation regeneration
55 BuildRequires: tetex-dvips
56 BuildRequires: xorg-lib-libXext-devel
57 BuildRequires: xorg-lib-libXt-devel
58 Obsoletes: ghostscript-afpl
59 Obsoletes: ghostscript-gpl
60 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63 cos nGhostscript is a PostScript interpreter. It can render both
64 PostScript and PDF compliant files to devices which include an X
65 window, many printer formats (including support for color printers),
66 and popular graphics file formats.
68 %description -l de.UTF-8
69 Ghostscipt ist ein PostScript-Interpretierer. Er kann sowohl
70 PostScript als auch PDF-konforme Dateien an Geräte ausgeben, zu denen
71 ein X-Fenster, viele Druckerformate (einschließlich Support für
72 Farbdrucker) und gängige Grafikdateiformate zählen.
74 %description -l fr.UTF-8
75 Ghostscript est un interpréteur PostScript. Il peut rendre des
76 fichiers PostScript ou PDF sur des périphériques dont une fenêtre X,de
77 nombreux types d'imprimantes (dont un support pour imprimantes
78 couleur), et des formats de fichiers graphiques populaires.
80 %description -l ja.UTF-8
81 Ghostscript は PostScript インタープリタです。ポストスクリプトと PDF
82 をレンダリングし、X window や他のプリンタフォーマットで出力
83 します。このパッケージは日本語対応しています。
85 %description -l pl.UTF-8
86 Ghostcript jest interpreterem PostScriptu, języka używanego do opisu
87 formatu dokumentu. Ghostscript potrafi przetworzyć dokument w formacie
88 PostScript i PDF na szereg postaci wyjściowych: drukarki (włączając
89 kolorowe), okno X-Window i popularne formaty graficzne.
91 %description -l tr.UTF-8
92 GhostScript, PostScript ve PDF uyumlu dosyaları, X penceresinde
93 gösterebilir ve birçok yazıcının (renkli yazıcılar dahil) basabileceği
97 Summary: Ghostscript with GTK+ console
98 Summary(pl.UTF-8): Ghostscript z konsolą GTK+
99 Group: Applications/Graphics
100 Requires: %{name} = %{version}-%{release}
101 Obsoletes: ghostscript-afpl-gtk
104 Ghostscript with GTK+ console.
106 %description gtk -l pl.UTF-8
107 Ghostscript z konsolą GTK+.
110 Summary: libgs header files
111 Summary(pl.UTF-8): Pliki nagłówkowe libgs
112 Group: Development/Libraries
113 Requires: %{name} = %{version}-%{release}
114 Obsoletes: ghostscript-afpl-devel
117 Header files for libgs - ghostscript shared library.
119 %description devel -l pl.UTF-8
120 Pliki nagłówkowe libgs - współdzielonej biblioteki ghostscript.
123 Summary: IJS development files
124 Summary(pl.UTF-8): Pliki dla programistów IJS
125 Group: Development/Libraries
126 Requires: %{name} = %{version}-%{release}
127 Obsoletes: ghostscript-afpl-ijs-devel
129 %description ijs-devel
130 IJS development files.
132 %description ijs-devel -l pl.UTF-8
133 Pliki do tworzenia programów z użyciem biblioteki IJS.
136 Summary: Static libijs library
137 Summary(pl.UTF-8): Statyczna biblioteka IJS
138 Group: Development/Libraries
139 Requires: %{name}-ijs-devel = %{version}-%{release}
140 Obsoletes: ghostscript-afpl-ijs-static
142 %description ijs-static
143 Static libijs library.
145 %description ijs-static -l pl.UTF-8
146 Statyczna wersja biblioteki IJS.
149 %setup -q -a2 -n %{name}-%{version}-gpl
161 touch ijs/ijs-config.1
162 %if %{with system_jbig2dec}
163 if [ -d jbig2dec ]; then
167 # not really needed with new patch :)
168 # sed -i -e 's#:$(gsdir)/fonts#:$(gsdir)/fonts:%{_datadir}/fonts:%{_datadir}/fonts/Type1#g' src/Makefile.in
171 cp -f %{_datadir}/automake/config.sub .
174 CFLAGS="%{rpmcflags} -DA4"
177 --with-fontpath="%{_datadir}/fonts:%{_datadir}/fonts/Type1" \
183 # NEEDS patch because no such configure options
184 # --with-drivers=ALL%{?with_svga:,vgalib,lvga256} \
196 docdir=%{_docdir}/%{name}-%{version}
199 docdir=%{_docdir}/%{name}-%{version}
202 rm -rf $RPM_BUILD_ROOT
203 install -d $RPM_BUILD_ROOT{%{_datadir}/ghostscript/lib,%{_libdir},%{_includedir}/ps}
207 install_prefix=$RPM_BUILD_ROOT \
208 prefix=$RPM_BUILD_ROOT%{_prefix} \
209 bindir=$RPM_BUILD_ROOT%{_bindir} \
210 datadir=$RPM_BUILD_ROOT%{_datadir} \
211 libdir=$RPM_BUILD_ROOT%{_libdir} \
212 docdir=$RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} \
213 mandir=$RPM_BUILD_ROOT%{_mandir}
216 %{__make} soinstall \
217 install_prefix=$RPM_BUILD_ROOT \
218 prefix=$RPM_BUILD_ROOT%{_prefix} \
219 bindir=$RPM_BUILD_ROOT%{_bindir} \
220 datadir=$RPM_BUILD_ROOT%{_datadir} \
221 libdir=$RPM_BUILD_ROOT%{_libdir} \
222 docdir=$RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} \
223 mandir=$RPM_BUILD_ROOT%{_mandir}
227 DESTDIR=$RPM_BUILD_ROOT
228 # prefix=$RPM_BUILD_ROOT%{_prefix} \
229 # bindir=$RPM_BUILD_ROOT%{_bindir} \
230 # datadir=$RPM_BUILD_ROOT%{_datadir} \
231 # libdir=$RPM_BUILD_ROOT%{_libdir} \
232 # includedir=$RPM_BUILD_ROOT%{_includedir} \
233 # mandir=$RPM_BUILD_ROOT%{_mandir}
236 install lib/{gs_frsd,pdfopt,pdfwrite}.ps $RPM_BUILD_ROOT%{_datadir}/%{name}/lib
238 #install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{name}/lib
239 rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/doc \
240 $RPM_BUILD_ROOT%{_bindir}/*.sh \
241 $RPM_BUILD_ROOT%{_mandir}/man1/{ps2pdf1{2,3},gsbj,gsdj,gsdj500,gslj,eps2eps}.1 \
242 $RPM_BUILD_ROOT%{_mandir}/de/man1/{ps2pdf1{2,3},eps2eps}.1
244 echo ".so gs.1" > $RPM_BUILD_ROOT%{_mandir}/man1/ghostscript.1
245 echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/man1/ps2pdf12.1
246 echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/man1/ps2pdf13.1
247 echo ".so ps2ps.1" > $RPM_BUILD_ROOT%{_mandir}/man1/eps2eps.1
248 echo ".so gslp.1" > $RPM_BUILD_ROOT%{_mandir}/man1/gsbj.1
249 echo ".so gslp.1" > $RPM_BUILD_ROOT%{_mandir}/man1/gsdj.1
250 echo ".so gslp.1" > $RPM_BUILD_ROOT%{_mandir}/man1/gsdj500.1
251 echo ".so gslp.1" > $RPM_BUILD_ROOT%{_mandir}/man1/gslj.1
253 echo ".so ps2ps.1" > $RPM_BUILD_ROOT%{_mandir}/de/man1/eps2eps.1
254 echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/de/man1/ps2pdf12.1
255 echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/de/man1/ps2pdf13.1
258 bzip2 -dc %{SOURCE5} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
260 #mv -f $RPM_BUILD_ROOT%{_bindir}/{gsc,gs}
261 ln -sf gs $RPM_BUILD_ROOT%{_bindir}/gsc
262 ln -sf gs $RPM_BUILD_ROOT%{_bindir}/ghostscript
265 rm -rf $RPM_BUILD_ROOT
267 %post -p /sbin/ldconfig
268 %postun -p /sbin/ldconfig
271 %defattr(644,root,root,755)
272 %doc %{_docdir}/%{name}-%{version}
273 %attr(755,root,root) %{_bindir}/[bdeflpsux]*
274 %attr(755,root,root) %{_bindir}/gs
275 %attr(755,root,root) %{_bindir}/wftopfa
276 %attr(755,root,root) %{_bindir}/gs[!x]*
277 %attr(755,root,root) %{_bindir}/ijs_*_example
278 %attr(755,root,root) %{_libdir}/libgs.so.*.*
279 %attr(755,root,root) %{_libdir}/libijs-*.so
280 %dir %{_datadir}/%{name}
281 %dir %{_datadir}/%{name}/lib
282 %{_datadir}/%{name}/lib/*.*
283 %dir %{_datadir}/%{name}/%{version}
284 %dir %{_datadir}/%{name}/%{version}/lib
285 # "*.*" will not match "Fontmap". It is OK.
286 %{_datadir}/%{name}/%{version}/lib/*.*
287 %{_datadir}/%{name}/%{version}/lib/[!F]*map
288 %{_datadir}/%{name}/%{version}/lib/FAPI*map
289 %config %verify(not md5 mtime size) %{_datadir}/%{name}/%{version}/lib/Fontmap
290 %config %verify(not md5 mtime size) %{_datadir}/%{name}/%{version}/lib/FAPIconfig
291 %{_datadir}/%{name}/%{version}/Resource
292 %{_datadir}/%{name}/%{version}/examples
294 %lang(cs) %{_mandir}/cs/man*/*
295 %lang(de) %{_mandir}/de/man*/*
296 %lang(es) %{_mandir}/es/man*/*
297 %lang(fr) %{_mandir}/fr/man*/*
298 %lang(pl) %{_mandir}/pl/man*/*
302 %defattr(644,root,root,755)
303 %attr(755,root,root) %{_bindir}/gsx
307 %defattr(644,root,root,755)
309 %attr(755,root,root) %{_libdir}/libgs.so
312 %defattr(644,root,root,755)
313 %attr(755,root,root) %{_bindir}/ijs-config
314 %attr(755,root,root) %{_libdir}/libijs.so
317 %{_pkgconfigdir}/*.pc
320 %defattr(644,root,root,755)