1 |
blino |
19330 |
##### VERSION NUMBERS |
2 |
|
|
|
3 |
fwang |
143159 |
%define gsversion 9.04 |
4 |
blino |
19330 |
%define gsextraversion %{nil} |
5 |
fwang |
150964 |
%define gsreleaseno 2 |
6 |
blino |
19330 |
%define gsrelease %mkrel %gsreleaseno |
7 |
|
|
%define gssvnrevision -rev183 |
8 |
|
|
%define ijsver 0.35 |
9 |
fwang |
143161 |
%define ijsreloffset 80 |
10 |
blino |
19330 |
%define ijsrelno %(echo $((%{gsreleaseno} + %{ijsreloffset}))) |
11 |
|
|
%define ijsrel %mkrel %ijsrelno |
12 |
|
|
%define ijsmajor 1 |
13 |
|
|
%define libijs %mklibname ijs %{ijsmajor} |
14 |
|
|
%define libijs_devel %mklibname -d ijs %{ijsmajor} |
15 |
|
|
%define gsmajor 9 |
16 |
|
|
%define libgs %mklibname gs %{gsmajor} |
17 |
|
|
%define libgs_devel %mklibname -d gs %{gsmajor} |
18 |
|
|
|
19 |
|
|
%define _disable_ld_no_undefined 1 |
20 |
|
|
|
21 |
|
|
##### BUILD OPTIONS |
22 |
|
|
|
23 |
|
|
%define GSx11SVGAmodule 1 |
24 |
|
|
%define withsvgalib 0 |
25 |
|
|
%define withcupsfilters 1 |
26 |
|
|
%define withstaticgs 0 |
27 |
|
|
%define debug 0 |
28 |
|
|
|
29 |
|
|
%define bootstrap 0 |
30 |
|
|
%{?_without_bootstrap: %global bootstrap 0} |
31 |
|
|
%{?_with_bootstrap: %global bootstrap 1} |
32 |
|
|
|
33 |
|
|
%if %{bootstrap} |
34 |
|
|
%global withcupsfilters 0 |
35 |
|
|
%endif |
36 |
|
|
|
37 |
|
|
##### GENERAL DEFINITIONS |
38 |
|
|
|
39 |
|
|
Summary: PostScript/PDF interpreter and renderer (Main executable) |
40 |
|
|
Name: ghostscript |
41 |
|
|
Version: %{gsversion}%{gsextraversion} |
42 |
|
|
Release: %{gsrelease} |
43 |
|
|
License: GPLv2+ |
44 |
|
|
Group: Publishing |
45 |
|
|
Requires: ghostscript-common |
46 |
|
|
Requires: update-alternatives |
47 |
|
|
Obsoletes: ghostscript-PrintOnly |
48 |
|
|
Provides: ghostscript-PrintOnly |
49 |
|
|
%if !%{GSx11SVGAmodule} |
50 |
|
|
Obsoletes: ghostscript-module-X ghostscript-module-SVGALIB |
51 |
|
|
Provides: ghostscript-module-X ghostscript-module-SVGALIB |
52 |
|
|
%endif |
53 |
|
|
%if !%{withstaticgs} |
54 |
|
|
Obsoletes: ghostscript-static |
55 |
|
|
Provides: ghostscript-static |
56 |
|
|
%endif |
57 |
|
|
Conflicts: omni < 0.4 cups <= 1.1.14 |
58 |
|
|
Conflicts: printer-filters <= 10.1 |
59 |
|
|
URL: http://www.ghostscript.com/awki/Index |
60 |
|
|
|
61 |
|
|
##### BUILDREQUIRES |
62 |
|
|
|
63 |
|
|
BuildRequires: autoconf2.5 |
64 |
|
|
BuildRequires: bison |
65 |
|
|
BuildRequires: flex |
66 |
|
|
BuildRequires: freetype2-devel |
67 |
|
|
BuildRequires: gettext-devel |
68 |
|
|
BuildRequires: glibc-devel |
69 |
|
|
%if !%{bootstrap} |
70 |
|
|
BuildRequires: gtk+2-devel |
71 |
blino |
19361 |
BuildRequires: libcups-devel |
72 |
blino |
19330 |
BuildRequires: libfontconfig-devel |
73 |
|
|
%endif |
74 |
|
|
BuildRequires: fontconfig-devel |
75 |
|
|
BuildRequires: jbig2dec-devel |
76 |
|
|
BuildRequires: libice-devel |
77 |
|
|
BuildRequires: libidn-devel |
78 |
|
|
BuildRequires: libjasper-devel |
79 |
|
|
BuildRequires: libjpeg-devel |
80 |
|
|
BuildRequires: libnetpbm-devel |
81 |
|
|
BuildRequires: libpaper-devel |
82 |
|
|
BuildRequires: libpng-devel |
83 |
|
|
BuildRequires: libsm-devel |
84 |
|
|
BuildRequires: libtiff-devel |
85 |
|
|
BuildRequires: libx11-devel |
86 |
|
|
BuildRequires: libxext-devel |
87 |
ahmad |
115035 |
BuildRequires: libxml2-devel |
88 |
blino |
19330 |
BuildRequires: libxt-devel |
89 |
|
|
BuildRequires: pkgconfig |
90 |
|
|
BuildRequires: unzip |
91 |
|
|
BuildRequires: zlib-devel |
92 |
|
|
|
93 |
|
|
%ifarch %ix86 |
94 |
|
|
%if %{withsvgalib} |
95 |
|
|
BuildRequires: svgalib-devel |
96 |
|
|
%endif |
97 |
|
|
%endif |
98 |
|
|
|
99 |
|
|
##### GHOSTSCRIPT SOURCES |
100 |
|
|
|
101 |
lmenut |
87327 |
Source0: http://downloads.ghostscript.com/public/ghostscript-%{gsversion}%{gsextraversion}.tar.bz2 |
102 |
blino |
19330 |
Source2: ps2pdfpress.bz2 |
103 |
|
|
Source3: http://www.linuxprinting.org/download/printing/sipixa6.upp.bz2 |
104 |
|
|
|
105 |
|
|
##### GHOSTSCRIPT PATCHES |
106 |
fwang |
143159 |
Patch3: ghostscript-9.04-x11_shared.patch |
107 |
blino |
19330 |
|
108 |
|
|
# Fedora patches |
109 |
|
|
Patch102: ghostscript-scripts.patch |
110 |
|
|
Patch105: ghostscript-runlibfileifexists.patch |
111 |
|
|
Patch107: ghostscript-pksmraw.patch |
112 |
|
|
|
113 |
|
|
##### LIBIJS PATCHES |
114 |
|
|
|
115 |
|
|
# Fortunately none currently |
116 |
|
|
|
117 |
|
|
##### BUILD ROOT |
118 |
|
|
|
119 |
|
|
BuildRoot: %_tmppath/%name-%gsversion-%gsrelease-root |
120 |
|
|
|
121 |
|
|
##### PACKAGE DESCRIPTIONS |
122 |
|
|
|
123 |
|
|
##### GHOSTSCRIPT |
124 |
|
|
|
125 |
|
|
%package dvipdf |
126 |
|
|
Summary: PostScript/PDF interpreter and renderer (DVI-to-PDF converter) |
127 |
|
|
Group: Publishing |
128 |
|
|
Requires: ghostscript, coreutils |
129 |
boklm |
64147 |
Requires: dvips |
130 |
boklm |
64166 |
Provides: dvipdf = %{version}-%{release} |
131 |
blino |
19330 |
|
132 |
|
|
%package common |
133 |
|
|
Summary: PostScript/PDF interpreter and renderer (Common files) |
134 |
|
|
Group: Publishing |
135 |
|
|
Requires: urw-fonts >= 1.1, ghostscript-fonts, perl |
136 |
|
|
|
137 |
|
|
%package X |
138 |
|
|
Summary: PostScript/PDF interpreter and renderer (Executable with GTK-based screen display) |
139 |
|
|
Group: Publishing |
140 |
|
|
Requires: ghostscript-common |
141 |
|
|
Requires: update-alternatives |
142 |
|
|
# This one is buggy, so do not let it get automatically installed by |
143 |
|
|
# the "Provides: ghostscript" |
144 |
|
|
#Provides: ghostscript = %{version}-%{release} |
145 |
|
|
|
146 |
|
|
%if %withstaticgs |
147 |
|
|
%package static |
148 |
|
|
Summary: PostScript/PDF interpreter and renderer (Static executable) |
149 |
|
|
Group: Publishing |
150 |
|
|
Requires: ghostscript-common |
151 |
|
|
Requires: update-alternatives |
152 |
|
|
Provides: ghostscript = %{version}-%{release} |
153 |
|
|
%endif |
154 |
|
|
|
155 |
|
|
%if %{GSx11SVGAmodule} |
156 |
|
|
%package module-X |
157 |
|
|
Summary: PostScript/PDF interpreter and renderer (Additional support for X) |
158 |
|
|
Group: Publishing |
159 |
|
|
Requires: ghostscript-common |
160 |
|
|
Conflicts: ghostscript-X < 8.15 |
161 |
|
|
Obsoletes: ghostscript-Both |
162 |
|
|
Provides: ghostscript-Both |
163 |
|
|
|
164 |
|
|
%ifarch %ix86 |
165 |
|
|
%if %{withsvgalib} |
166 |
|
|
%package module-SVGALIB |
167 |
|
|
Summary: PostScript/PDF interpreter and renderer (Additional support for SVGALIB) |
168 |
|
|
Group: Publishing |
169 |
|
|
Requires: ghostscript, coreutils |
170 |
|
|
Obsoletes: ghostscript-SVGALIB, ghostscript-Both |
171 |
|
|
Provides: ghostscript-SVGALIB, ghostscript-Both |
172 |
|
|
%endif |
173 |
|
|
%endif |
174 |
|
|
%endif |
175 |
|
|
|
176 |
|
|
%package -n %libgs |
177 |
|
|
Summary: PostScript/PDF interpreter and renderer (GhostScript shared library) |
178 |
|
|
Group: Publishing |
179 |
|
|
|
180 |
|
|
%package -n %libgs_devel |
181 |
|
|
Summary: Headers and links to compile against the "%{libgs}" library |
182 |
|
|
Group: Development/C |
183 |
|
|
Requires: %libgs = %version |
184 |
|
|
Provides: libgs-devel |
185 |
|
|
|
186 |
|
|
##### IJS |
187 |
|
|
|
188 |
|
|
%package -n %{libijs} |
189 |
|
|
Version: %{ijsver} |
190 |
|
|
Release: %{ijsrel} |
191 |
|
|
Summary: Dynamic library for the IJS printer driver plug-in interface |
192 |
|
|
Group: Publishing |
193 |
|
|
URL: http://www.linuxprinting.org/ijs/ |
194 |
|
|
Provides: libijs = %{ijsver}-%{ijsrel} |
195 |
|
|
|
196 |
|
|
%package -n %{libijs_devel} |
197 |
|
|
Version: %{ijsver} |
198 |
|
|
Release: %{ijsrel} |
199 |
|
|
Summary: Headers and links for compiling against the "%{libijs}" library |
200 |
|
|
Group: Development/C |
201 |
|
|
URL: http://www.linuxprinting.org/ijs/ |
202 |
|
|
Requires: %{libijs} = %{ijsver} multiarch-utils |
203 |
|
|
Provides: libijs-devel = %{ijsver}-%{ijsrel} |
204 |
|
|
Provides: ijs-devel = %{ijsver}-%{ijsrel} |
205 |
|
|
|
206 |
|
|
%package doc |
207 |
|
|
Summary: Documentation for GhostScript |
208 |
|
|
Group: Publishing |
209 |
|
|
|
210 |
|
|
##### DESCRIPTION TEXTS |
211 |
|
|
|
212 |
|
|
%description |
213 |
|
|
Ghostscript is a set of software tools that provide a PostScript(TM) |
214 |
|
|
interpreter, a set of C procedures (the Ghostscript library, which |
215 |
|
|
implements the graphics capabilities in the PostScript language) and |
216 |
|
|
an interpreter for Portable Document Format (PDF) files. Ghostscript |
217 |
|
|
translates PostScript code into many common, bitmapped and vector |
218 |
|
|
formats, like those understood by your printer or screen. Ghostscript |
219 |
|
|
is normally used to display PostScript files and to print PostScript |
220 |
|
|
files to non-PostScript printers. |
221 |
|
|
|
222 |
|
|
You should install ghostscript if you need to display PostScript or |
223 |
|
|
PDF files, or if you have a non-PostScript printer. |
224 |
|
|
|
225 |
|
|
%description dvipdf |
226 |
|
|
Tool to convert the DVI format of TeX into the PDF format. There are |
227 |
boklm |
64147 |
more such tools (for different quality levels) in the dvipdfm |
228 |
blino |
19330 |
package. All these tools use dvips of TeX to convert the DVI file to |
229 |
|
|
PostScript, then they use GhostScript to generate the PDF file. |
230 |
|
|
|
231 |
|
|
%description common |
232 |
|
|
Ghostscript is a PostScript/PDF interpreter. It can render both |
233 |
|
|
PostScript and PDF files to devices which include X window, many |
234 |
|
|
printer formats, and popular graphics file formats. |
235 |
|
|
|
236 |
|
|
This package contains the common data files needed by GhostScript. |
237 |
|
|
|
238 |
|
|
%description X |
239 |
|
|
Ghostscript is a PostScript/PDF interpreter. It can render both |
240 |
|
|
PostScript and PDF files to devices which include X window, many |
241 |
|
|
printer formats, and popular graphics file formats. |
242 |
|
|
|
243 |
|
|
This package contains a GhostScript executable with GTK-based X |
244 |
|
|
display support ("display" device, default, so it displays files by |
245 |
|
|
simply entering "gs <file>" on the command line). It makes use of the |
246 |
|
|
GhostScript shared library. |
247 |
|
|
|
248 |
|
|
%if %withstaticgs |
249 |
|
|
%description static |
250 |
|
|
Ghostscript is a PostScript/PDF interpreter. It can render both |
251 |
|
|
PostScript and PDF files to devices which include X window, many |
252 |
|
|
printer formats, and popular graphics file formats. |
253 |
|
|
|
254 |
|
|
This package contains a GhostScript executable which does not need the |
255 |
|
|
GhostScript shared library. To get simple X display support, the |
256 |
|
|
ghostscript-module-X package must be installed in addition. |
257 |
|
|
%endif |
258 |
|
|
|
259 |
|
|
%if %{GSx11SVGAmodule} |
260 |
|
|
%description module-X |
261 |
|
|
Ghostscript is a PostScript/PDF interpreter. It can render both |
262 |
|
|
PostScript and PDF files to devices which include X window, many |
263 |
|
|
printer formats, and popular graphics file formats. |
264 |
|
|
|
265 |
|
|
This package enhances Ghostscript with X window support |
266 |
|
|
|
267 |
|
|
%ifarch %ix86 |
268 |
|
|
%if %{withsvgalib} |
269 |
|
|
%description module-SVGALIB |
270 |
|
|
Ghostscript is a PostScript/PDF interpreter. It can render both |
271 |
|
|
PostScript and PDF files to devices which include X window, many |
272 |
|
|
printer formats, and popular graphics file formats. |
273 |
|
|
|
274 |
|
|
This package enhances Ghostscript with console output using SVGALIB. |
275 |
|
|
%endif |
276 |
|
|
%endif |
277 |
|
|
%endif |
278 |
|
|
|
279 |
|
|
%description -n %libgs |
280 |
|
|
This is the API library for programs which use the PostScript and/or |
281 |
|
|
PDF interpreters of GhostScript. |
282 |
|
|
|
283 |
|
|
%description -n %libgs-devel |
284 |
|
|
This package contains the static library and the header files needed |
285 |
|
|
to compile applications using the GhostScript shared library. |
286 |
|
|
|
287 |
|
|
%description -n %{libijs} |
288 |
|
|
This is the API library for programs using the IJS printer driver |
289 |
|
|
plug-in interface. Printer drivers using this interface can be added |
290 |
|
|
to GhostScript (6.53 or newer) without needing to rebuild |
291 |
|
|
GhostScript. Application programs providing an IJS interface can make |
292 |
|
|
use of IJS printer drivers directly, without needing GhostScript. |
293 |
|
|
|
294 |
|
|
%description -n %{libijs_devel} |
295 |
|
|
This package contains the static library and the header files needed |
296 |
|
|
to compile applications using the IJS library. |
297 |
|
|
|
298 |
|
|
%description doc |
299 |
|
|
This package contains documentation for GhostScript. |
300 |
|
|
|
301 |
|
|
%prep |
302 |
|
|
##### GHOSTSCRIPT |
303 |
|
|
%setup -q |
304 |
|
|
|
305 |
|
|
# prevent building and using bundled libs |
306 |
|
|
rm -rf jasper jbig2dec libpng jpeg tiff |
307 |
|
|
# rm -rf lcms <- don't work due to internal changes in the bundled lcms code |
308 |
|
|
# rm -rf freetype <- don't work for unknown reasons |
309 |
|
|
# rm -rf zlib <- don't work for unknown reasons |
310 |
|
|
|
311 |
|
|
%patch3 -p0 -b .shared |
312 |
|
|
|
313 |
|
|
# Fedora patches |
314 |
|
|
# Fix some shell scripts |
315 |
|
|
%patch102 -p1 -b .scripts |
316 |
|
|
|
317 |
|
|
# Define .runlibfileifexists. |
318 |
|
|
%patch105 -p1 |
319 |
|
|
|
320 |
|
|
# Fix pksmraw output (RH bug #308211). Still needed in 8.63. |
321 |
|
|
%patch107 -p1 -b .pksmraw |
322 |
|
|
|
323 |
|
|
# Convert manual pages to UTF-8 |
324 |
|
|
from8859_1() { |
325 |
|
|
iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_" |
326 |
|
|
mv "${1}_" "$1" |
327 |
|
|
} |
328 |
|
|
for i in man/de/*.1; do from8859_1 "$i"; done |
329 |
|
|
|
330 |
|
|
|
331 |
|
|
# Stuff for shared library support to ghostscript. |
332 |
|
|
%if %{GSx11SVGAmodule} |
333 |
|
|
|
334 |
|
|
# build a small README describing the features available. |
335 |
blino |
19364 |
cat <<EOF >README.shared.%{_vendor} |
336 |
blino |
19330 |
This version of ghostscript support shared modules dynamically loaded |
337 |
|
|
at run time. |
338 |
|
|
|
339 |
blino |
19365 |
There are currently two modules compiled with the %{distribution} version of |
340 |
blino |
19330 |
ghostscript, one to support all X11 devices (typically used by gv) and |
341 |
|
|
another to support the svgalib devices. Look at the |
342 |
|
|
ghostscript-module-??? packages. |
343 |
|
|
|
344 |
|
|
There is no configuration needed, just can add (or remove) the package |
345 |
|
|
to add (or remove) the devices concerned in ghostscript. |
346 |
|
|
EOF |
347 |
|
|
|
348 |
|
|
%endif |
349 |
|
|
|
350 |
|
|
# ps2pdfpress |
351 |
|
|
bzcat %{SOURCE2} > ps2pdfpress |
352 |
|
|
|
353 |
|
|
# UPP file for SiPix Pocket Printer A6 |
354 |
|
|
bzcat %{SOURCE3} > sipixa6.upp |
355 |
|
|
|
356 |
|
|
%build |
357 |
|
|
|
358 |
|
|
# Change compiler flags for debugging when in debug mode |
359 |
|
|
%if %debug |
360 |
|
|
export DONT_STRIP=1 |
361 |
|
|
export CFLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`" |
362 |
|
|
export CXXFLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`" |
363 |
|
|
export RPM_OPT_FLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`" |
364 |
|
|
%endif |
365 |
|
|
|
366 |
|
|
##### IJS |
367 |
|
|
|
368 |
|
|
cd ijs* |
369 |
|
|
# Rebuild broken build infrastructure |
370 |
|
|
# Needed by patch4. |
371 |
|
|
./autogen.sh |
372 |
lmenut |
87327 |
%configure2_5x \ |
373 |
|
|
%ifarch %{ix86} |
374 |
|
|
--disable-sse2 \ |
375 |
|
|
%endif |
376 |
|
|
--enable-shared |
377 |
blino |
19330 |
%make |
378 |
|
|
cd .. |
379 |
|
|
|
380 |
|
|
##### GHOSTSCRIPT |
381 |
|
|
|
382 |
|
|
# We have a Subversion version, so we must re-generate "configure" |
383 |
|
|
./autogen.sh |
384 |
|
|
|
385 |
|
|
%configure2_5x \ |
386 |
|
|
--enable-dynamic \ |
387 |
|
|
%if !%{bootstrap} |
388 |
|
|
--enable-fontconfig \ |
389 |
|
|
%endif |
390 |
lmenut |
87327 |
%ifarch %{ix86} |
391 |
|
|
--disable-sse2 \ |
392 |
|
|
%endif |
393 |
blino |
19330 |
--with-drivers=ALL,opvp \ |
394 |
|
|
--with-fontpath="/usr/share/fonts/default/ghostscript:/usr/share/fonts/default/type1:/usr/share/ghostscript/fonts:/usr/share/ghostscript/%{gsversion}/Resource:/usr/share/ghostscript/Resource:/usr/share/ghostscript/CIDFont:/usr/share/fonts/ttf:/usr/share/fonts/type1:/usr/share/fonts/default/Type1" \ |
395 |
|
|
--with-ijs \ |
396 |
|
|
--with-omni \ |
397 |
|
|
--with-x |
398 |
|
|
|
399 |
|
|
# Drivers which do not compile: |
400 |
|
|
# Needs newsiop/lbp.h: nwp533 |
401 |
|
|
# Needs sys/ioccom.h: sparc |
402 |
|
|
# Needs unbdev/lpviio.h: sparc |
403 |
|
|
|
404 |
|
|
# Set documentation dir |
405 |
|
|
perl -p -i -e 's|^(docdir=).*$|$1\$\(datadir\)/doc/%{name}-doc-%{gsversion}|' Makefile |
406 |
|
|
|
407 |
|
|
# Fix references to X11 libraries |
408 |
|
|
perl -p -i -e "s|(/usr/X11R6)/lib\b|\1/%{_lib}|g" Makefile base/*.mak |
409 |
|
|
|
410 |
|
|
# Correct paths for CJK fonts |
411 |
|
|
perl -p -i -e "s:/usr/share/ghostscript/:/usr/share/ghostscript/Resource/:g" Resource/Init/gs_res.ps |
412 |
|
|
perl -p -i -e "s:ghostscript/Resource/fonts:ghostscript/Resource/Font:g" Resource/Init/gs_res.ps |
413 |
|
|
|
414 |
|
|
# Do not use "-ansi" in gcc calls |
415 |
|
|
perl -p -i -e "s:-ansi::g" Makefile |
416 |
|
|
|
417 |
|
|
# The RPM macro for make is not used here, as parallelization of the build |
418 |
|
|
# process does not work. |
419 |
|
|
%if %withstaticgs |
420 |
|
|
make |
421 |
|
|
%else |
422 |
|
|
%if %GSx11SVGAmodule |
423 |
fwang |
150964 |
make soobj/X11.so BUILDDIRPREFIX=so |
424 |
blino |
19330 |
%endif |
425 |
|
|
%endif |
426 |
|
|
make so |
427 |
|
|
#make pcl3opts |
428 |
|
|
|
429 |
|
|
%install |
430 |
|
|
rm -rf %{buildroot} |
431 |
|
|
|
432 |
|
|
# Change compiler flags for debugging when in debug mode |
433 |
|
|
%if %debug |
434 |
|
|
export DONT_STRIP=1 |
435 |
|
|
export CFLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`" |
436 |
|
|
export CXXFLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`" |
437 |
|
|
export RPM_OPT_FLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`" |
438 |
|
|
%endif |
439 |
|
|
|
440 |
|
|
# Make directories |
441 |
|
|
install -d %{buildroot}%{_bindir} |
442 |
|
|
install -d %{buildroot}%{_libdir} |
443 |
|
|
install -d %{buildroot}%{_includedir} |
444 |
|
|
install -d %{buildroot}%{_sysconfdir} |
445 |
|
|
install -d %{buildroot}%{_mandir}/man1 |
446 |
|
|
%if !%{bootstrap} |
447 |
|
|
install -d %{buildroot}%{_prefix}/lib/cups |
448 |
|
|
install -d %{buildroot}%{_datadir}/cups/model |
449 |
|
|
install -d %{buildroot}%{_sysconfdir}/cups |
450 |
|
|
%endif |
451 |
|
|
|
452 |
|
|
##### IJS |
453 |
|
|
cd ijs* |
454 |
|
|
%configure2_5x --enable-shared --prefix=%buildroot%{_prefix} --libdir=%buildroot%{_libdir} |
455 |
|
|
# Work around bug in "configure" script |
456 |
|
|
perl -p -i -e 's/\@OBJEXT\@/o/g' Makefile |
457 |
|
|
perl -p -i -e 's/\@EXEEXT\@//g' Makefile |
458 |
|
|
%makeinstall |
459 |
|
|
# Fix prefixes in scripts |
460 |
|
|
perl -p -i -e "s:%buildroot::g" %buildroot%{_bindir}/ijs-config |
461 |
|
|
perl -p -i -e "s:%buildroot::g" %buildroot%{_libdir}/pkgconfig/ijs.pc |
462 |
|
|
cd .. |
463 |
|
|
|
464 |
|
|
##### GHOSTSCRIPT |
465 |
|
|
mkdir -p %{buildroot}%{_docdir}/ghostscript-doc-%{gsversion} |
466 |
|
|
|
467 |
|
|
%if %withstaticgs |
468 |
|
|
make \ |
469 |
|
|
prefix=%{buildroot}/usr \ |
470 |
|
|
DESTDIR=%{buildroot} \ |
471 |
|
|
gssharedir=%{buildroot}%{_libdir}/ghostscript/%{gsversion} \ |
472 |
|
|
docdir=%{_docdir}/ghostscript-doc-%{gsversion} \ |
473 |
|
|
bindir=%{buildroot}%{_bindir} \ |
474 |
|
|
mandir=%{buildroot}%{_mandir} \ |
475 |
|
|
install |
476 |
|
|
%else |
477 |
|
|
%if !%{bootstrap} |
478 |
|
|
make \ |
479 |
|
|
prefix=%{_prefix} \ |
480 |
|
|
DESTDIR=%{buildroot} \ |
481 |
|
|
gssharedir=%{_libdir}/ghostscript/%{gsversion} \ |
482 |
|
|
docdir=%{_docdir}/ghostscript-doc-%{gsversion} \ |
483 |
|
|
bindir=%{_bindir} \ |
484 |
|
|
mandir=%{_mandir} \ |
485 |
|
|
install-cups |
486 |
|
|
%endif |
487 |
|
|
|
488 |
|
|
%if %GSx11SVGAmodule |
489 |
|
|
make \ |
490 |
|
|
prefix=%{_prefix} \ |
491 |
|
|
DESTDIR=%{buildroot} \ |
492 |
|
|
gssharedir=%{_libdir}/ghostscript/%{gsversion} \ |
493 |
|
|
docdir=%{_docdir}/ghostscript-doc-%{gsversion} \ |
494 |
|
|
bindir=%{_bindir} \ |
495 |
|
|
mandir=%{_mandir} \ |
496 |
|
|
install-shared |
497 |
|
|
%endif |
498 |
|
|
%endif |
499 |
|
|
|
500 |
|
|
%if 0 |
501 |
|
|
make \ |
502 |
|
|
prefix=%{_prefix} \ |
503 |
|
|
DESTDIR=%{buildroot} \ |
504 |
|
|
gssharedir=%{_libdir}/ghostscript/%{gsversion} \ |
505 |
|
|
docdir=%{_docdir}/ghostscript-doc-%{gsversion} \ |
506 |
|
|
bindir=%{_bindir} \ |
507 |
|
|
mandir=%{_mandir} \ |
508 |
|
|
man1dir=%{_mandir}/man1 \ |
509 |
|
|
pcl3-install |
510 |
|
|
%endif |
511 |
|
|
|
512 |
|
|
make \ |
513 |
|
|
prefix=%{_prefix} \ |
514 |
|
|
DESTDIR=%{buildroot} \ |
515 |
|
|
gssharedir=%{_libdir}/ghostscript/%{gsversion} \ |
516 |
|
|
docdir=%{_docdir}/ghostscript-doc-%{gsversion} \ |
517 |
|
|
bindir=%{_bindir} \ |
518 |
|
|
libdir=%{_libdir} \ |
519 |
|
|
mandir=%{_mandir} \ |
520 |
|
|
soinstall |
521 |
|
|
|
522 |
|
|
ln -sf gs.1.bz2 %{buildroot}%{_mandir}/man1/ghostscript.1.bz2 |
523 |
|
|
|
524 |
|
|
%if %withstaticgs |
525 |
|
|
mv %{buildroot}%{_bindir}/gs %{buildroot}%{_bindir}/gs-static |
526 |
|
|
%endif |
527 |
|
|
|
528 |
|
|
# ps2pdfpress |
529 |
|
|
install -m 755 ps2pdfpress %{buildroot}%{_bindir} |
530 |
|
|
|
531 |
|
|
# UPP file for SiPix Pocket Printer A6 |
532 |
|
|
install -m 644 sipixa6.upp %{buildroot}%{_datadir}/ghostscript/%{gsversion}/lib/ |
533 |
|
|
|
534 |
|
|
%if %{withcupsfilters} |
535 |
|
|
%if 0 |
536 |
|
|
# "pstoraster" wrapper script to make GhostScript being used as the |
537 |
|
|
# cups-internal RIP |
538 |
|
|
install -d %{buildroot}%{_libdir}/cups/filter |
539 |
|
|
install -m 755 pstoraster/pstoraster %{buildroot}%{_libdir}/cups/filter |
540 |
|
|
install -m 755 pstoraster/pstopxl %{buildroot}%{_libdir}/cups/filter |
541 |
|
|
install -d %{buildroot}%{_datadir}/cups/model |
542 |
|
|
install -m 755 pstoraster/*.ppd %{buildroot}%{_datadir}/cups/model |
543 |
|
|
install -d %{buildroot}%{_sysconfdir}/cups |
544 |
|
|
install -m 644 pstoraster/pstoraster.convs %{buildroot}%{_sysconfdir}/cups |
545 |
|
|
%endif |
546 |
|
|
%endif |
547 |
|
|
|
548 |
|
|
##### GENERAL STUFF |
549 |
|
|
|
550 |
|
|
# Correct permissions for all documentation files |
551 |
|
|
chmod -R a+rX %{buildroot}%{_docdir} |
552 |
|
|
chmod -R go-w %{buildroot}%{_docdir} |
553 |
|
|
chmod -R u+w %{buildroot}%{_docdir} |
554 |
|
|
|
555 |
|
|
##### FILES |
556 |
|
|
|
557 |
|
|
%files |
558 |
|
|
%defattr(-,root,root) |
559 |
|
|
%{_bindir}/gsc |
560 |
|
|
|
561 |
|
|
%files X |
562 |
|
|
%defattr(-,root,root) |
563 |
|
|
%{_bindir}/gsx |
564 |
|
|
|
565 |
|
|
%if %withstaticgs |
566 |
|
|
%files static |
567 |
|
|
%defattr(-,root,root) |
568 |
|
|
%{_bindir}/gs-static |
569 |
|
|
%endif |
570 |
|
|
|
571 |
|
|
%files common |
572 |
|
|
%defattr(-,root,root) |
573 |
|
|
%dir %{_datadir}/ghostscript |
574 |
|
|
%{_datadir}/ghostscript/%{gsversion} |
575 |
|
|
#%{_datadir}/ghostscript/Resource |
576 |
|
|
#%{_datadir}/ghostscript/CIDFont |
577 |
|
|
%{_mandir}/man1/* |
578 |
|
|
%lang(de) %{_mandir}/de/man1/* |
579 |
fwang |
143159 |
#%{_bindir}/[a-c]* |
580 |
blino |
19330 |
%{_bindir}/dumphint |
581 |
|
|
%{_bindir}/[e-f]* |
582 |
|
|
#{_bindir}/gs-common |
583 |
|
|
%{_bindir}/gs[a-b]* |
584 |
|
|
%{_bindir}/gs[d-n]* |
585 |
|
|
%{_bindir}/[j-l]* |
586 |
|
|
%{_bindir}/[n-z]* |
587 |
|
|
%if %{withcupsfilters} |
588 |
|
|
# "pstoraster" wrapper script to make GhostScript being used as the |
589 |
|
|
# cups-internal RIP |
590 |
|
|
%attr(0755,root,root) %{_prefix}/lib*/cups/filter/* |
591 |
|
|
%{_datadir}/cups/model/* |
592 |
lmenut |
87327 |
%config(noreplace) %{_sysconfdir}/cups/gstoraster.convs |
593 |
blino |
19330 |
%endif |
594 |
|
|
|
595 |
|
|
%files doc |
596 |
|
|
%defattr(-,root,root) |
597 |
|
|
%doc %{_docdir}/ghostscript-doc-%{gsversion} |
598 |
|
|
|
599 |
|
|
%files dvipdf |
600 |
|
|
%defattr(-,root,root) |
601 |
|
|
%{_bindir}/dvipdf |
602 |
|
|
|
603 |
|
|
%if %{GSx11SVGAmodule} |
604 |
|
|
%files module-X |
605 |
|
|
%defattr(-,root,root) |
606 |
blino |
19364 |
%doc README.shared.%{_vendor} |
607 |
blino |
19330 |
%dir %{_libdir}/ghostscript/%{gsversion} |
608 |
|
|
%{_libdir}/ghostscript/%{gsversion}/X11.so |
609 |
|
|
|
610 |
|
|
%ifarch %ix86 |
611 |
|
|
%if %{withsvgalib} |
612 |
|
|
%files module-SVGALIB |
613 |
|
|
%defattr(-,root,root) |
614 |
blino |
19364 |
%doc README.shared.%{_vendor} |
615 |
blino |
19330 |
%dir %{_libdir}/ghostscript/%{gsversion} |
616 |
|
|
%{_libdir}/ghostscript/%{gsversion}/lvga256.so |
617 |
|
|
%{_libdir}/ghostscript/%{gsversion}/vgalib.so |
618 |
|
|
%endif |
619 |
|
|
%endif |
620 |
|
|
%endif |
621 |
|
|
|
622 |
|
|
%files -n %{libgs} |
623 |
|
|
%defattr(-,root,root) |
624 |
|
|
%{_libdir}/libgs.so.*%{gsmajor}* |
625 |
|
|
|
626 |
|
|
%files -n %{libgs_devel} |
627 |
|
|
%defattr(-,root,root) |
628 |
|
|
%{_libdir}/libgs.so |
629 |
|
|
%{_includedir}/ghostscript |
630 |
|
|
|
631 |
|
|
%files -n %{libijs} |
632 |
|
|
%defattr(-,root,root) |
633 |
|
|
%{_libdir}/libijs*.so |
634 |
|
|
|
635 |
|
|
%files -n %{libijs_devel} |
636 |
|
|
%defattr(-,root,root) |
637 |
|
|
%doc ijs/README |
638 |
|
|
%{_libdir}/libijs.a |
639 |
|
|
%{_libdir}/libijs.la |
640 |
|
|
%{_libdir}/libijs.so |
641 |
|
|
%{_libdir}/pkgconfig/ijs.pc |
642 |
|
|
%{_includedir}/ijs |
643 |
|
|
%{_bindir}/ijs_client_example |
644 |
|
|
%{_bindir}/ijs_server_example |
645 |
|
|
%{_bindir}/ijs-config |
646 |
|
|
|
647 |
|
|
|
648 |
|
|
##### PRE/POSTINSTALL SCRIPTS |
649 |
|
|
|
650 |
|
|
%post |
651 |
|
|
# Set up update-alternatives entries |
652 |
|
|
%{_sbindir}/update-alternatives --install %{_bindir}/gs gs %{_bindir}/gsc 200 |
653 |
|
|
|
654 |
|
|
%post X |
655 |
|
|
# Set up update-alternatives entries |
656 |
|
|
%{_sbindir}/update-alternatives --install %{_bindir}/gs gs %{_bindir}/gsx 100 |
657 |
|
|
|
658 |
|
|
%if %withstaticgs |
659 |
|
|
%post static |
660 |
|
|
# Set up update-alternatives entries |
661 |
|
|
%{_sbindir}/update-alternatives --install %{_bindir}/gs gs %{_bindir}/gs-static 10 |
662 |
|
|
%endif |
663 |
|
|
|
664 |
|
|
%post common |
665 |
|
|
# Initialize japanese fonts |
666 |
|
|
if test -f /usr/share/fonts/ttf/japanese/cidinst; then |
667 |
|
|
sh /usr/share/fonts/ttf/japanese/cidinst |
668 |
|
|
fi |
669 |
|
|
|
670 |
|
|
%preun |
671 |
|
|
if [ "$1" = 0 ]; then |
672 |
|
|
# Remove update-alternatives entry |
673 |
|
|
%{_sbindir}/update-alternatives --remove gs %{_bindir}/gsc |
674 |
|
|
fi |
675 |
|
|
|
676 |
|
|
%preun X |
677 |
|
|
if [ "$1" = 0 ]; then |
678 |
|
|
# Remove update-alternatives entry |
679 |
|
|
%{_sbindir}/update-alternatives --remove gs %{_bindir}/gsx |
680 |
|
|
fi |
681 |
|
|
|
682 |
|
|
%if %withstaticgs |
683 |
|
|
%preun static |
684 |
|
|
if [ "$1" = 0 ]; then |
685 |
|
|
# Remove update-alternatives entry |
686 |
|
|
%{_sbindir}/update-alternatives --remove gs %{_bindir}/gs-static |
687 |
|
|
fi |
688 |
|
|
%endif |
689 |
|
|
|
690 |
|
|
%clean |
691 |
|
|
rm -rf %{buildroot} |
692 |
|
|
|
693 |
|
|
|