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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30