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