/[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 282290 - (show annotations) (download)
Sun Aug 19 18:11:03 2012 UTC (7 years, 7 months ago) by luigiwalser
File size: 18600 byte(s)
- 9.06
- fix files list (no more dumphint)

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

  ViewVC Help
Powered by ViewVC 1.1.26