]> git.pld-linux.org Git - packages/ghostscript.git/blob - ghostscript.spec
- added tar BR
[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 #Patch5:                %{name}-glib.patch
40 URL:            http://www.ghostscript.com/
41 BuildRequires:  autoconf
42 BuildRequires:  automake
43 BuildRequires:  cups-devel
44 BuildRequires:  docbook-style-dsssl
45 BuildRequires:  glib2-devel
46 %{?with_system_jbig2dec:BuildRequires:  jbig2dec-devel}
47 # for gsx
48 %{?with_gtk:BuildRequires:      gtk+-devel}
49 BuildRequires:  libpng-devel >= 1.0.8
50 BuildRequires:  libstdc++-devel
51 BuildRequires:  libtiff-devel
52 BuildRequires:  libtool
53 BuildRequires:  pkgconfig
54 # Required by 'gdevvglb' device.
55 %{?with_svga:BuildRequires:     svgalib-devel}
56 BuildRequires:  tar >= 1:1.22
57 # for documentation regeneration
58 BuildRequires:  tetex
59 BuildRequires:  tetex-dvips
60 BuildRequires:  xorg-lib-libXext-devel
61 BuildRequires:  xorg-lib-libXt-devel
62 Obsoletes:      ghostscript-afpl
63 Obsoletes:      ghostscript-gpl
64 Obsoletes:      ghostscript-esp
65 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
66
67 %define         _ulibdir        %{_prefix}/lib
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) %ghost %{_libdir}/libgs.so.8
285 %attr(755,root,root) %{_libdir}/libijs-*.so
286 %dir %{_libdir}/%{name}
287 %dir %{_libdir}/%{name}/*.*
288 %attr(755,root,root) %{_libdir}/%{name}/*.*/*.so
289 %dir %{_datadir}/%{name}
290 %dir %{_datadir}/%{name}/lib
291 %{_datadir}/%{name}/lib/*.*
292 %dir %{_datadir}/%{name}/%{version}
293 %dir %{_datadir}/%{name}/%{version}/lib
294 # "*.*" will not match "Fontmap". It is OK.
295 %{_datadir}/%{name}/%{version}/lib/*.*
296 %{_datadir}/%{name}/%{version}/lib/pphs
297 %{_datadir}/%{name}/%{version}/Resource
298 %{_datadir}/%{name}/%{version}/examples
299 %{_mandir}/man*/*
300 %lang(cs) %{_mandir}/cs/man*/*
301 %lang(de) %{_mandir}/de/man*/*
302 %lang(es) %{_mandir}/es/man*/*
303 %lang(fr) %{_mandir}/fr/man*/*
304 %lang(pl) %{_mandir}/pl/man*/*
305
306 %files cups
307 %defattr(644,root,root,755)
308 /etc/cups/*
309 %attr(755,root,root) %{_ulibdir}/cups/filter/pstopxl
310 %attr(755,root,root) %{_ulibdir}/cups/filter/pstoraster
311 %{_datadir}/cups/model/pxlcolor.ppd
312 %{_datadir}/cups/model/pxlmono.ppd
313
314 %if %{with gtk}
315 %files gtk
316 %defattr(644,root,root,755)
317 %attr(755,root,root) %{_bindir}/gsx
318 %endif
319
320 %files devel
321 %defattr(644,root,root,755)
322 %attr(755,root,root) %{_libdir}/libgs.so
323 %{_includedir}/ghostscript
324 %{_includedir}/ps
325
326 %files ijs-devel
327 %defattr(644,root,root,755)
328 %attr(755,root,root) %{_bindir}/ijs-config
329 %attr(755,root,root) %{_libdir}/libijs.so
330 %{_includedir}/ijs
331 %{_libdir}/libijs.la
332 %{_pkgconfigdir}/*.pc
333
334 %files ijs-static
335 %defattr(644,root,root,755)
336 %{_libdir}/libijs.a
This page took 0.051156 seconds and 4 git commands to generate.