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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 282290 by luigiwalser, Sun Aug 19 18:11:03 2012 UTC revision 289699 by luigiwalser, Fri Sep 7 23:51:02 2012 UTC
# Line 1  Line 1 
1  ##### VERSION NUMBERS  %define _disable_ld_no_undefined 1
2    %define rel     1
3    
4  %define gsversion 9.06  %define gsver 9.06
 %define gsextraversion %{nil}  
 %define gsreleaseno 1  
 %define gsrelease %mkrel %gsreleaseno  
 %define gssvnrevision -rev183  
5  %define ijsver 0.35  %define ijsver 0.35
6  %define ijsreloffset 84  %define ijsreloffset 84
7  %define ijsrelno %(echo $((%{gsreleaseno} + %{ijsreloffset})))  %define ijsrel %(echo $((%{rel} + %{ijsreloffset})))
8  %define ijsrel %mkrel %ijsrelno  
9  %define ijsmajor 1  %define ijsmajor 1
10  %define libijs %mklibname ijs %{ijsmajor}  %define libijs %mklibname ijs %{ijsmajor}
11  %define libijs_devel %mklibname -d ijs %{ijsmajor}  %define libijs_devel %mklibname -d ijs
12    
13  %define gsmajor 9  %define gsmajor 9
14  %define libgs %mklibname gs %{gsmajor}  %define libgs %mklibname gs %{gsmajor}
15  %define libgs_devel %mklibname -d gs %{gsmajor}  %define libgs_devel %mklibname -d gs
   
 %define _disable_ld_no_undefined 1  
16    
17  ##### BUILD OPTIONS  %define bootstrap 0
18    
19  %define GSx11SVGAmodule 1  %define GSx11SVGAmodule 1
 %define withsvgalib 0  
20  %define withcupsfilters 1  %define withcupsfilters 1
 %define withstaticgs 0  
21  %define debug 0  %define debug 0
   
 %define bootstrap 0  
 %{?_without_bootstrap: %global bootstrap 0}  
 %{?_with_bootstrap: %global bootstrap 1}  
   
22  %if %{bootstrap}  %if %{bootstrap}
23  %global withcupsfilters 0  %global withcupsfilters 0
24  %endif  %endif
25    
 ##### GENERAL DEFINITIONS  
   
26  Summary:        PostScript/PDF interpreter and renderer (Main executable)  Summary:        PostScript/PDF interpreter and renderer (Main executable)
27  Name:           ghostscript  Name:           ghostscript
28  Version:        %{gsversion}%{gsextraversion}  Version:        %{gsver}
29  Release:        %{gsrelease}  Release:        %{rel}
30  License:        GPLv2+  License:        GPLv2+
31  Group:          Publishing  Group:          Publishing
 Requires:       ghostscript-common  
 Requires:       update-alternatives  
 Obsoletes:      ghostscript-PrintOnly  
 Provides:       ghostscript-PrintOnly  
 %if !%{GSx11SVGAmodule}  
 Obsoletes:      ghostscript-module-X ghostscript-module-SVGALIB  
 Provides:       ghostscript-module-X ghostscript-module-SVGALIB  
 %endif  
 %if !%{withstaticgs}  
 Obsoletes:      ghostscript-static  
 Provides:       ghostscript-static  
 %endif  
 Conflicts:      omni < 0.4 cups <= 1.1.14  
 Conflicts:      printer-filters <= 10.1  
32  URL:            http://www.ghostscript.com/awki/Index  URL:            http://www.ghostscript.com/awki/Index
33    Source0:        http://downloads.ghostscript.com/public/ghostscript-%{gsver}.tar.bz2
34    Source2:        ps2pdfpress.bz2
35    Source3:        http://www.linuxprinting.org/download/printing/sipixa6.upp.bz2
36    
37  ##### BUILDREQUIRES  Patch300: ghostscript-9.05-x11_shared.diff
38    # Fedora patches
39    # Fix ijs-config not to have multilib conflicts (bug #192672)
40    Patch1: ghostscript-multilib.patch
41    # Fix some shell scripts
42    Patch2: ghostscript-scripts.patch
43    # Build igcref.c with -O0 to work around bug #150771.
44    Patch3: ghostscript-noopt.patch
45    # Fix ./autgen.sh in ijs sub-project
46    # See http://bugs.ghostscript.com/show_bug.cgi?id=692040 for details.
47    Patch4: ghostscript-ijs-automake-ver.patch
48    # Define .runlibfileifexists.
49    Patch5: ghostscript-runlibfileifexists.patch
50    # Install CUPS filter convs files in the correct place.
51    Patch10: ghostscript-cups-filters.patch
52    # Restored Fontmap.local patch, incorrectly dropped after
53    # ghostscript-8.15.4-3 (bug #610301).
54    # Note: don't use -b here to avoid the backup file ending up in the
55    # package manifest.
56    Patch27: ghostscript-Fontmap.local.patch
57    # Don't assume %%rom%% device is available for initial ICC profile dir.
58    Patch28: ghostscript-iccprofiles-initdir.patch
59    # gdevcups: don't use uninitialized variables in debugging output.
60    Patch29: ghostscript-gdevcups-debug-uninit.patch
61    
62  BuildRequires: autoconf2.5  %if !%{bootstrap}
63    BuildRequires: gtk+2-devel
64    BuildRequires: cups-devel
65    BuildRequires: fontconfig-devel
66    %endif
67  BuildRequires: bison  BuildRequires: bison
68  BuildRequires: flex  BuildRequires: flex
69  BuildRequires: freetype2-devel  BuildRequires: libtool
70    BuildRequires: unzip
71  BuildRequires: gettext-devel  BuildRequires: gettext-devel
72  BuildRequires: glibc-devel  BuildRequires: glibc-devel
 %if !%{bootstrap}  
 BuildRequires: gtk+2-devel  
 BuildRequires: libcups-devel  
 BuildRequires: libfontconfig-devel  
 %endif  
 BuildRequires: fontconfig-devel  
73  BuildRequires: jbig2dec-devel  BuildRequires: jbig2dec-devel
74  BuildRequires: libice-devel  BuildRequires: jpeg-devel
 BuildRequires: libidn-devel  
 BuildRequires: libjasper-devel  
 BuildRequires: libjpeg-devel  
 BuildRequires: libnetpbm-devel  
75  BuildRequires: libpaper-devel  BuildRequires: libpaper-devel
76  BuildRequires: libpng-devel  BuildRequires: netpbm-devel
77  BuildRequires: libsm-devel  BuildRequires: tiff-devel
78  BuildRequires: libtiff-devel  BuildRequires: pkgconfig(freetype2)
79  BuildRequires: libx11-devel  BuildRequires: pkgconfig(ice)
80  BuildRequires: libxext-devel  BuildRequires: pkgconfig(jasper)
81  BuildRequires: libxml2-devel  BuildRequires: pkgconfig(lcms)
82  BuildRequires: libxt-devel  BuildRequires: pkgconfig(libidn)
83  BuildRequires: pkgconfig  BuildRequires: pkgconfig(libpng15)
84  BuildRequires: unzip  BuildRequires: pkgconfig(libxml-2.0)
85  BuildRequires: zlib-devel  BuildRequires: pkgconfig(sm)
86    BuildRequires: pkgconfig(x11)
87  %ifarch %ix86  BuildRequires: pkgconfig(xext)
88  %if %{withsvgalib}  BuildRequires: pkgconfig(xt)
89  BuildRequires:  svgalib-devel  BuildRequires: pkgconfig(zlib)
 %endif  
 %endif  
   
 ##### GHOSTSCRIPT SOURCES  
   
 Source0:        http://downloads.ghostscript.com/public/ghostscript-%{gsversion}%{gsextraversion}.tar.bz2  
 Source2:        ps2pdfpress.bz2  
 Source3:        http://www.linuxprinting.org/download/printing/sipixa6.upp.bz2  
   
 ##### GHOSTSCRIPT PATCHES  
 Patch3: ghostscript-9.05-x11_shared.patch  
   
 # Fedora patches  
 Patch102: ghostscript-scripts.patch  
 Patch105: ghostscript-runlibfileifexists.patch  
 Patch107: ghostscript-pksmraw.patch  
   
   
 ##### LIBIJS PATCHES  
   
 # Fortunately none currently  
   
 ##### BUILD ROOT  
   
 BuildRoot:      %_tmppath/%name-%gsversion-%gsrelease-root  
   
 ##### PACKAGE DESCRIPTIONS  
   
 ##### GHOSTSCRIPT  
   
 %package dvipdf  
 Summary: PostScript/PDF interpreter and renderer (DVI-to-PDF converter)  
 Group:          Publishing  
 Requires:       ghostscript, coreutils  
 Requires:       dvips  
 Provides:       dvipdf = %{version}-%{release}  
90    
 %package common  
 Summary: PostScript/PDF interpreter and renderer (Common files)  
 Group:          Publishing  
 Requires:       urw-fonts >= 1.1, ghostscript-fonts  
   
 %package X  
 Summary: PostScript/PDF interpreter and renderer (Executable with GTK-based screen display)  
 Group:          Publishing  
 Requires:       ghostscript-common  
 Requires:       update-alternatives  
 # This one is buggy, so do not let it get automatically installed by  
 # the "Provides: ghostscript"  
 #Provides:      ghostscript = %{version}-%{release}  
   
 %if %withstaticgs  
 %package static  
 Summary: PostScript/PDF interpreter and renderer (Static executable)  
 Group:          Publishing  
91  Requires:       ghostscript-common  Requires:       ghostscript-common
92  Requires:       update-alternatives  Requires:       update-alternatives
93  Provides:       ghostscript = %{version}-%{release}  %if !%{GSx11SVGAmodule}
94  %endif  %rename ghostscript-module-X ghostscript-module-SVGALIB
   
 %if %{GSx11SVGAmodule}  
 %package module-X  
 Summary: PostScript/PDF interpreter and renderer (Additional support for X)  
 Group:          Publishing  
 Requires:       ghostscript-common  
 Conflicts:      ghostscript-X < 8.15  
 Obsoletes:      ghostscript-Both  
 Provides:       ghostscript-Both  
   
 %ifarch %ix86  
 %if %{withsvgalib}  
 %package module-SVGALIB  
 Summary: PostScript/PDF interpreter and renderer (Additional support for SVGALIB)  
 Group:          Publishing  
 Requires:       ghostscript, coreutils  
 Obsoletes:      ghostscript-SVGALIB, ghostscript-Both  
 Provides:       ghostscript-SVGALIB, ghostscript-Both  
 %endif  
 %endif  
95  %endif  %endif
96    
 %package -n %libgs  
 Summary: PostScript/PDF interpreter and renderer (GhostScript shared library)  
 Group: Publishing  
   
 %package -n %libgs_devel  
 Summary: Headers and links to compile against the "%{libgs}" library  
 Group: Development/C  
 Requires: %libgs = %version  
 Provides: libgs-devel  
   
 ##### IJS  
   
 %package -n %{libijs}  
 Version:        %{ijsver}  
 Release:        %{ijsrel}  
 Summary:        Dynamic library for the IJS printer driver plug-in interface  
 Group:          Publishing  
 URL:            http://www.linuxprinting.org/ijs/  
 Provides:       libijs = %{ijsver}-%{ijsrel}  
   
 %package -n %{libijs_devel}  
 Version:        %{ijsver}  
 Release:        %{ijsrel}  
 Summary:        Headers and links for compiling against the "%{libijs}" library  
 Group:          Development/C  
 URL:            http://www.linuxprinting.org/ijs/  
 Requires:       %{libijs} = %{ijsver} multiarch-utils  
 Provides:       libijs-devel = %{ijsver}-%{ijsrel}  
 Provides:       ijs-devel = %{ijsver}-%{ijsrel}  
   
 %package doc  
 Summary:        Documentation for GhostScript  
 Group:          Publishing  
   
 ##### DESCRIPTION TEXTS  
   
97  %description  %description
98  Ghostscript is a set of software tools that provide a PostScript(TM)  Ghostscript is a set of software tools that provide a PostScript(TM)
99  interpreter, a set of C procedures (the Ghostscript library, which  interpreter, a set of C procedures (the Ghostscript library, which
# Line 223  files to non-PostScript printers. Line 107  files to non-PostScript printers.
107  You should install ghostscript if you need to display PostScript or  You should install ghostscript if you need to display PostScript or
108  PDF files, or if you have a non-PostScript printer.  PDF files, or if you have a non-PostScript printer.
109    
110    %package dvipdf
111    Summary: PostScript/PDF interpreter and renderer (DVI-to-PDF converter)
112    Group:          Publishing
113    Requires:       ghostscript
114    Requires:       coreutils
115    Requires:       dvips
116    Provides:       dvipdf = %{version}-%{release}
117    
118  %description dvipdf  %description dvipdf
119  Tool to convert the DVI format of TeX into the PDF format. There are  Tool to convert the DVI format of TeX into the PDF format. There are
120  more such tools (for different quality levels) in the dvipdfm  more such tools (for different quality levels) in the dvipdfm
121  package. All these tools use dvips of TeX to convert the DVI file to  package. All these tools use dvips of TeX to convert the DVI file to
122  PostScript, then they use GhostScript to generate the PDF file.  PostScript, then they use GhostScript to generate the PDF file.
123    
124    %package common
125    Summary: PostScript/PDF interpreter and renderer (Common files)
126    Group:          Publishing
127    Requires:       urw-fonts >= 1.1
128    Requires:       ghostscript-fonts
129    
130  %description common  %description common
131  Ghostscript is a PostScript/PDF interpreter. It can render both  Ghostscript is a PostScript/PDF interpreter. It can render both
132  PostScript and PDF files to devices which include X window, many  PostScript and PDF files to devices which include X window, many
# Line 236  printer formats, and popular graphics fi Line 134  printer formats, and popular graphics fi
134    
135  This package contains the common data files needed by GhostScript.  This package contains the common data files needed by GhostScript.
136    
137    %package X
138    Summary: PostScript/PDF interpreter and renderer (with X11 screen display)
139    Group:          Publishing
140    Requires:       ghostscript-common
141    Requires:       update-alternatives
142    
143  %description X  %description X
144  Ghostscript is a PostScript/PDF interpreter. It can render both  Ghostscript is a PostScript/PDF interpreter. It can render both
145  PostScript and PDF files to devices which include X window, many  PostScript and PDF files to devices which include X window, many
# Line 246  display support ("display" device, defau Line 150  display support ("display" device, defau
150  simply entering "gs <file>" on the command line). It makes use of the  simply entering "gs <file>" on the command line). It makes use of the
151  GhostScript shared library.  GhostScript shared library.
152    
 %if %withstaticgs  
 %description static  
 Ghostscript is a PostScript/PDF interpreter. It can render both  
 PostScript and PDF files to devices which include X window, many  
 printer formats, and popular graphics file formats.  
   
 This package contains a GhostScript executable which does not need the  
 GhostScript shared library. To get simple X display support, the  
 ghostscript-module-X package must be installed in addition.  
 %endif  
   
153  %if %{GSx11SVGAmodule}  %if %{GSx11SVGAmodule}
154    %package module-X
155    Summary: PostScript/PDF interpreter and renderer (Additional support for X)
156    Group:          Publishing
157    Requires:       ghostscript-common
158    
159  %description module-X  %description module-X
160  Ghostscript is a PostScript/PDF interpreter. It can render both  Ghostscript is a PostScript/PDF interpreter. It can render both
161  PostScript and PDF files to devices which include X window, many  PostScript and PDF files to devices which include X window, many
162  printer formats, and popular graphics file formats.  printer formats, and popular graphics file formats.
163    
164  This package enhances Ghostscript with X window support  This package enhances Ghostscript with X window support
   
 %ifarch %ix86  
 %if %{withsvgalib}  
 %description module-SVGALIB  
 Ghostscript is a PostScript/PDF interpreter. It can render both  
 PostScript and PDF files to devices which include X window, many  
 printer formats, and popular graphics file formats.  
   
 This package enhances Ghostscript with console output using SVGALIB.  
 %endif  
 %endif  
165  %endif  %endif
166    
167    %package -n %libgs
168    Summary: PostScript/PDF interpreter and renderer (GhostScript shared library)
169    Group: Publishing
170    
171  %description -n %libgs  %description -n %libgs
172  This is the API library for programs which use the PostScript and/or  This is the API library for programs which use the PostScript and/or
173  PDF interpreters of GhostScript.  PDF interpreters of GhostScript.
174    
175  %description -n %libgs-devel  %package -n %libgs_devel
176    Summary: Headers and links to compile against the "%{libgs}" library
177    Group: Development/C
178    Requires: %libgs >= %{gsver}
179    Provides: %{name}-devel = %{gsver}
180    Provides: libgs-devel = %{gsver}
181    Obsoletes: %{_lib}gs9-devel < %{gsver}
182    Obsoletes: %{_lib}gs8-devel < %{gsver}
183    
184    %description -n %libgs_devel
185  This package contains the static library and the header files needed  This package contains the static library and the header files needed
186  to compile applications using the GhostScript shared library.  to compile applications using the GhostScript shared library.
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  %description -n %{libijs}  %description -n %{libijs}
197  This is the API library for programs using the IJS printer driver  This is the API library for programs using the IJS printer driver
198  plug-in interface. Printer drivers using this interface can be added  plug-in interface. Printer drivers using this interface can be added
# Line 292  to GhostScript (6.53 or newer) without n Line 200  to GhostScript (6.53 or newer) without n
200  GhostScript. Application programs providing an IJS interface can make  GhostScript. Application programs providing an IJS interface can make
201  use of IJS printer drivers directly, without needing GhostScript.  use of IJS printer drivers directly, without needing GhostScript.
202    
203    %package -n %{libijs_devel}
204    Version:        %{ijsver}
205    Release:        %{ijsrel}
206    Summary:        Headers and links for compiling against the "%{libijs}" library
207    Group:          Development/C
208    URL:            http://www.linuxprinting.org/ijs/
209    Requires:       %{libijs} >= %{ijsver}
210    Requires:       multiarch-utils
211    Provides:       libijs-devel = %{ijsver}-%{ijsrel}
212    Provides:       ijs-devel = %{ijsver}-%{ijsrel}
213    Obsoletes:      %{_lib}ijs1-devel < %{ijsver}-%{ijsrel}
214    
215  %description -n %{libijs_devel}  %description -n %{libijs_devel}
216  This package contains the static library and the header files needed  This package contains the static library and the header files needed
217  to compile applications using the IJS library.  to compile applications using the IJS library.
218    
219    %package doc
220    Summary:        Documentation for GhostScript
221    Group:          Publishing
222    
223  %description doc  %description doc
224  This package contains documentation for GhostScript.  This package contains documentation for GhostScript.
225    
226  %prep  %prep
 ##### GHOSTSCRIPT  
227  %setup -q  %setup -q
228    %apply_patches
229    # Don't ship backup files
230    find . -name "*.*~" |xargs rm -f
231    
232  # prevent building and using bundled libs  # prevent building and using bundled libs
233  rm -rf jasper jbig2dec libpng jpeg tiff  rm -rf jasper jbig2dec libpng jpeg tiff expat zlib lcms freetype
 # rm -rf lcms <- don't work due to internal changes in the bundled lcms code  
 # rm -rf freetype <- don't work for unknown reasons  
 # rm -rf zlib <- don't work for unknown reasons  
   
 %patch3 -p0 -b .shared  
   
 # Fedora patches  
 # Fix some shell scripts  
 %patch102 -p1 -b .scripts  
   
 # Define .runlibfileifexists.  
 %patch105 -p1  
   
 # Fix pksmraw output (RH bug #308211).  Still needed in 8.63.  
 %patch107 -p1 -b .pksmraw  
   
234    
235  # Convert manual pages to UTF-8  # Convert manual pages to UTF-8
236  from8859_1() {  from8859_1() {
237          iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_"          iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_"
238          mv "${1}_" "$1"          mv "${1}_" "$1"
239  }  }
240  for i in man/de/*.1; do from8859_1 "$i"; done  for i in man/de/*.1; do from8859_1 "$i"; done
241    
   
242  # Stuff for shared library support to ghostscript.  # Stuff for shared library support to ghostscript.
243  %if %{GSx11SVGAmodule}  %if %{GSx11SVGAmodule}
   
244  # build a small README describing the features available.  # build a small README describing the features available.
245  cat <<EOF >README.shared.%{_vendor}  cat <<EOF >README.shared.%{_vendor}
246  This version of ghostscript support shared modules dynamically loaded  This version of ghostscript support shared modules dynamically loaded
# Line 346  ghostscript-module-??? packages. Line 254  ghostscript-module-??? packages.
254  There is no configuration needed, just can add (or remove) the package  There is no configuration needed, just can add (or remove) the package
255  to add (or remove) the devices concerned in ghostscript.  to add (or remove) the devices concerned in ghostscript.
256  EOF  EOF
   
257  %endif  %endif
258    
259  # ps2pdfpress  # ps2pdfpress
# Line 365  export CXXFLAGS="`echo %optflags |sed -e Line 272  export CXXFLAGS="`echo %optflags |sed -e
272  export RPM_OPT_FLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`"  export RPM_OPT_FLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`"
273  %endif  %endif
274    
275  ##### IJS  pushd ijs*
   
 cd ijs*  
276  # Rebuild broken build infrastructure  # Rebuild broken build infrastructure
277  # Needed by patch4.  # Needed by patch4.
278  ./autogen.sh  ./autogen.sh
# Line 375  cd ijs* Line 280  cd ijs*
280  %ifarch %{ix86}  %ifarch %{ix86}
281          --disable-sse2 \          --disable-sse2 \
282  %endif  %endif
283          --enable-shared      --enable-shared \
284  %make      --disable-static
 cd ..  
285    
286  ##### GHOSTSCRIPT  %make
287    popd
288    
289  # We have a Subversion version, so we must re-generate "configure"  # We have a Subversion version, so we must re-generate "configure"
290  ./autogen.sh  ./autogen.sh
# Line 387  cd .. Line 292  cd ..
292  %configure2_5x \  %configure2_5x \
293          --enable-dynamic \          --enable-dynamic \
294  %if !%{bootstrap}  %if !%{bootstrap}
295          --enable-fontconfig \      --enable-fontconfig \
296  %endif  %endif
297  %ifarch %{ix86}  %ifarch %{ix86}
298          --disable-sse2 \      --disable-sse2 \
299  %endif  %endif
300          --with-drivers=ALL,opvp \      --with-drivers=ALL,opvp \
301          --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" \      --with-fontpath="/usr/share/fonts/default/ghostscript:/usr/share/fonts/default/type1:/usr/share/ghostscript/fonts:/usr/share/ghostscript/%{gsver}/Resource:/usr/share/ghostscript/Resource:/usr/share/ghostscript/CIDFont:/usr/share/fonts/ttf:/usr/share/fonts/type1:/usr/share/fonts/default/Type1" \
302          --with-ijs \      --with-ijs \
303          --with-omni \      --with-omni \
304          --with-x --with-system-libtiff      --with-x \
305        --disable-compile-inits \
306        --with-system-libtiff \
307        --with-install-cups
308    
309  # Drivers which do not compile:  # Drivers which do not compile:
310  # Needs newsiop/lbp.h: nwp533  # Needs newsiop/lbp.h: nwp533
311  # Needs sys/ioccom.h: sparc  # Needs sys/ioccom.h: sparc
312  # Needs unbdev/lpviio.h: sparc  # Needs unbdev/lpviio.h: sparc
313    
314  # Set documentation dir  # Set documentation dir
315  perl -p -i -e 's|^(docdir=).*$|$1\$\(datadir\)/doc/%{name}-doc-%{gsversion}|' Makefile  perl -p -i -e 's|^(docdir=).*$|$1\$\(datadir\)/doc/%{name}-doc-%{gsver}|' Makefile
316    
317  # Fix references to X11 libraries  # Fix references to X11 libraries
318  perl -p -i -e "s|(/usr/X11R6)/lib\b|\1/%{_lib}|g" Makefile base/*.mak  perl -p -i -e "s|(/usr/X11R6)/lib\b|\1/%{_lib}|g" Makefile base/*.mak
# Line 416  perl -p -i -e "s:ghostscript/Resource/fo Line 324  perl -p -i -e "s:ghostscript/Resource/fo
324  # Do not use "-ansi" in gcc calls  # Do not use "-ansi" in gcc calls
325  perl -p -i -e "s:-ansi::g" Makefile  perl -p -i -e "s:-ansi::g" Makefile
326    
327    # bork
328    perl -p -i -e "s|^EXTRALIBS=|EXTRALIBS=-L/%{_lib} -lz |g" Makefile
329    
330  # The RPM macro for make is not used here, as parallelization of the build  # The RPM macro for make is not used here, as parallelization of the build
331  # process does not work.  # process does not work.
332  %if %withstaticgs  %if %{GSx11SVGAmodule}
333  make  #make soobj/X11.so BUILDPREFIX=so
 %else  
 %if %GSx11SVGAmodule  
 make soobj/X11.so BUILDDIRPREFIX=so  
334  make obj/X11.so  make obj/X11.so
335  %endif  %endif
 %endif  
336  make so  make so
337  #make pcl3opts  #make pcl3opts
338    make cups
339    
340  %install  %install
341  rm -rf %{buildroot}  rm -rf %{buildroot}
# Line 452  install -d %{buildroot}%{_datadir}/cups/ Line 360  install -d %{buildroot}%{_datadir}/cups/
360  install -d %{buildroot}%{_sysconfdir}/cups  install -d %{buildroot}%{_sysconfdir}/cups
361  %endif  %endif
362    
363  ##### IJS  pushd ijs*
364  cd ijs*  %configure2_5x \
365  %configure2_5x --enable-shared --prefix=%buildroot%{_prefix} --libdir=%buildroot%{_libdir}          --enable-shared \
366            --prefix=%{buildroot}%{_prefix} \
367            --libdir=%{buildroot}%{_libdir}
368    
369  # Work around bug in "configure" script  # Work around bug in "configure" script
370  perl -p -i -e 's/\@OBJEXT\@/o/g' Makefile  perl -p -i -e 's/\@OBJEXT\@/o/g' Makefile
371  perl -p -i -e 's/\@EXEEXT\@//g' Makefile  perl -p -i -e 's/\@EXEEXT\@//g' Makefile
372  %makeinstall  %makeinstall
373  # Fix prefixes in scripts  # Fix prefixes in scripts
374  perl -p -i -e "s:%buildroot::g" %buildroot%{_bindir}/ijs-config  perl -p -i -e "s:%{buildroot}::g" %{buildroot}%{_bindir}/ijs-config
375  perl -p -i -e "s:%buildroot::g" %buildroot%{_libdir}/pkgconfig/ijs.pc  perl -p -i -e "s:%{buildroot}::g" %{buildroot}%{_libdir}/pkgconfig/ijs.pc
376  cd ..  popd
377    
378  ##### GHOSTSCRIPT  ##### GHOSTSCRIPT
379  mkdir -p %{buildroot}%{_docdir}/ghostscript-doc-%{gsversion}  mkdir -p %{buildroot}%{_docdir}/ghostscript-doc-%{gsver}
380    
 %if %withstaticgs  
 make \  
         prefix=%{buildroot}/usr \  
         DESTDIR=%{buildroot} \  
         gssharedir=%{buildroot}%{_libdir}/ghostscript/%{gsversion} \  
         docdir=%{_docdir}/ghostscript-doc-%{gsversion} \  
         bindir=%{buildroot}%{_bindir} \  
         mandir=%{buildroot}%{_mandir} \  
         install  
 %else  
381  %if !%{bootstrap}  %if !%{bootstrap}
382  make \  make \
383          prefix=%{_prefix} \          prefix=%{_prefix} \
384          DESTDIR=%{buildroot} \          DESTDIR=%{buildroot} \
385          gssharedir=%{_libdir}/ghostscript/%{gsversion} \          gssharedir=%{_libdir}/ghostscript/%{gsver} \
386          docdir=%{_docdir}/ghostscript-doc-%{gsversion} \          docdir=%{_docdir}/ghostscript-doc-%{gsver} \
387          bindir=%{_bindir} \          bindir=%{_bindir} \
388          mandir=%{_mandir} \          mandir=%{_mandir} \
389          install-cups          install-cups
390  %endif  %endif
391    
 %if %GSx11SVGAmodule  
 make \  
         prefix=%{_prefix} \  
         DESTDIR=%{buildroot} \  
         gssharedir=%{_libdir}/ghostscript/%{gsversion} \  
         docdir=%{_docdir}/ghostscript-doc-%{gsversion} \  
         bindir=%{_bindir} \  
         mandir=%{_mandir} \  
         install-shared  
 %endif  
 %endif  
   
 %if 0  
392  make \  make \
393          prefix=%{_prefix} \          prefix=%{_prefix} \
394          DESTDIR=%{buildroot} \          DESTDIR=%{buildroot} \
395          gssharedir=%{_libdir}/ghostscript/%{gsversion} \          gssharedir=%{_libdir}/ghostscript/%{gsver} \
396          docdir=%{_docdir}/ghostscript-doc-%{gsversion} \          docdir=%{_docdir}/ghostscript-doc-%{gsver} \
397          bindir=%{_bindir} \          bindir=%{_bindir} \
398            libdir=%{_libdir} \
399          mandir=%{_mandir} \          mandir=%{_mandir} \
400          man1dir=%{_mandir}/man1 \          soinstall
         pcl3-install  
 %endif  
401    
402    %if %{GSx11SVGAmodule}
403  make \  make \
404          prefix=%{_prefix} \          prefix=%{_prefix} \
405          DESTDIR=%{buildroot} \          DESTDIR=%{buildroot} \
406          gssharedir=%{_libdir}/ghostscript/%{gsversion} \          gssharedir=%{_libdir}/ghostscript/%{gsver} \
407          docdir=%{_docdir}/ghostscript-doc-%{gsversion} \          docdir=%{_docdir}/ghostscript-doc-%{gsver} \
408          bindir=%{_bindir} \          bindir=%{_bindir} \
409          libdir=%{_libdir} \          libdir=%{_libdir} \
410          mandir=%{_mandir} \          mandir=%{_mandir} \
411          soinstall          install-shared
   
 ln -sf gs.1.bz2 %{buildroot}%{_mandir}/man1/ghostscript.1.bz2  
   
 %if %withstaticgs  
 mv %{buildroot}%{_bindir}/gs %{buildroot}%{_bindir}/gs-static  
412  %endif  %endif
413    
414    ln -sf gs.1%{_extension} %{buildroot}%{_mandir}/man1/ghostscript.1%{_extension}
415    
416  # ps2pdfpress  # ps2pdfpress
417  install -m 755 ps2pdfpress %{buildroot}%{_bindir}  install -m 755 ps2pdfpress %{buildroot}%{_bindir}
418    
419  # UPP file for SiPix Pocket Printer A6  # UPP file for SiPix Pocket Printer A6
420  install -m 644 sipixa6.upp %{buildroot}%{_datadir}/ghostscript/%{gsversion}/lib/  #mkdir -p %{buildroot}%{_datadir}/ghostscript/%{gsver}/lib
421    install -m 644 sipixa6.upp %{buildroot}%{_datadir}/ghostscript/%{gsver}/lib/
 %if %{withcupsfilters}  
 %if 0  
 # "pstoraster" wrapper script to make GhostScript being used as the  
 # cups-internal RIP  
 install -d %{buildroot}%{_libdir}/cups/filter  
 install -m 755 pstoraster/pstoraster %{buildroot}%{_libdir}/cups/filter  
 install -m 755 pstoraster/pstopxl %{buildroot}%{_libdir}/cups/filter  
 install -d %{buildroot}%{_datadir}/cups/model  
 install -m 755 pstoraster/*.ppd %{buildroot}%{_datadir}/cups/model  
 install -d %{buildroot}%{_sysconfdir}/cups  
 install -m 644 pstoraster/pstoraster.convs %{buildroot}%{_sysconfdir}/cups  
 %endif  
 %endif  
422    
423  ##### GENERAL STUFF  # why?
424    mv %{buildroot}%{_datadir}/cups/mime/gstoraster.convs %{buildroot}%{_sysconfdir}/cups/gstoraster.convs
425    
426  # Correct permissions for all documentation files  # Correct permissions for all documentation files
427  chmod -R a+rX %{buildroot}%{_docdir}  chmod -R a+rX %{buildroot}%{_docdir}
428  chmod -R go-w %{buildroot}%{_docdir}  chmod -R go-w %{buildroot}%{_docdir}
429  chmod -R u+w %{buildroot}%{_docdir}  chmod -R u+w %{buildroot}%{_docdir}
430    
431  ##### FILES  # remove libtool archive
432    rm -f %{buildroot}%{_libdir}/libijs.la
433    
434    %post
435    # Set up update-alternatives entries
436    %{_sbindir}/update-alternatives --install %{_bindir}/gs gs %{_bindir}/gsc 200
437    
438    %post X
439    # Set up update-alternatives entries
440    %{_sbindir}/update-alternatives --install %{_bindir}/gs gs %{_bindir}/gsx 100
441    
442    %post common
443    # Initialize japanese fonts
444    if test -f /usr/share/fonts/ttf/japanese/cidinst; then
445        sh /usr/share/fonts/ttf/japanese/cidinst
446    fi
447    
448    %preun
449    if [ "$1" = 0 ]; then
450      # Remove update-alternatives entry
451      %{_sbindir}/update-alternatives --remove gs %{_bindir}/gsc
452    fi
453    
454    %preun X
455    if [ "$1" = 0 ]; then
456      # Remove update-alternatives entry
457      %{_sbindir}/update-alternatives --remove gs %{_bindir}/gsx
458    fi
459    
460  %files  %files
461  %{_bindir}/gsc  %{_bindir}/gsc
# Line 563  chmod -R u+w %{buildroot}%{_docdir} Line 463  chmod -R u+w %{buildroot}%{_docdir}
463  %files X  %files X
464  %{_bindir}/gsx  %{_bindir}/gsx
465    
 %if %withstaticgs  
 %files static  
 %{_bindir}/gs-static  
 %endif  
   
466  %files common  %files common
467  %dir %{_datadir}/ghostscript  %dir %{_datadir}/ghostscript
468  %{_datadir}/ghostscript/%{gsversion}  %{_datadir}/ghostscript/%{gsver}
 #%{_datadir}/ghostscript/Resource  
 #%{_datadir}/ghostscript/CIDFont  
469  %{_mandir}/man1/*  %{_mandir}/man1/*
470  %lang(de) %{_mandir}/de/man1/*  %lang(de) %{_mandir}/de/man1/*
471  #%{_bindir}/[a-c]*  #%{_bindir}/[a-c]*
# Line 591  chmod -R u+w %{buildroot}%{_docdir} Line 484  chmod -R u+w %{buildroot}%{_docdir}
484  %endif  %endif
485    
486  %files doc  %files doc
487  %doc %{_docdir}/ghostscript-doc-%{gsversion}  %doc %{_docdir}/ghostscript-doc-%{gsver}
488    
489  %files dvipdf  %files dvipdf
490  %{_bindir}/dvipdf  %{_bindir}/dvipdf
# Line 599  chmod -R u+w %{buildroot}%{_docdir} Line 492  chmod -R u+w %{buildroot}%{_docdir}
492  %if %{GSx11SVGAmodule}  %if %{GSx11SVGAmodule}
493  %files module-X  %files module-X
494  %doc README.shared.%{_vendor}  %doc README.shared.%{_vendor}
495  %dir %{_libdir}/ghostscript/%{gsversion}  %dir %{_libdir}/ghostscript/%{gsver}
496  %{_libdir}/ghostscript/%{gsversion}/X11.so  %{_libdir}/ghostscript/%{gsver}/X11.so
   
 %ifarch %ix86  
 %if %{withsvgalib}  
 %files module-SVGALIB  
 %doc README.shared.%{_vendor}  
 %dir %{_libdir}/ghostscript/%{gsversion}  
 %{_libdir}/ghostscript/%{gsversion}/lvga256.so  
 %{_libdir}/ghostscript/%{gsversion}/vgalib.so  
 %endif  
 %endif  
497  %endif  %endif
498    
499  %files -n %{libgs}  %files -n %{libgs}
500  %{_libdir}/libgs.so.*%{gsmajor}*  %{_libdir}/libgs.so.*%{gsmajor}*
501    
502  %files -n %{libgs_devel}  %files -n %{libgs_devel}
   
503  %{_libdir}/libgs.so  %{_libdir}/libgs.so
504  %{_includedir}/ghostscript  %{_includedir}/ghostscript
505    
# Line 626  chmod -R u+w %{buildroot}%{_docdir} Line 508  chmod -R u+w %{buildroot}%{_docdir}
508    
509  %files -n %{libijs_devel}  %files -n %{libijs_devel}
510  %doc ijs/README  %doc ijs/README
 %{_libdir}/libijs.a  
 %{_libdir}/libijs.la  
511  %{_libdir}/libijs.so  %{_libdir}/libijs.so
512  %{_libdir}/pkgconfig/ijs.pc  %{_libdir}/pkgconfig/ijs.pc
513  %{_includedir}/ijs  %{_includedir}/ijs
# Line 635  chmod -R u+w %{buildroot}%{_docdir} Line 515  chmod -R u+w %{buildroot}%{_docdir}
515  %{_bindir}/ijs_server_example  %{_bindir}/ijs_server_example
516  %{_bindir}/ijs-config  %{_bindir}/ijs-config
517    
   
 ##### PRE/POSTINSTALL SCRIPTS  
   
 %post  
 # Set up update-alternatives entries  
 %{_sbindir}/update-alternatives --install %{_bindir}/gs gs %{_bindir}/gsc 200  
   
 %post X  
 # Set up update-alternatives entries  
 %{_sbindir}/update-alternatives --install %{_bindir}/gs gs %{_bindir}/gsx 100  
   
 %if %withstaticgs  
 %post static  
 # Set up update-alternatives entries  
 %{_sbindir}/update-alternatives --install %{_bindir}/gs gs %{_bindir}/gs-static 10  
 %endif  
   
 %post common  
 # Initialize japanese fonts  
 if test -f /usr/share/fonts/ttf/japanese/cidinst; then  
     sh /usr/share/fonts/ttf/japanese/cidinst  
 fi  
   
 %preun  
 if [ "$1" = 0 ]; then  
   # Remove update-alternatives entry  
   %{_sbindir}/update-alternatives --remove gs %{_bindir}/gsc  
 fi  
   
 %preun X  
 if [ "$1" = 0 ]; then  
   # Remove update-alternatives entry  
   %{_sbindir}/update-alternatives --remove gs %{_bindir}/gsx  
 fi  
   
 %if %withstaticgs  
 %preun static  
 if [ "$1" = 0 ]; then  
   # Remove update-alternatives entry  
   %{_sbindir}/update-alternatives --remove gs %{_bindir}/gs-static  
 fi  
 %endif  
   
 %clean  
 rm -rf %{buildroot}  

Legend:
Removed from v.282290  
changed lines
  Added in v.289699

  ViewVC Help
Powered by ViewVC 1.1.30