]> git.pld-linux.org Git - packages/ghostscript.git/blob - ghostscript.spec
- _defaultdocdir -> _docdir
[packages/ghostscript.git] / ghostscript.spec
1 #
2 # TODO:
3 #       - fix svga bcond
4 #
5 # Conditional build:
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 
9 #
10 Summary:        PostScript & PDF interpreter and renderer
11 Summary(de):    PostScript & PDF Interpreter und Renderer
12 Summary(fr):    Interpréteur et visualisateur PostScript & PDF
13 Summary(ja):    PostScript ¥¤¥ó¥¿¡¼¥×¥ê¥¿¡¦¥ì¥ó¥À¥é¡¼
14 Summary(pl):    Bezp³atny interpreter i renderer PostScriptu i PDF
15 Summary(tr):    PostScript & PDF yorumlayýcý ve gösterici
16 Name:           ghostscript
17 Version:        8.54
18 Release:        0.2
19 License:        GPL
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}
43 # for gsx
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
54 BuildRequires:  tetex
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)
61
62 %description
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.
67
68 %description -l de
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.
73
74 %description -l fr
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.
79
80 %description -l ja
81 Ghostscript ¤Ï PostScript ¥¤¥ó¥¿¡¼¥×¥ê¥¿¤Ç¤¹¡£¥Ý¥¹¥È¥¹¥¯¥ê¥×¥È¤È PDF
82 ¤ò¥ì¥ó¥À¥ê¥ó¥°¤·¡¢X window ¤ä¾¤Î¥×¥ê¥ó¥¿¥Õ¥©¡¼¥Þ¥Ã¥È¤Ç½ÐÎÏ
83 ¤·¤Þ¤¹¡£¤³¤Î¥Ñ¥Ã¥±¡¼¥¸¤ÏÆüËܸìÂбþ¤·¤Æ¤¤¤Þ¤¹¡£
84
85 %description -l pl
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.
90
91 %description -l tr
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
94 biçime getirebilir.
95
96 %package gtk
97 Summary:        Ghostscript with GTK+ console
98 Summary(pl):    Ghostscript z konsol± GTK+
99 Group:          Applications/Graphics
100 Requires:       %{name} = %{version}-%{release}
101 Obsoletes:      ghostscript-afpl-gtk
102
103 %description gtk
104 Ghostscript with GTK+ console.
105
106 %description gtk -l pl
107 Ghostscript z konsol± GTK+.
108
109 %package devel
110 Summary:        libgs header files
111 Summary(pl):    Pliki nag³ówkowe libgs
112 Group:          Development/Libraries
113 Requires:       %{name} = %{version}-%{release}
114 Obsoletes:      ghostscript-afpl-devel
115
116 %description devel
117 Header files for libgs - ghostscript shared library.
118
119 %description devel -l pl
120 Pliki nag³ówkowe libgs - wspó³dzielonej biblioteki ghostscript.
121
122 %package ijs-devel
123 Summary:        IJS development files
124 Summary(pl):    Pliki dla programistów IJS
125 Group:          Development/Libraries
126 Requires:       %{name} = %{version}-%{release}
127 Obsoletes:      ghostscript-afpl-ijs-devel
128
129 %description ijs-devel
130 IJS development files.
131
132 %description ijs-devel -l pl
133 Pliki do tworzenia programów z u¿yciem biblioteki IJS.
134
135 %package ijs-static
136 Summary:        Static libijs library
137 Summary(pl):    Statyczna biblioteka IJS
138 Group:          Development/Libraries
139 Requires:       %{name}-ijs-devel = %{version}-%{release}
140 Obsoletes:      ghostscript-afpl-ijs-static
141
142 %description ijs-static
143 Static libijs library.
144
145 %description ijs-static -l pl
146 Statyczna wersja biblioteki IJS.
147
148 %prep
149 %setup -q -a2 -n %{name}-%{version}-gpl
150 %patch0 -p1
151 %patch1 -p1
152 %patch2 -p1
153 %patch3 -p1 -b .am
154 #%patch4 -p1
155 #%patch5 -p1
156 %patch6 -p1
157 ln -sf jp* jpeg
158
159 %build
160 # workarounds
161 touch ijs/ijs-config.1
162 %if %{with system_jbig2dec}
163 if [ -d jbig2dec ]; then
164         rm -rf jbig2dec
165 fi
166 %endif
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
169 #
170 %{__libtoolize}
171 cp -f %{_datadir}/automake/config.sub .
172 %{__aclocal}
173 %{__autoconf}
174 CFLAGS="%{rpmcflags} -DA4"
175 export CFLAGS
176 %configure \
177         --with-fontpath="%{_datadir}/fonts:%{_datadir}/fonts/Type1" \
178         --with-ijs \
179         --with-jbig2dec \
180         --with-jasper \
181         --with-x
182
183 # NEEDS patch because no such configure options
184 #        --with-drivers=ALL%{?with_svga:,vgalib,lvga256} \
185
186 cd ijs
187 %{__libtoolize}
188 %{__aclocal}
189 %{__autoconf}
190 %{__automake}
191 %configure \
192         --enable-shared
193 cd ..
194
195 %{__make} \
196         docdir=%{_docdir}/%{name}-%{version}
197
198 %{__make} so \
199         docdir=%{_docdir}/%{name}-%{version}
200
201 %install
202 rm -rf $RPM_BUILD_ROOT
203 install -d $RPM_BUILD_ROOT{%{_datadir}/ghostscript/lib,%{_libdir},%{_includedir}/ps}
204
205
206 %{__make} install \
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}
214
215
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}
224
225 cd ijs
226 %{__make} install \
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}
234 cd ..
235
236 install lib/{gs_frsd,pdfopt,pdfwrite}.ps $RPM_BUILD_ROOT%{_datadir}/%{name}/lib
237
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
243 echo ".so gs.1"     > $RPM_BUILD_ROOT%{_mandir}/man1/ghostscript.1
244 echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/man1/ps2pdf12.1
245 echo ".so ps2pdf.1" > $RPM_BUILD_ROOT%{_mandir}/man1/ps2pdf13.1
246 echo ".so ps2ps.1"  > $RPM_BUILD_ROOT%{_mandir}/man1/eps2eps.1
247 echo ".so gslp.1"   > $RPM_BUILD_ROOT%{_mandir}/man1/gsbj.1
248 echo ".so gslp.1"   > $RPM_BUILD_ROOT%{_mandir}/man1/gsdj.1
249 echo ".so gslp.1"   > $RPM_BUILD_ROOT%{_mandir}/man1/gsdj500.1
250 echo ".so gslp.1"   > $RPM_BUILD_ROOT%{_mandir}/man1/gslj.1
251
252 bzip2 -dc %{SOURCE5} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
253
254 #mv -f $RPM_BUILD_ROOT%{_bindir}/{gsc,gs}
255 ln -sf gs $RPM_BUILD_ROOT%{_bindir}/gsc
256 ln -sf gs $RPM_BUILD_ROOT%{_bindir}/ghostscript
257
258 %clean
259 rm -rf $RPM_BUILD_ROOT
260
261 %post   -p /sbin/ldconfig
262 %postun -p /sbin/ldconfig
263
264 %files
265 %defattr(644,root,root,755)
266 %doc %{_docdir}/%{name}-%{version}
267 %attr(755,root,root) %{_bindir}/[bdeflpsux]*
268 %attr(755,root,root) %{_bindir}/gs
269 %attr(755,root,root) %{_bindir}/wftopfa
270 %attr(755,root,root) %{_bindir}/gs[!x]*
271 %attr(755,root,root) %{_bindir}/ijs_*_example
272 %attr(755,root,root) %{_libdir}/libgs.so.*.*
273 %attr(755,root,root) %{_libdir}/libijs-*.so
274 %dir %{_datadir}/%{name}
275 %dir %{_datadir}/%{name}/lib
276 %{_datadir}/%{name}/lib/*.*
277 %dir %{_datadir}/%{name}/%{version}
278 %dir %{_datadir}/%{name}/%{version}/lib
279 # "*.*" will not match "Fontmap". It is OK.
280 %{_datadir}/%{name}/%{version}/lib/*.*
281 %{_datadir}/%{name}/%{version}/lib/[!F]*map
282 %{_datadir}/%{name}/%{version}/lib/FAPI*map
283 %config %verify(not md5 mtime size) %{_datadir}/%{name}/%{version}/lib/Fontmap
284 %config %verify(not md5 mtime size) %{_datadir}/%{name}/%{version}/lib/FAPIconfig
285 %{_datadir}/%{name}/%{version}/Resource
286 %{_datadir}/%{name}/%{version}/examples
287 %{_mandir}/man*/*
288 %lang(cs) %{_mandir}/cs/man*/*
289 %lang(de) %{_mandir}/de/man*/*
290 %lang(es) %{_mandir}/es/man*/*
291 %lang(fr) %{_mandir}/fr/man*/*
292 %lang(pl) %{_mandir}/pl/man*/*
293
294 %if %{with gtk}
295 %files gtk
296 %defattr(644,root,root,755)
297 %attr(755,root,root) %{_bindir}/gsx
298 %endif
299
300 %files devel
301 %defattr(644,root,root,755)
302 %{_includedir}/ps
303 %attr(755,root,root) %{_libdir}/libgs.so
304
305 %files ijs-devel
306 %defattr(644,root,root,755)
307 %attr(755,root,root) %{_bindir}/ijs-config
308 %attr(755,root,root) %{_libdir}/libijs.so
309 %{_includedir}/ijs
310 %{_libdir}/libijs.la
311 %{_pkgconfigdir}/*.pc
312
313 %files ijs-static
314 %defattr(644,root,root,755)
315 %{_libdir}/libijs.a
This page took 0.061926 seconds and 3 git commands to generate.