]> git.pld-linux.org Git - packages/ghostscript.git/blob - ghostscript.spec
- one more security blocker added
[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 # http://bugs.ghostscript.com/show_bug.cgi?id=690211
44 BuildRequires:  security(690211)
45 BuildRequires:  autoconf
46 BuildRequires:  automake
47 BuildRequires:  docbook-style-dsssl
48 BuildRequires:  glib2-devel
49 %{?with_system_jbig2dec:BuildRequires:  jbig2dec-devel}
50 # for gsx
51 %{?with_gtk:BuildRequires:      gtk+-devel}
52 BuildRequires:  libpng-devel >= 1.0.8
53 BuildRequires:  libstdc++-devel
54 BuildRequires:  libtiff-devel
55 BuildRequires:  libtool
56 BuildRequires:  pkgconfig
57 # Required by 'gdevvglb' device.
58 %{?with_svga:BuildRequires:     svgalib-devel}
59 # for documentation regeneration
60 BuildRequires:  tetex
61 BuildRequires:  tetex-dvips
62 BuildRequires:  xorg-lib-libXext-devel
63 BuildRequires:  xorg-lib-libXt-devel
64 Obsoletes:      ghostscript-afpl
65 Obsoletes:      ghostscript-gpl
66 Obsoletes:      ghostscript-esp
67 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68
69 %description
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.
74
75 %description -l de.UTF-8
76 Ghostscipt ist ein PostScript-Interpretierer. Er kann sowohl
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.
80
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
84 nombreux types d'imprimantes (dont un support pour imprimantes
85 couleur), et des formats de fichiers graphiques populaires.
86
87 %description -l ja.UTF-8
88 Ghostscript は PostScript インタープリタです。ポストスクリプトと PDF
89 をレンダリングし、X window や他のプリンタフォーマットで出力
90 します。このパッケージは日本語対応しています。
91
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
96 kolorowe), okno X-Window i popularne formaty graficzne.
97
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.
102
103 %package cups
104 Summary:        Ghostscript CUPS files
105 Summary(pl.UTF-8):      Pliki Ghostscripta dla CUPS-a
106 Group:          Applications/Graphics
107 Requires:       %{name} = %{version}-%{release}
108
109 %description cups
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.
114
115 %package gtk
116 Summary:        Ghostscript with GTK+ console
117 Summary(pl.UTF-8):      Ghostscript z konsolą GTK+
118 Group:          Applications/Graphics
119 Requires:       %{name} = %{version}-%{release}
120 Obsoletes:      ghostscript-afpl-gtk
121 Obsoletes:      ghostscript-gpl-gtk
122 Obsoletes:      ghostscript-esp-gtk
123
124 %description gtk
125 Ghostscript with GTK+ console.
126
127 %description gtk -l pl.UTF-8
128 Ghostscript z konsolą GTK+.
129
130 %package devel
131 Summary:        libgs header files
132 Summary(pl.UTF-8):      Pliki nagłówkowe libgs
133 Group:          Development/Libraries
134 Requires:       %{name} = %{version}-%{release}
135 Obsoletes:      ghostscript-afpl-devel
136 Obsoletes:      ghostscript-esp-devel
137
138 %description devel
139 Header files for libgs - ghostscript shared library.
140
141 %description devel -l pl.UTF-8
142 Pliki nagłówkowe libgs - współdzielonej biblioteki ghostscript.
143
144 %package ijs-devel
145 Summary:        IJS development files
146 Summary(pl.UTF-8):      Pliki dla programistów IJS
147 Group:          Development/Libraries
148 Requires:       %{name} = %{version}-%{release}
149 Obsoletes:      ghostscript-afpl-ijs-devel
150 Obsoletes:      ghostscript-esp-ijs-devel
151
152 %description ijs-devel
153 IJS development files.
154
155 %description ijs-devel -l pl.UTF-8
156 Pliki do tworzenia programów z użyciem biblioteki IJS.
157
158 %package ijs-static
159 Summary:        Static libijs library
160 Summary(pl.UTF-8):      Statyczna biblioteka IJS
161 Group:          Development/Libraries
162 Requires:       %{name}-ijs-devel = %{version}-%{release}
163 Obsoletes:      ghostscript-afpl-ijs-static
164 Obsoletes:      ghostscript-esp-ijs-static
165
166 %description ijs-static
167 Static libijs library.
168
169 %description ijs-static -l pl.UTF-8
170 Statyczna wersja biblioteki IJS.
171
172 %prep
173 %setup -q
174 %patch0 -p1
175 %patch1 -p1
176 %patch2 -p1
177 #%patch3 -p1
178 #%%patch4 -p1
179 #%%patch5 -p1
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
189 cd jasper
190 %{__libtoolize}
191 %{__aclocal}
192 %{__autoconf}
193 cd ..
194 %{__aclocal}
195 %{__autoconf}
196 CFLAGS="%{rpmcflags} -DA4 -fPIC"
197 export CFLAGS
198 %configure \
199         --with-fontpath="%{_datadir}/fonts:%{_datadir}/fonts/Type1" \
200         --with-ijs \
201         --with-jbig2dec \
202         --with-jasper \
203         --with-x \
204         --with-drivers=ALL%{?with_svga:,vgalib,lvga256} \
205         --enable-dynamic
206
207 cd ijs
208 %{__libtoolize}
209 %{__aclocal}
210 %{__autoconf}
211 %{__automake}
212 %configure \
213         --enable-shared
214 cd ..
215
216 %{__make} -j1 \
217         docdir=%{_docdir}/%{name}-%{version}
218
219 %{__make} -j1 so \
220         docdir=%{_docdir}/%{name}-%{version}
221
222 %install
223 rm -rf $RPM_BUILD_ROOT
224 install -d $RPM_BUILD_ROOT{%{_datadir}/ghostscript/lib,%{_libdir},%{_includedir}/{ghostscript,ps}}
225
226
227 %{__make} install \
228         DESTDIR=$RPM_BUILD_ROOT \
229         docdir=%{_docdir}/%{name}-%{version}
230
231 %{__make} soinstall \
232         DESTDIR=$RPM_BUILD_ROOT \
233         docdir=%{_docdir}/%{name}-%{version}
234
235 %{__make} -C ijs install \
236         DESTDIR=$RPM_BUILD_ROOT
237
238 install lib/{pdfopt,pdfwrite}.ps Resource/Init/gs_frsd.ps $RPM_BUILD_ROOT%{_datadir}/%{name}/lib
239
240 # Headers
241 install base/gdevdsp{,2}.h psi/{iapi,ierrors}.h $RPM_BUILD_ROOT%{_includedir}/ghostscript
242
243 rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/doc \
244         $RPM_BUILD_ROOT%{_bindir}/*.sh \
245         $RPM_BUILD_ROOT%{_mandir}/man1/{ps2pdf1{2,3},gsbj,gsdj,gsdj500,gslj,eps2eps}.1 \
246         $RPM_BUILD_ROOT%{_mandir}/de/man1/{ps2pdf1{2,3},eps2eps}.1
247
248 echo ".so gs.1"     > $RPM_BUILD_ROOT%{_mandir}/man1/ghostscript.1
249 echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/man1/ps2pdf12.1
250 echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/man1/ps2pdf13.1
251 echo ".so ps2ps.1"  > $RPM_BUILD_ROOT%{_mandir}/man1/eps2eps.1
252 echo ".so gslp.1"   > $RPM_BUILD_ROOT%{_mandir}/man1/gsbj.1
253 echo ".so gslp.1"   > $RPM_BUILD_ROOT%{_mandir}/man1/gsdj.1
254 echo ".so gslp.1"   > $RPM_BUILD_ROOT%{_mandir}/man1/gsdj500.1
255 echo ".so gslp.1"   > $RPM_BUILD_ROOT%{_mandir}/man1/gslj.1
256
257 echo ".so ps2ps.1"  > $RPM_BUILD_ROOT%{_mandir}/de/man1/eps2eps.1
258 echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/de/man1/ps2pdf12.1
259 echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/de/man1/ps2pdf13.1
260
261
262 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
263
264 #mv -f $RPM_BUILD_ROOT%{_bindir}/{gsc,gs}
265 ln -sf gs $RPM_BUILD_ROOT%{_bindir}/gsc
266 ln -sf gs $RPM_BUILD_ROOT%{_bindir}/ghostscript
267
268 %clean
269 rm -rf $RPM_BUILD_ROOT
270
271 %post   -p /sbin/ldconfig
272 %postun -p /sbin/ldconfig
273
274 %files
275 %defattr(644,root,root,755)
276 %doc %{_docdir}/%{name}-%{version}
277 %attr(755,root,root) %{_bindir}/[bdeflpsux]*
278 %attr(755,root,root) %{_bindir}/ghostscript
279 %attr(755,root,root) %{_bindir}/gs
280 %attr(755,root,root) %{_bindir}/wftopfa
281 %attr(755,root,root) %{_bindir}/gs[!x]*
282 %attr(755,root,root) %{_bindir}/ijs_*_example
283 %attr(755,root,root) %{_libdir}/libgs.so.*.*
284 %attr(755,root,root) %{_libdir}/libijs-*.so
285 %dir %{_libdir}/%{name}
286 %dir %{_libdir}/%{name}/*.*
287 %attr(755,root,root) %{_libdir}/%{name}/*.*/*.so
288 %dir %{_datadir}/%{name}
289 %dir %{_datadir}/%{name}/lib
290 %{_datadir}/%{name}/lib/*.*
291 %dir %{_datadir}/%{name}/%{version}
292 %dir %{_datadir}/%{name}/%{version}/lib
293 # "*.*" will not match "Fontmap". It is OK.
294 %{_datadir}/%{name}/%{version}/lib/*.*
295 %{_datadir}/%{name}/%{version}/lib/pphs
296 %{_datadir}/%{name}/%{version}/Resource
297 %{_datadir}/%{name}/%{version}/examples
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
305 %files cups
306 %defattr(644,root,root,755)
307 /etc/cups/*
308 %{_libdir}/cups/*
309 %{_datadir}/cups/*
310
311 %if %{with gtk}
312 %files gtk
313 %defattr(644,root,root,755)
314 %attr(755,root,root) %{_bindir}/gsx
315 %endif
316
317 %files devel
318 %defattr(644,root,root,755)
319 %attr(755,root,root) %{_libdir}/libgs.so
320 %{_includedir}/ghostscript
321 %{_includedir}/ps
322
323 %files ijs-devel
324 %defattr(644,root,root,755)
325 %attr(755,root,root) %{_bindir}/ijs-config
326 %attr(755,root,root) %{_libdir}/libijs.so
327 %{_includedir}/ijs
328 %{_libdir}/libijs.la
329 %{_pkgconfigdir}/*.pc
330
331 %files ijs-static
332 %defattr(644,root,root,755)
333 %{_libdir}/libijs.a
This page took 0.0453 seconds and 3 git commands to generate.