]>
Commit | Line | Data |
---|---|---|
db128617 JB |
1 | # |
2 | # Conditional build: | |
18012a4d JB |
3 | %bcond_without system_expat # system expat |
4 | %bcond_without system_freetype # system freetype | |
5 | %bcond_without system_jbig2dec # system jbig2dec | |
6 | %bcond_with system_lcms2 # system lcms2 | |
7 | %bcond_with system_libjpeg # system libjpeg (incompatible with D_MAX_BLOCKS_IN_MCU=64 variant) | |
8 | %bcond_with system_libtiff # system libtiff (incompatible with modified libjpeg) | |
bc1c1057 | 9 | %bcond_without system_openjp2 # system openjpeg2 |
db128617 JB |
10 | # |
11 | Summary: PostScript, PDF and XPS interpreter and renderer | |
12 | Summary(pl.UTF-8): Interpreter i renderer PostScriptu, PDF oraz XPS | |
13 | Name: ghostpdl | |
bc1c1057 | 14 | Version: 9.54.0 |
838207cc | 15 | Release: 1 |
db128617 JB |
16 | License: AGPL v3+ |
17 | Group: Applications/Graphics | |
18 | #Source0Download: https://github.com/ArtifexSoftware/ghostpdl-downloads/releases | |
bc1c1057 JB |
19 | Source0: https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9540/%{name}-%{version}.tar.xz |
20 | # Source0-md5: 2169b5f45df556b975ffe4b45018ddb5 | |
db128617 JB |
21 | Patch0: %{name}-fonts_locations.patch |
22 | Patch1: %{name}-make.patch | |
23 | Patch2: %{name}-system-libs.patch | |
bc1c1057 | 24 | Patch3: %{name}-tiff.patch |
b0de3d30 | 25 | URL: https://ghostscript.com/ |
db128617 | 26 | BuildRequires: autoconf >= 2.63 |
c9d89138 | 27 | BuildRequires: cups-devel >= 1.5 |
b0de3d30 | 28 | %{?with_system_expat:BuildRequires: expat-devel >= 1:2.2.9} |
db128617 JB |
29 | BuildRequires: fontconfig-devel |
30 | BuildRequires: libidn-devel | |
bc1c1057 | 31 | %{?with_system_freetype:BuildRequires: freetype-devel >= 1:2.10.4} |
18012a4d JB |
32 | %{?with_system_jbig2dec:BuildRequires: jbig2dec-devel >= 0.19} |
33 | %{?with_system_lcms2:BuildRequires: lcms2-devel >= 2.10} | |
34 | %{?with_system_libjpeg:BuildRequires: libjpeg-devel >= 9c} | |
db128617 | 35 | BuildRequires: libpaper-devel |
b0de3d30 | 36 | BuildRequires: libpng-devel >= 2:1.6.37 |
bc1c1057 JB |
37 | %{?with_system_libtiff:BuildRequires: libtiff-devel >= 4.2.0} |
38 | %{?with_system_openjp2:BuildRequires: openjpeg2-devel >= 2.4.0} | |
db128617 JB |
39 | BuildRequires: tar >= 1:1.22 |
40 | BuildRequires: xorg-lib-libX11-devel | |
41 | BuildRequires: xorg-lib-libXext-devel | |
42 | BuildRequires: xorg-lib-libXt-devel | |
43 | BuildRequires: xz | |
c9d89138 | 44 | BuildRequires: zlib-devel >= 1.2.11 |
db128617 JB |
45 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
46 | ||
47 | %description | |
48 | GhostPCL is Artifex Software's implementation of the PCL-5(TM) and | |
49 | PCL-XL(TM) family of page description languages. For more information | |
50 | please see the documentation included with the source package. | |
51 | ||
52 | %description -l pl.UTF-8 | |
53 | GhostPCL jest implementacją języków z rodzin PCL-5(TM) i PCL-XL(TM) | |
54 | opisujących stronę. Więcej informacji znajduje się w dokumentacji | |
55 | załączonej do pakietu. | |
56 | ||
57 | %package -n ghostpcl | |
58 | Summary: PCL-5 and PCL-XL implementation | |
59 | Summary(pl.UTF-8): Implementacja PCL-5 oraz PCL-XL | |
60 | Group: Applications/Graphics | |
61 | URL: http://ghostscript.com/GhostPCL.html | |
c9d89138 | 62 | Requires: cups-lib >= 1.5 |
b0de3d30 | 63 | %{?with_system_expat:Requires: expat >= 1:2.2.9} |
bc1c1057 | 64 | %{?with_system_freetype:Requires: freetype >= 1:2.10.4} |
db128617 | 65 | Requires: ghostscript = %{version} |
18012a4d JB |
66 | %{?with_system_jbig2dec:Requires: jbig2dec >= 0.19} |
67 | %{?with_system_libjpeg:Requires: libjpeg >= 9c} | |
b0de3d30 | 68 | Requires: libpng >= 2:1.6.37 |
bc1c1057 JB |
69 | %{?with_system_libtiff:Requires: libtiff >= 4.2.0} |
70 | %{?with_system_openjp2:Requires: openjpeg2 >= 2.4.0} | |
c9d89138 | 71 | Requires: zlib >= 1.2.11 |
db128617 JB |
72 | Suggests: fonts-TTF-urw |
73 | Conflicts: ghostpcl < 9 | |
74 | ||
75 | %description -n ghostpcl | |
76 | GhostPCL is Artifex Software's implementation of the PCL-5 and PCL-XL | |
77 | family of page description languages. | |
78 | ||
79 | %description -n ghostpcl -l pl.UTF-8 | |
80 | GhostPCL to rozwijana przez Artifex Software implementacja rodzin | |
81 | języków opisu strony PCL-5 oraz PCL-XL. | |
82 | ||
83 | %package -n ghostxps | |
84 | Summary: XPS document format implementation based on Ghostscript | |
85 | Summary(pl.UTF-8): Implementacja formatu dokumentów XPS oparta na Ghostscripcie | |
86 | Group: Applications/Graphics | |
87 | URL: http://ghostscript.com/GhostXPS.html | |
c9d89138 | 88 | Requires: cups-lib >= 1.5 |
b0de3d30 | 89 | %{?with_system_expat:Requires: expat >= 1:2.2.9} |
bc1c1057 | 90 | %{?with_system_freetype:Requires: freetype >= 1:2.10.4} |
db128617 | 91 | Requires: ghostscript = %{version} |
18012a4d JB |
92 | %{?with_system_jbig2dec:Requires: jbig2dec >= 0.19} |
93 | %{?with_system_libjpeg:Requires: libjpeg >= 9c} | |
b0de3d30 | 94 | Requires: libpng >= 2:1.6.37 |
bc1c1057 JB |
95 | %{?with_system_libtiff:Requires: libtiff >= 4.2.0} |
96 | %{?with_system_openjp2:Requires: openjpeg2 >= 2.4.0} | |
c9d89138 | 97 | Requires: zlib >= 1.2.11 |
db128617 JB |
98 | |
99 | %description -n ghostxps | |
100 | GhostXPS is an implementation of the Microsoft XPS document format | |
101 | built on top of Ghostscript. | |
102 | ||
103 | %description -n ghostxps -l pl.UTF-8 | |
104 | GhostXPS to implementacja formatu dokumentu XPS Microsoftu zbudowana w | |
105 | oparciu o Ghostscript. | |
106 | ||
107 | %prep | |
108 | %setup -q | |
109 | %patch0 -p1 | |
110 | %patch1 -p1 | |
111 | %patch2 -p1 | |
bc1c1057 | 112 | %patch3 -p1 |
db128617 JB |
113 | |
114 | %build | |
115 | # use system libs: | |
b0de3d30 | 116 | # expat 2.2.9 |
c9d89138 | 117 | %{?with_system_expat:%{__rm} -r expat} |
bc1c1057 | 118 | # freetype 2.10.4 |
db128617 | 119 | %{?with_system_freetype:%{__rm} -r freetype} |
18012a4d | 120 | # jbig2dec 0.19 |
db128617 | 121 | %{?with_system_jbig2dec:%{__rm} -r jbig2dec} |
b0de3d30 | 122 | # (unmodified) libpng 1.6.37 and zlib 1.2.11 |
db128617 | 123 | %{__rm} -r libpng zlib |
c9d89138 | 124 | # (unmodified) libjpeg 9c is built with different configuration (D_MAX_BLOCKS_IN_MCU=64) |
18012a4d | 125 | %{?with_system_libjpeg:%{__rm} -r jpeg} |
bc1c1057 | 126 | # lcms2mt is thread safe version of lcms2 2.10 |
18012a4d | 127 | %{?with_system_lcms:%{__rm} -r lcms2mt} |
bc1c1057 JB |
128 | # leptonica 1.81.0-git (for tesseract), no switch to use system |
129 | # openjpeg 2.4.0 | |
130 | %{?with_system_openjp2:%{__rm} -r openjpeg} | |
131 | # tesseract 5.0.0-alpha, no switch to use system | |
132 | ||
db128617 JB |
133 | %{__autoconf} |
134 | %configure \ | |
18012a4d | 135 | %{?with_system_libtiff:--with-system-libtiff} |
db128617 JB |
136 | |
137 | %{__make} | |
138 | ||
139 | %install | |
140 | rm -rf $RPM_BUILD_ROOT | |
141 | ||
142 | %{__make} install \ | |
143 | DESTDIR=$RPM_BUILD_ROOT | |
144 | ||
145 | install pcl/tools/{pcl2pdf,pcl2pdfwr,plot2pdf.sh} $RPM_BUILD_ROOT%{_bindir} | |
146 | ln -sf gpcl6 $RPM_BUILD_ROOT%{_bindir}/pcl6 | |
147 | ||
148 | # packaged in ghostscript.spec | |
5d6bc093 JR |
149 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/{dvipdf,eps2eps,gs*,lprsetup.sh,pdf2*,pf2afm,pfbtopfa,pphs,printafm,ps2*,unix-lpr.sh} |
150 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{dvipdf,eps2eps,gs*,pdf2*,pf2afm,pfbtopfa,printafm,ps2*}.1 | |
151 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/de/man1/{dvipdf,eps2eps,gsnd,pdf2*,printafm,ps2*}.1 | |
db128617 | 152 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/ghostscript |
c9d89138 | 153 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/ghostscript |
db128617 JB |
154 | |
155 | %clean | |
156 | rm -rf $RPM_BUILD_ROOT | |
157 | ||
158 | %files -n ghostpcl | |
159 | %defattr(644,root,root,755) | |
160 | %doc doc/pclxps/ghostpdl.pdf pcl/{LICENSE,NEWS,README.txt} pcl/pcl/Anomalies.txt pcl/pxl/{pxcet,pxdiff,pxfts,pxlib,pxspec}.txt | |
161 | %attr(755,root,root) %{_bindir}/gpcl6 | |
162 | %attr(755,root,root) %{_bindir}/pcl2pdf | |
163 | %attr(755,root,root) %{_bindir}/pcl2pdfwr | |
164 | %attr(755,root,root) %{_bindir}/pcl6 | |
165 | %attr(755,root,root) %{_bindir}/plot2pdf.sh | |
166 | ||
167 | %files -n ghostxps | |
168 | %defattr(644,root,root,755) | |
169 | %doc doc/pclxps/ghostpdl.pdf xps/TODO | |
170 | %attr(755,root,root) %{_bindir}/gxps |