/[packages]/cauldron/ghostscript/current/SPECS/ghostscript.spec
ViewVC logotype

Contents of /cauldron/ghostscript/current/SPECS/ghostscript.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 115035 - (show annotations) (download)
Tue Jun 28 02:45:03 2011 UTC (8 years, 9 months ago) by ahmad
File size: 18834 byte(s)
- Drop the redundant BR libxml-devel, it builds with libxml2-devel which was
  already pulled by some other BR
1 ##### VERSION NUMBERS
2
3 %define gsversion 9.02
4 %define gsextraversion %{nil}
5 %define gsreleaseno 3
6 %define gsrelease %mkrel %gsreleaseno
7 %define gssvnrevision -rev183
8 %define ijsver 0.35
9 %define ijsreloffset 77
10 %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 BuildRequires: libcups-devel
72 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 BuildRequires: libxml2-devel
88 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 Source0: http://downloads.ghostscript.com/public/ghostscript-%{gsversion}%{gsextraversion}.tar.bz2
102 Source2: ps2pdfpress.bz2
103 Source3: http://www.linuxprinting.org/download/printing/sipixa6.upp.bz2
104
105 ##### GHOSTSCRIPT PATCHES
106 Patch3: ghostscript-8.64-x11_shared.patch
107
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 Requires: dvips
130 Provides: dvipdf = %{version}-%{release}
131
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 more such tools (for different quality levels) in the dvipdfm
228 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 cat <<EOF >README.shared.%{_vendor}
336 This version of ghostscript support shared modules dynamically loaded
337 at run time.
338
339 There are currently two modules compiled with the %{distribution} version of
340 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 %configure2_5x \
373 %ifarch %{ix86}
374 --disable-sse2 \
375 %endif
376 --enable-shared
377 %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 %ifarch %{ix86}
391 --disable-sse2 \
392 %endif
393 --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 make STDDIRS
424 make obj/X11.so
425 %endif
426 %endif
427 make so
428 #make pcl3opts
429
430 %install
431 rm -rf %{buildroot}
432
433 # Change compiler flags for debugging when in debug mode
434 %if %debug
435 export DONT_STRIP=1
436 export CFLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`"
437 export CXXFLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`"
438 export RPM_OPT_FLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`"
439 %endif
440
441 # Make directories
442 install -d %{buildroot}%{_bindir}
443 install -d %{buildroot}%{_libdir}
444 install -d %{buildroot}%{_includedir}
445 install -d %{buildroot}%{_sysconfdir}
446 install -d %{buildroot}%{_mandir}/man1
447 %if !%{bootstrap}
448 install -d %{buildroot}%{_prefix}/lib/cups
449 install -d %{buildroot}%{_datadir}/cups/model
450 install -d %{buildroot}%{_sysconfdir}/cups
451 %endif
452
453 ##### IJS
454 cd ijs*
455 %configure2_5x --enable-shared --prefix=%buildroot%{_prefix} --libdir=%buildroot%{_libdir}
456 # Work around bug in "configure" script
457 perl -p -i -e 's/\@OBJEXT\@/o/g' Makefile
458 perl -p -i -e 's/\@EXEEXT\@//g' Makefile
459 %makeinstall
460 # Fix prefixes in scripts
461 perl -p -i -e "s:%buildroot::g" %buildroot%{_bindir}/ijs-config
462 perl -p -i -e "s:%buildroot::g" %buildroot%{_libdir}/pkgconfig/ijs.pc
463 cd ..
464
465 ##### GHOSTSCRIPT
466 mkdir -p %{buildroot}%{_docdir}/ghostscript-doc-%{gsversion}
467
468 %if %withstaticgs
469 make \
470 prefix=%{buildroot}/usr \
471 DESTDIR=%{buildroot} \
472 gssharedir=%{buildroot}%{_libdir}/ghostscript/%{gsversion} \
473 docdir=%{_docdir}/ghostscript-doc-%{gsversion} \
474 bindir=%{buildroot}%{_bindir} \
475 mandir=%{buildroot}%{_mandir} \
476 install
477 %else
478 %if !%{bootstrap}
479 make \
480 prefix=%{_prefix} \
481 DESTDIR=%{buildroot} \
482 gssharedir=%{_libdir}/ghostscript/%{gsversion} \
483 docdir=%{_docdir}/ghostscript-doc-%{gsversion} \
484 bindir=%{_bindir} \
485 mandir=%{_mandir} \
486 install-cups
487 %endif
488
489 %if %GSx11SVGAmodule
490 make \
491 prefix=%{_prefix} \
492 DESTDIR=%{buildroot} \
493 gssharedir=%{_libdir}/ghostscript/%{gsversion} \
494 docdir=%{_docdir}/ghostscript-doc-%{gsversion} \
495 bindir=%{_bindir} \
496 mandir=%{_mandir} \
497 install-shared
498 %endif
499 %endif
500
501 %if 0
502 make \
503 prefix=%{_prefix} \
504 DESTDIR=%{buildroot} \
505 gssharedir=%{_libdir}/ghostscript/%{gsversion} \
506 docdir=%{_docdir}/ghostscript-doc-%{gsversion} \
507 bindir=%{_bindir} \
508 mandir=%{_mandir} \
509 man1dir=%{_mandir}/man1 \
510 pcl3-install
511 %endif
512
513 make \
514 prefix=%{_prefix} \
515 DESTDIR=%{buildroot} \
516 gssharedir=%{_libdir}/ghostscript/%{gsversion} \
517 docdir=%{_docdir}/ghostscript-doc-%{gsversion} \
518 bindir=%{_bindir} \
519 libdir=%{_libdir} \
520 mandir=%{_mandir} \
521 soinstall
522
523 ln -sf gs.1.bz2 %{buildroot}%{_mandir}/man1/ghostscript.1.bz2
524
525 %if %withstaticgs
526 mv %{buildroot}%{_bindir}/gs %{buildroot}%{_bindir}/gs-static
527 %endif
528
529 # ps2pdfpress
530 install -m 755 ps2pdfpress %{buildroot}%{_bindir}
531
532 # UPP file for SiPix Pocket Printer A6
533 install -m 644 sipixa6.upp %{buildroot}%{_datadir}/ghostscript/%{gsversion}/lib/
534
535 %if %{withcupsfilters}
536 %if 0
537 # "pstoraster" wrapper script to make GhostScript being used as the
538 # cups-internal RIP
539 install -d %{buildroot}%{_libdir}/cups/filter
540 install -m 755 pstoraster/pstoraster %{buildroot}%{_libdir}/cups/filter
541 install -m 755 pstoraster/pstopxl %{buildroot}%{_libdir}/cups/filter
542 install -d %{buildroot}%{_datadir}/cups/model
543 install -m 755 pstoraster/*.ppd %{buildroot}%{_datadir}/cups/model
544 install -d %{buildroot}%{_sysconfdir}/cups
545 install -m 644 pstoraster/pstoraster.convs %{buildroot}%{_sysconfdir}/cups
546 %endif
547 %endif
548
549 ##### GENERAL STUFF
550
551 # Correct permissions for all documentation files
552 chmod -R a+rX %{buildroot}%{_docdir}
553 chmod -R go-w %{buildroot}%{_docdir}
554 chmod -R u+w %{buildroot}%{_docdir}
555
556 ##### FILES
557
558 %files
559 %defattr(-,root,root)
560 %{_bindir}/gsc
561
562 %files X
563 %defattr(-,root,root)
564 %{_bindir}/gsx
565
566 %if %withstaticgs
567 %files static
568 %defattr(-,root,root)
569 %{_bindir}/gs-static
570 %endif
571
572 %files common
573 %defattr(-,root,root)
574 %dir %{_datadir}/ghostscript
575 %{_datadir}/ghostscript/%{gsversion}
576 #%{_datadir}/ghostscript/Resource
577 #%{_datadir}/ghostscript/CIDFont
578 %{_mandir}/man1/*
579 %lang(de) %{_mandir}/de/man1/*
580 %{_bindir}/[a-c]*
581 %{_bindir}/dumphint
582 %{_bindir}/[e-f]*
583 #{_bindir}/gs-common
584 %{_bindir}/gs[a-b]*
585 %{_bindir}/gs[d-n]*
586 %{_bindir}/[j-l]*
587 %{_bindir}/[n-z]*
588 %if %{withcupsfilters}
589 # "pstoraster" wrapper script to make GhostScript being used as the
590 # cups-internal RIP
591 %attr(0755,root,root) %{_prefix}/lib*/cups/filter/*
592 %{_datadir}/cups/model/*
593 %config(noreplace) %{_sysconfdir}/cups/gstoraster.convs
594 %endif
595
596 %files doc
597 %defattr(-,root,root)
598 %doc %{_docdir}/ghostscript-doc-%{gsversion}
599
600 %files dvipdf
601 %defattr(-,root,root)
602 %{_bindir}/dvipdf
603
604 %if %{GSx11SVGAmodule}
605 %files module-X
606 %defattr(-,root,root)
607 %doc README.shared.%{_vendor}
608 %dir %{_libdir}/ghostscript/%{gsversion}
609 %{_libdir}/ghostscript/%{gsversion}/X11.so
610
611 %ifarch %ix86
612 %if %{withsvgalib}
613 %files module-SVGALIB
614 %defattr(-,root,root)
615 %doc README.shared.%{_vendor}
616 %dir %{_libdir}/ghostscript/%{gsversion}
617 %{_libdir}/ghostscript/%{gsversion}/lvga256.so
618 %{_libdir}/ghostscript/%{gsversion}/vgalib.so
619 %endif
620 %endif
621 %endif
622
623 %files -n %{libgs}
624 %defattr(-,root,root)
625 %{_libdir}/libgs.so.*%{gsmajor}*
626
627 %files -n %{libgs_devel}
628 %defattr(-,root,root)
629 %{_libdir}/libgs.so
630 %{_includedir}/ghostscript
631
632 %files -n %{libijs}
633 %defattr(-,root,root)
634 %{_libdir}/libijs*.so
635
636 %files -n %{libijs_devel}
637 %defattr(-,root,root)
638 %doc ijs/README
639 %{_libdir}/libijs.a
640 %{_libdir}/libijs.la
641 %{_libdir}/libijs.so
642 %{_libdir}/pkgconfig/ijs.pc
643 %{_includedir}/ijs
644 %{_bindir}/ijs_client_example
645 %{_bindir}/ijs_server_example
646 %{_bindir}/ijs-config
647
648
649 ##### PRE/POSTINSTALL SCRIPTS
650
651 %post
652 # Set up update-alternatives entries
653 %{_sbindir}/update-alternatives --install %{_bindir}/gs gs %{_bindir}/gsc 200
654
655 %post X
656 # Set up update-alternatives entries
657 %{_sbindir}/update-alternatives --install %{_bindir}/gs gs %{_bindir}/gsx 100
658
659 %if %withstaticgs
660 %post static
661 # Set up update-alternatives entries
662 %{_sbindir}/update-alternatives --install %{_bindir}/gs gs %{_bindir}/gs-static 10
663 %endif
664
665 %post common
666 # Initialize japanese fonts
667 if test -f /usr/share/fonts/ttf/japanese/cidinst; then
668 sh /usr/share/fonts/ttf/japanese/cidinst
669 fi
670
671 %preun
672 if [ "$1" = 0 ]; then
673 # Remove update-alternatives entry
674 %{_sbindir}/update-alternatives --remove gs %{_bindir}/gsc
675 fi
676
677 %preun X
678 if [ "$1" = 0 ]; then
679 # Remove update-alternatives entry
680 %{_sbindir}/update-alternatives --remove gs %{_bindir}/gsx
681 fi
682
683 %if %withstaticgs
684 %preun static
685 if [ "$1" = 0 ]; then
686 # Remove update-alternatives entry
687 %{_sbindir}/update-alternatives --remove gs %{_bindir}/gs-static
688 fi
689 %endif
690
691 %clean
692 rm -rf %{buildroot}
693
694

  ViewVC Help
Powered by ViewVC 1.1.26