]> git.pld-linux.org Git - packages/ghostscript.git/blob - ghostscript.spec
- glib patch is outdated
[packages/ghostscript.git] / ghostscript.spec
1 # TODO:
2 # - fix svga bcond
3 # - cups subpackage?
4 # - add djvu driver:
5 #   http://dl.sourceforge.net/djvu/gsdjvu-1.3.tar.gz (or newer)
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)
11 #
12 # Conditional build:
13 %bcond_without  system_jbig2dec # build with included jbig2dec
14 %bcond_with     svga            # with svgalib display support (vgalib and lvga256 devices)
15 %bcond_with     gtk             # without gsx (fix it first)
16
17 Summary:        PostScript & PDF interpreter and renderer
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
23 Name:           ghostscript
24 Version:        8.71
25 Release:        2
26 License:        GPL v3+
27 Group:          Applications/Graphics
28 Source0:        http://ghostscript.com/releases/%{name}-%{version}.tar.xz
29 # Source0-md5:  5005d68f7395c2bfc4b05c1a60d9b6ba
30 Source1:        http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
31 # Source1-md5:  9b5953aa0cc155f4364f20036b848585
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 URL:            http://www.ghostscript.com/
40 BuildRequires:  autoconf >= 2.57
41 BuildRequires:  automake >= 1.6
42 BuildRequires:  cairo-devel >= 1.2.0
43 BuildRequires:  cups-devel
44 BuildRequires:  docbook-style-dsssl
45 BuildRequires:  fontconfig-devel
46 %{?with_system_jbig2dec:BuildRequires:  jbig2dec-devel}
47 # for gsx
48 %{?with_gtk:BuildRequires:      gtk+-devel}
49 BuildRequires:  libpaper-devel
50 BuildRequires:  libpng-devel >= 1.0.8
51 BuildRequires:  libstdc++-devel
52 BuildRequires:  libtiff-devel
53 BuildRequires:  libtool
54 BuildRequires:  pkgconfig
55 # Required by 'gdevvglb' device.
56 %{?with_svga:BuildRequires:     svgalib-devel}
57 BuildRequires:  tar >= 1:1.22
58 # for documentation regeneration
59 BuildRequires:  tetex
60 BuildRequires:  tetex-dvips
61 BuildRequires:  xorg-lib-libXext-devel
62 BuildRequires:  xorg-lib-libXt-devel
63 Obsoletes:      ghostscript-afpl
64 Obsoletes:      ghostscript-gpl
65 Obsoletes:      ghostscript-esp
66 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67
68 %define         _ulibdir        %{_prefix}/lib
69
70 %description
71 cos nGhostscript is a PostScript interpreter. It can render both
72 PostScript and PDF compliant files to devices which include an X
73 window, many printer formats (including support for color printers),
74 and popular graphics file formats.
75
76 %description -l de.UTF-8
77 Ghostscipt ist ein PostScript-Interpretierer. Er kann sowohl
78 PostScript als auch PDF-konforme Dateien an Geräte ausgeben, zu denen
79 ein X-Fenster, viele Druckerformate (einschließlich Support für
80 Farbdrucker) und gängige Grafikdateiformate zählen.
81
82 %description -l fr.UTF-8
83 Ghostscript est un interpréteur PostScript. Il peut rendre des
84 fichiers PostScript ou PDF sur des périphériques dont une fenêtre X,de
85 nombreux types d'imprimantes (dont un support pour imprimantes
86 couleur), et des formats de fichiers graphiques populaires.
87
88 %description -l ja.UTF-8
89 Ghostscript は PostScript インタープリタです。ポストスクリプトと PDF
90 をレンダリングし、X window や他のプリンタフォーマットで出力
91 します。このパッケージは日本語対応しています。
92
93 %description -l pl.UTF-8
94 Ghostcript jest interpreterem PostScriptu, języka używanego do opisu
95 formatu dokumentu. Ghostscript potrafi przetworzyć dokument w formacie
96 PostScript i PDF na szereg postaci wyjściowych: drukarki (włączając
97 kolorowe), okno X-Window i popularne formaty graficzne.
98
99 %description -l tr.UTF-8
100 GhostScript, PostScript ve PDF uyumlu dosyaları, X penceresinde
101 gösterebilir ve birçok yazıcının (renkli yazıcılar dahil) basabileceği
102 biçime getirebilir.
103
104 %package cups
105 Summary:        Ghostscript CUPS files
106 Summary(pl.UTF-8):      Pliki Ghostscripta dla CUPS-a
107 Group:          Applications/Graphics
108 Requires:       %{name} = %{version}-%{release}
109
110 %description cups
111 This package contains CUPS files provided by ghostscript.
112
113 %description cups -l pl.UTF-8
114 Ten pakiet zawiera pliki dla CUPS-a dostarczane przez ghostscript.
115
116 %package gtk
117 Summary:        Ghostscript with GTK+ console
118 Summary(pl.UTF-8):      Ghostscript z konsolą GTK+
119 Group:          Applications/Graphics
120 Requires:       %{name} = %{version}-%{release}
121 Obsoletes:      ghostscript-afpl-gtk
122 Obsoletes:      ghostscript-gpl-gtk
123 Obsoletes:      ghostscript-esp-gtk
124
125 %description gtk
126 Ghostscript with GTK+ console.
127
128 %description gtk -l pl.UTF-8
129 Ghostscript z konsolą GTK+.
130
131 %package devel
132 Summary:        libgs header files
133 Summary(pl.UTF-8):      Pliki nagłówkowe libgs
134 Group:          Development/Libraries
135 Requires:       %{name} = %{version}-%{release}
136 Obsoletes:      ghostscript-afpl-devel
137 Obsoletes:      ghostscript-esp-devel
138
139 %description devel
140 Header files for libgs - ghostscript shared library.
141
142 %description devel -l pl.UTF-8
143 Pliki nagłówkowe libgs - współdzielonej biblioteki ghostscript.
144
145 %package ijs-devel
146 Summary:        IJS development files
147 Summary(pl.UTF-8):      Pliki dla programistów IJS
148 Group:          Development/Libraries
149 Requires:       %{name} = %{version}-%{release}
150 Obsoletes:      ghostscript-afpl-ijs-devel
151 Obsoletes:      ghostscript-esp-ijs-devel
152
153 %description ijs-devel
154 IJS development files.
155
156 %description ijs-devel -l pl.UTF-8
157 Pliki do tworzenia programów z użyciem biblioteki IJS.
158
159 %package ijs-static
160 Summary:        Static libijs library
161 Summary(pl.UTF-8):      Statyczna biblioteka IJS
162 Group:          Development/Libraries
163 Requires:       %{name}-ijs-devel = %{version}-%{release}
164 Obsoletes:      ghostscript-afpl-ijs-static
165 Obsoletes:      ghostscript-esp-ijs-static
166
167 %description ijs-static
168 Static libijs library.
169
170 %description ijs-static -l pl.UTF-8
171 Statyczna wersja biblioteki IJS.
172
173 %prep
174 %setup -q
175 %patch0 -p1
176 %patch1 -p1
177 %patch2 -p1
178 #%patch3 -p1
179 #%%patch4 -p1
180 #%%patch5 -p1
181
182 %build
183 # workarounds
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 %{__autoheader}
194 %{__automake}
195 cd ..
196 %{__aclocal}
197 %{__autoconf}
198 CFLAGS="%{rpmcflags} -DA4 -fPIC"
199 export CFLAGS
200 %configure \
201         --with-fontpath="%{_datadir}/fonts:%{_datadir}/fonts/Type1" \
202         --with-ijs \
203         --with-jbig2dec \
204         --with-jasper \
205         --with-system-libtiff \
206         --with-x \
207         --with-drivers=ALL%{?with_svga:,vgalib,lvga256} \
208         --enable-dynamic
209
210 cd ijs
211 %{__libtoolize}
212 %{__aclocal}
213 %{__autoconf}
214 %{__automake}
215 %configure \
216         --enable-shared
217 cd ..
218
219 %{__make} -j1 \
220         docdir=%{_docdir}/%{name}-%{version}
221
222 %{__make} -j1 so \
223         docdir=%{_docdir}/%{name}-%{version}
224
225 %install
226 rm -rf $RPM_BUILD_ROOT
227 install -d $RPM_BUILD_ROOT%{_includedir}/ghostscript
228
229 %{__make} install \
230         DESTDIR=$RPM_BUILD_ROOT \
231         docdir=%{_docdir}/%{name}-%{version}
232
233 %{__make} soinstall \
234         DESTDIR=$RPM_BUILD_ROOT \
235         docdir=%{_docdir}/%{name}-%{version}
236
237 %{__make} -C ijs install \
238         DESTDIR=$RPM_BUILD_ROOT
239
240 # Headers
241 install base/gdevdsp{,2}.h psi/{iapi,ierrors}.h $RPM_BUILD_ROOT%{_includedir}/ghostscript
242
243 %{__rm} -r $RPM_BUILD_ROOT%{_bindir}/*.sh \
244         $RPM_BUILD_ROOT%{_mandir}/man1/{ps2pdf1{2,3},eps2eps}.1 \
245         $RPM_BUILD_ROOT%{_mandir}/de/man1/{ps2pdf1{2,3},eps2eps}.1
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
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 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
261
262 #mv -f $RPM_BUILD_ROOT%{_bindir}/{gsc,gs}
263 ln -sf gs $RPM_BUILD_ROOT%{_bindir}/gsc
264 ln -sf gs $RPM_BUILD_ROOT%{_bindir}/ghostscript
265
266 %clean
267 rm -rf $RPM_BUILD_ROOT
268
269 %post   -p /sbin/ldconfig
270 %postun -p /sbin/ldconfig
271
272 %files
273 %defattr(644,root,root,755)
274 %doc %{_docdir}/%{name}-%{version}
275 %attr(755,root,root) %{_bindir}/bdftops
276 %attr(755,root,root) %{_bindir}/dumphint
277 %attr(755,root,root) %{_bindir}/dvipdf
278 %attr(755,root,root) %{_bindir}/eps2eps
279 %attr(755,root,root) %{_bindir}/fixmswrd.pl
280 %attr(755,root,root) %{_bindir}/font2c
281 %attr(755,root,root) %{_bindir}/ghostscript
282 %attr(755,root,root) %{_bindir}/gs
283 %attr(755,root,root) %{_bindir}/gsbj
284 %attr(755,root,root) %{_bindir}/gsc
285 %attr(755,root,root) %{_bindir}/gsdj
286 %attr(755,root,root) %{_bindir}/gsdj500
287 %attr(755,root,root) %{_bindir}/gslj
288 %attr(755,root,root) %{_bindir}/gslp
289 %attr(755,root,root) %{_bindir}/gsnd
290 %attr(755,root,root) %{_bindir}/ijs_client_example
291 %attr(755,root,root) %{_bindir}/ijs_server_example
292 %attr(755,root,root) %{_bindir}/pdf2dsc
293 %attr(755,root,root) %{_bindir}/pdf2ps
294 %attr(755,root,root) %{_bindir}/pdfopt
295 %attr(755,root,root) %{_bindir}/pf2afm
296 %attr(755,root,root) %{_bindir}/pfbtopfa
297 %attr(755,root,root) %{_bindir}/printafm
298 %attr(755,root,root) %{_bindir}/ps2ascii
299 %attr(755,root,root) %{_bindir}/ps2epsi
300 %attr(755,root,root) %{_bindir}/ps2pdf
301 %attr(755,root,root) %{_bindir}/ps2pdf12
302 %attr(755,root,root) %{_bindir}/ps2pdf13
303 %attr(755,root,root) %{_bindir}/ps2pdf14
304 %attr(755,root,root) %{_bindir}/ps2pdfwr
305 %attr(755,root,root) %{_bindir}/ps2ps
306 %attr(755,root,root) %{_bindir}/ps2ps2
307 %attr(755,root,root) %{_bindir}/wftopfa
308 %attr(755,root,root) %{_libdir}/libgs.so.*.*
309 %attr(755,root,root) %ghost %{_libdir}/libgs.so.8
310 %attr(755,root,root) %{_libdir}/libijs-*.so
311 %dir %{_libdir}/%{name}
312 %dir %{_libdir}/%{name}/%{version}
313 %attr(755,root,root) %{_libdir}/%{name}/%{version}/X11.so
314 %dir %{_datadir}/%{name}
315 %dir %{_datadir}/%{name}/%{version}
316 %dir %{_datadir}/%{name}/%{version}/lib
317 %{_datadir}/%{name}/%{version}/Resource
318 %{_datadir}/%{name}/%{version}/examples
319 %{_datadir}/%{name}/%{version}/lib/*.ppd
320 %{_datadir}/%{name}/%{version}/lib/*.ps
321 %{_datadir}/%{name}/%{version}/lib/*.rpd
322 %{_datadir}/%{name}/%{version}/lib/*.src
323 %{_datadir}/%{name}/%{version}/lib/*.upp
324 %{_datadir}/%{name}/%{version}/lib/*.x[bp]m
325 %{_datadir}/%{name}/%{version}/lib/pphs
326 %{_mandir}/man1/dvipdf.1*
327 %{_mandir}/man1/eps2eps.1*
328 %{_mandir}/man1/font2c.1*
329 %{_mandir}/man1/ghostscript.1*
330 %{_mandir}/man1/gs.1*
331 %{_mandir}/man1/gsbj.1*
332 %{_mandir}/man1/gsdj.1*
333 %{_mandir}/man1/gsdj500.1*
334 %{_mandir}/man1/gslj.1*
335 %{_mandir}/man1/gslp.1*
336 %{_mandir}/man1/gsnd.1*
337 %{_mandir}/man1/pdf2dsc.1*
338 %{_mandir}/man1/pdf2ps.1*
339 %{_mandir}/man1/pdfopt.1*
340 %{_mandir}/man1/pf2afm.1*
341 %{_mandir}/man1/pfbtopfa.1*
342 %{_mandir}/man1/printafm.1*
343 %{_mandir}/man1/ps2ascii.1*
344 %{_mandir}/man1/ps2epsi.1*
345 %{_mandir}/man1/ps2pdf.1*
346 %{_mandir}/man1/ps2pdf12.1*
347 %{_mandir}/man1/ps2pdf13.1*
348 %{_mandir}/man1/ps2pdfwr.1*
349 %{_mandir}/man1/ps2ps.1*
350 %{_mandir}/man1/wftopfa.1*
351 %lang(cs) %{_mandir}/cs/man1/*
352 %lang(de) %{_mandir}/de/man1/*
353 %lang(es) %{_mandir}/es/man1/*
354 %lang(fr) %{_mandir}/fr/man1/*
355 %lang(pl) %{_mandir}/pl/man1/*
356
357 %files cups
358 %defattr(644,root,root,755)
359 /etc/cups/pstoraster.convs
360 %attr(755,root,root) %{_ulibdir}/cups/filter/pstopxl
361 %attr(755,root,root) %{_ulibdir}/cups/filter/pstoraster
362 %{_datadir}/cups/model/pxlcolor.ppd
363 %{_datadir}/cups/model/pxlmono.ppd
364
365 %if %{with gtk}
366 %files gtk
367 %defattr(644,root,root,755)
368 %attr(755,root,root) %{_bindir}/gsx
369 %endif
370
371 %files devel
372 %defattr(644,root,root,755)
373 %attr(755,root,root) %{_libdir}/libgs.so
374 %{_includedir}/ghostscript
375
376 %files ijs-devel
377 %defattr(644,root,root,755)
378 %attr(755,root,root) %{_bindir}/ijs-config
379 %attr(755,root,root) %{_libdir}/libijs.so
380 %{_includedir}/ijs
381 %{_libdir}/libijs.la
382 %{_pkgconfigdir}/ijs.pc
383 %{_mandir}/man1/ijs-config.1*
384
385 %files ijs-static
386 %defattr(644,root,root,755)
387 %{_libdir}/libijs.a
This page took 0.087107 seconds and 4 git commands to generate.