/[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 19330 - (show annotations) (download)
Sat Jan 15 18:03:00 2011 UTC (9 years, 6 months ago) by blino
File size: 19548 byte(s)
imported package ghostscript
1 ##### VERSION NUMBERS
2
3 %define gsversion 9.00
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 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 BuildRequires: libcups-devel >= 1.2.0-0.5361.0mdk
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: 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 Requires: tetex-dvips
132
133 %package common
134 Summary: PostScript/PDF interpreter and renderer (Common files)
135 Group: Publishing
136 Requires: urw-fonts >= 1.1, ghostscript-fonts, perl
137 Conflicts: ghostscript < 8.15-27mdk
138 %ifarch x86_64
139 Conflicts: cups < 1.2.0-0.5361.0mdk
140 %endif
141
142 %package X
143 Summary: PostScript/PDF interpreter and renderer (Executable with GTK-based screen display)
144 Group: Publishing
145 Requires: ghostscript-common
146 Requires: update-alternatives
147 # This one is buggy, so do not let it get automatically installed by
148 # the "Provides: ghostscript"
149 #Provides: ghostscript = %{version}-%{release}
150
151 %if %withstaticgs
152 %package static
153 Summary: PostScript/PDF interpreter and renderer (Static executable)
154 Group: Publishing
155 Requires: ghostscript-common
156 Requires: update-alternatives
157 Provides: ghostscript = %{version}-%{release}
158 %endif
159
160 %if %{GSx11SVGAmodule}
161 %package module-X
162 Summary: PostScript/PDF interpreter and renderer (Additional support for X)
163 Group: Publishing
164 Requires: ghostscript-common
165 Conflicts: ghostscript-X < 8.15
166 Obsoletes: ghostscript-Both
167 Provides: ghostscript-Both
168
169 %ifarch %ix86
170 %if %{withsvgalib}
171 %package module-SVGALIB
172 Summary: PostScript/PDF interpreter and renderer (Additional support for SVGALIB)
173 Group: Publishing
174 Requires: ghostscript, coreutils
175 Obsoletes: ghostscript-SVGALIB, ghostscript-Both
176 Provides: ghostscript-SVGALIB, ghostscript-Both
177 %endif
178 %endif
179 %endif
180
181 %package -n %libgs
182 Summary: PostScript/PDF interpreter and renderer (GhostScript shared library)
183 Group: Publishing
184
185 %package -n %libgs_devel
186 Summary: Headers and links to compile against the "%{libgs}" library
187 Group: Development/C
188 Requires: %libgs = %version
189 Provides: libgs-devel
190
191 ##### IJS
192
193 %package -n %{libijs}
194 Version: %{ijsver}
195 Release: %{ijsrel}
196 Summary: Dynamic library for the IJS printer driver plug-in interface
197 Group: Publishing
198 URL: http://www.linuxprinting.org/ijs/
199 Provides: libijs = %{ijsver}-%{ijsrel}
200
201 %package -n %{libijs_devel}
202 Version: %{ijsver}
203 Release: %{ijsrel}
204 Summary: Headers and links for compiling against the "%{libijs}" library
205 Group: Development/C
206 URL: http://www.linuxprinting.org/ijs/
207 Requires: %{libijs} = %{ijsver} multiarch-utils
208 Provides: libijs-devel = %{ijsver}-%{ijsrel}
209 Provides: ijs-devel = %{ijsver}-%{ijsrel}
210
211 %package doc
212 Summary: Documentation for GhostScript
213 Group: Publishing
214
215 ##### DESCRIPTION TEXTS
216
217 %description
218 Ghostscript is a set of software tools that provide a PostScript(TM)
219 interpreter, a set of C procedures (the Ghostscript library, which
220 implements the graphics capabilities in the PostScript language) and
221 an interpreter for Portable Document Format (PDF) files. Ghostscript
222 translates PostScript code into many common, bitmapped and vector
223 formats, like those understood by your printer or screen. Ghostscript
224 is normally used to display PostScript files and to print PostScript
225 files to non-PostScript printers.
226
227 You should install ghostscript if you need to display PostScript or
228 PDF files, or if you have a non-PostScript printer.
229
230 %description dvipdf
231 Tool to convert the DVI format of TeX into the PDF format. There are
232 more such tools (for different quality levels) in the tetex-dvipdfm
233 package. All these tools use dvips of TeX to convert the DVI file to
234 PostScript, then they use GhostScript to generate the PDF file.
235
236 %description common
237 Ghostscript is a PostScript/PDF interpreter. It can render both
238 PostScript and PDF files to devices which include X window, many
239 printer formats, and popular graphics file formats.
240
241 This package contains the common data files needed by GhostScript.
242
243 %description X
244 Ghostscript is a PostScript/PDF interpreter. It can render both
245 PostScript and PDF files to devices which include X window, many
246 printer formats, and popular graphics file formats.
247
248 This package contains a GhostScript executable with GTK-based X
249 display support ("display" device, default, so it displays files by
250 simply entering "gs <file>" on the command line). It makes use of the
251 GhostScript shared library.
252
253 %if %withstaticgs
254 %description static
255 Ghostscript is a PostScript/PDF interpreter. It can render both
256 PostScript and PDF files to devices which include X window, many
257 printer formats, and popular graphics file formats.
258
259 This package contains a GhostScript executable which does not need the
260 GhostScript shared library. To get simple X display support, the
261 ghostscript-module-X package must be installed in addition.
262 %endif
263
264 %if %{GSx11SVGAmodule}
265 %description module-X
266 Ghostscript is a PostScript/PDF interpreter. It can render both
267 PostScript and PDF files to devices which include X window, many
268 printer formats, and popular graphics file formats.
269
270 This package enhances Ghostscript with X window support
271
272 %ifarch %ix86
273 %if %{withsvgalib}
274 %description module-SVGALIB
275 Ghostscript is a PostScript/PDF interpreter. It can render both
276 PostScript and PDF files to devices which include X window, many
277 printer formats, and popular graphics file formats.
278
279 This package enhances Ghostscript with console output using SVGALIB.
280 %endif
281 %endif
282 %endif
283
284 %description -n %libgs
285 This is the API library for programs which use the PostScript and/or
286 PDF interpreters of GhostScript.
287
288 %description -n %libgs-devel
289 This package contains the static library and the header files needed
290 to compile applications using the GhostScript shared library.
291
292 %description -n %{libijs}
293 This is the API library for programs using the IJS printer driver
294 plug-in interface. Printer drivers using this interface can be added
295 to GhostScript (6.53 or newer) without needing to rebuild
296 GhostScript. Application programs providing an IJS interface can make
297 use of IJS printer drivers directly, without needing GhostScript.
298
299 %description -n %{libijs_devel}
300 This package contains the static library and the header files needed
301 to compile applications using the IJS library.
302
303 %description doc
304 This package contains documentation for GhostScript.
305
306 %prep
307 ##### GHOSTSCRIPT
308 %setup -q
309
310 # prevent building and using bundled libs
311 rm -rf jasper jbig2dec libpng jpeg tiff
312 # rm -rf lcms <- don't work due to internal changes in the bundled lcms code
313 # rm -rf freetype <- don't work for unknown reasons
314 # rm -rf zlib <- don't work for unknown reasons
315
316 %patch3 -p0 -b .shared
317 %patch4 -p0 -b .linkage
318
319 # Fedora patches
320 # Fix some shell scripts
321 %patch102 -p1 -b .scripts
322
323 # Define .runlibfileifexists.
324 %patch105 -p1
325 %patch106 -p0 -b .system-jasper
326
327 # Fix pksmraw output (RH bug #308211). Still needed in 8.63.
328 %patch107 -p1 -b .pksmraw
329
330 # Convert manual pages to UTF-8
331 from8859_1() {
332 iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_"
333 mv "${1}_" "$1"
334 }
335 for i in man/de/*.1; do from8859_1 "$i"; done
336
337
338 # Stuff for shared library support to ghostscript.
339 %if %{GSx11SVGAmodule}
340
341 # build a small README describing the features available.
342 cat <<EOF >README.shared.mandrivalinux
343 This version of ghostscript support shared modules dynamically loaded
344 at run time.
345
346 There are currently two modules compiled with the Mandriva Linux version of
347 ghostscript, one to support all X11 devices (typically used by gv) and
348 another to support the svgalib devices. Look at the
349 ghostscript-module-??? packages.
350
351 There is no configuration needed, just can add (or remove) the package
352 to add (or remove) the devices concerned in ghostscript.
353 EOF
354
355 %endif
356
357 # ps2pdfpress
358 bzcat %{SOURCE2} > ps2pdfpress
359
360 # UPP file for SiPix Pocket Printer A6
361 bzcat %{SOURCE3} > sipixa6.upp
362
363 %build
364
365 # Change compiler flags for debugging when in debug mode
366 %if %debug
367 export DONT_STRIP=1
368 export CFLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`"
369 export CXXFLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`"
370 export RPM_OPT_FLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`"
371 %endif
372
373 ##### IJS
374
375 cd ijs*
376 # Rebuild broken build infrastructure
377 # Needed by patch4.
378 ./autogen.sh
379 %configure2_5x --enable-shared
380 %make
381 cd ..
382
383 ##### GHOSTSCRIPT
384
385 # We have a Subversion version, so we must re-generate "configure"
386 ./autogen.sh
387
388 %configure2_5x \
389 --enable-dynamic \
390 %if !%{bootstrap}
391 --enable-fontconfig \
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 # Add backward compatibility link to not break printerdrake in Mandriva
550 # 2006 and older
551 ln -s %{_bindir}/gsc %{buildroot}%{_bindir}/gs-common
552 ln -s %{_bindir}/gsc %{buildroot}%{_bindir}/ghostscript
553
554 ##### GENERAL STUFF
555
556 # Correct permissions for all documentation files
557 chmod -R a+rX %{buildroot}%{_docdir}
558 chmod -R go-w %{buildroot}%{_docdir}
559 chmod -R u+w %{buildroot}%{_docdir}
560
561 ##### FILES
562
563 %files
564 %defattr(-,root,root)
565 %{_bindir}/gsc
566 %{_bindir}/gs-common
567 %{_bindir}/ghostscript
568
569 %files X
570 %defattr(-,root,root)
571 %{_bindir}/gsx
572
573 %if %withstaticgs
574 %files static
575 %defattr(-,root,root)
576 %{_bindir}/gs-static
577 %endif
578
579 %files common
580 %defattr(-,root,root)
581 %dir %{_datadir}/ghostscript
582 %{_datadir}/ghostscript/%{gsversion}
583 #%{_datadir}/ghostscript/Resource
584 #%{_datadir}/ghostscript/CIDFont
585 %{_mandir}/man1/*
586 %lang(de) %{_mandir}/de/man1/*
587 %{_bindir}/[a-c]*
588 %{_bindir}/dumphint
589 %{_bindir}/[e-f]*
590 #{_bindir}/gs-common
591 %{_bindir}/gs[a-b]*
592 %{_bindir}/gs[d-n]*
593 %{_bindir}/[j-l]*
594 %{_bindir}/[n-z]*
595 %if %{withcupsfilters}
596 # "pstoraster" wrapper script to make GhostScript being used as the
597 # cups-internal RIP
598 %attr(0755,root,root) %{_prefix}/lib*/cups/filter/*
599 %{_datadir}/cups/model/*
600 %config(noreplace) %{_sysconfdir}/cups/pstoraster.convs
601 %config(noreplace) %{_sysconfdir}/cups/pdftoraster.convs
602 %endif
603
604 %files doc
605 %defattr(-,root,root)
606 %doc %{_docdir}/ghostscript-doc-%{gsversion}
607
608 %files dvipdf
609 %defattr(-,root,root)
610 %{_bindir}/dvipdf
611
612 %if %{GSx11SVGAmodule}
613 %files module-X
614 %defattr(-,root,root)
615 %doc README.shared.mandrivalinux
616 %dir %{_libdir}/ghostscript/%{gsversion}
617 %{_libdir}/ghostscript/%{gsversion}/X11.so
618
619 %ifarch %ix86
620 %if %{withsvgalib}
621 %files module-SVGALIB
622 %defattr(-,root,root)
623 %doc README.shared.mandrivalinux
624 %dir %{_libdir}/ghostscript/%{gsversion}
625 %{_libdir}/ghostscript/%{gsversion}/lvga256.so
626 %{_libdir}/ghostscript/%{gsversion}/vgalib.so
627 %endif
628 %endif
629 %endif
630
631 %files -n %{libgs}
632 %defattr(-,root,root)
633 %{_libdir}/libgs.so.*%{gsmajor}*
634
635 %files -n %{libgs_devel}
636 %defattr(-,root,root)
637 %{_libdir}/libgs.so
638 %{_includedir}/ghostscript
639
640 %files -n %{libijs}
641 %defattr(-,root,root)
642 %{_libdir}/libijs*.so
643
644 %files -n %{libijs_devel}
645 %defattr(-,root,root)
646 %doc ijs/README
647 %{_libdir}/libijs.a
648 %{_libdir}/libijs.la
649 %{_libdir}/libijs.so
650 %{_libdir}/pkgconfig/ijs.pc
651 %{_includedir}/ijs
652 %{_bindir}/ijs_client_example
653 %{_bindir}/ijs_server_example
654 %{_bindir}/ijs-config
655
656
657 ##### PRE/POSTINSTALL SCRIPTS
658
659 %post
660 # Set up update-alternatives entries
661 %{_sbindir}/update-alternatives --install %{_bindir}/gs gs %{_bindir}/gsc 200
662
663 %post X
664 # Set up update-alternatives entries
665 %{_sbindir}/update-alternatives --install %{_bindir}/gs gs %{_bindir}/gsx 100
666
667 %if %withstaticgs
668 %post static
669 # Set up update-alternatives entries
670 %{_sbindir}/update-alternatives --install %{_bindir}/gs gs %{_bindir}/gs-static 10
671 %endif
672
673 %post common
674 # Initialize japanese fonts
675 if test -f /usr/share/fonts/ttf/japanese/cidinst; then
676 sh /usr/share/fonts/ttf/japanese/cidinst
677 fi
678
679 %if %mdkversion < 200900
680 %post -n %{libijs} -p /sbin/ldconfig
681 %endif
682
683 %if %mdkversion < 200900
684 %post -n %{libgs} -p /sbin/ldconfig
685 %endif
686
687 %preun
688 if [ "$1" = 0 ]; then
689 # Remove update-alternatives entry
690 %{_sbindir}/update-alternatives --remove gs %{_bindir}/gsc
691 fi
692
693 %preun X
694 if [ "$1" = 0 ]; then
695 # Remove update-alternatives entry
696 %{_sbindir}/update-alternatives --remove gs %{_bindir}/gsx
697 fi
698
699 %if %withstaticgs
700 %preun static
701 if [ "$1" = 0 ]; then
702 # Remove update-alternatives entry
703 %{_sbindir}/update-alternatives --remove gs %{_bindir}/gs-static
704 fi
705 %endif
706
707 %if %mdkversion < 200900
708 %postun -n %{libijs} -p /sbin/ldconfig
709 %endif
710
711 %if %mdkversion < 200900
712 %postun -n %{libgs} -p /sbin/ldconfig
713 %endif
714
715 %clean
716 rm -rf %{buildroot}
717
718

  ViewVC Help
Powered by ViewVC 1.1.28