1 | #define svn_url e:/trees/cups-filter/trunk
|
---|
2 | %define svn_url http://svn.netlabs.org/repos/ports/cups-filter/trunk
|
---|
3 | %define svn_rev 1370
|
---|
4 |
|
---|
5 | Summary: OpenPrinting CUPS filters and backends
|
---|
6 | Name: cups-filters
|
---|
7 | Version: 1.8.2
|
---|
8 | Release: 1%{?dist}
|
---|
9 |
|
---|
10 | # For a breakdown of the licensing, see COPYING file
|
---|
11 | # GPLv2: filters: commandto*, imagetoraster, pdftops, rasterto*,
|
---|
12 | # imagetopdf, pstopdf, texttopdf
|
---|
13 | # backends: parallel, serial
|
---|
14 | # GPLv2+: filters: gstopxl, textonly, texttops, imagetops, foomatic-rip
|
---|
15 | # GPLv3: filters: bannertopdf
|
---|
16 | # GPLv3+: filters: urftopdf, rastertopdf
|
---|
17 | # LGPLv2+: utils: cups-browsed
|
---|
18 | # MIT: filters: gstoraster, pdftoijs, pdftoopvp, pdftopdf, pdftoraster
|
---|
19 | License: GPLv2 and GPLv2+ and GPLv3 and GPLv3+ and LGPLv2+ and MIT
|
---|
20 |
|
---|
21 | Url: http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups-filters
|
---|
22 | Vendor: bww bitwise works GmbH
|
---|
23 | Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
|
---|
24 |
|
---|
25 | Requires: cups-filters-libs = %{version}-%{release}
|
---|
26 |
|
---|
27 | # Obsolete cups-php (bug #971741)
|
---|
28 | Obsoletes: cups-php < 1:1.6.0-1
|
---|
29 | # Don't Provide it because we don't build the php module
|
---|
30 | #Provides: cups-php = 1:1.6.0-1
|
---|
31 |
|
---|
32 | BuildRequires: cups-devel
|
---|
33 | BuildRequires: pkgconfig
|
---|
34 | # pdftopdf
|
---|
35 | BuildRequires: qpdf-devel
|
---|
36 | # pdftops
|
---|
37 | BuildRequires: poppler-utils >= 0.38.0-2
|
---|
38 | # pdftoijs, pdftoopvp, pdftoraster, gstoraster
|
---|
39 | BuildRequires: poppler-devel
|
---|
40 | BuildRequires: poppler-cpp-devel
|
---|
41 | BuildRequires: libjpeg-devel
|
---|
42 | BuildRequires: libtiff-devel
|
---|
43 | BuildRequires: libpng-devel
|
---|
44 | BuildRequires: zlib
|
---|
45 | #BuildRequires: pkgconfig(dbus-1)
|
---|
46 | # libijs
|
---|
47 | BuildRequires: ghostscript-devel
|
---|
48 | BuildRequires: freetype-devel
|
---|
49 | BuildRequires: fontconfig-devel
|
---|
50 | BuildRequires: lcms2-devel
|
---|
51 | # cups-browsed
|
---|
52 | #BuildRequires: avahi-devel
|
---|
53 | #BuildRequires: pkgconfig(avahi-glib)
|
---|
54 | BuildRequires: glib2-devel
|
---|
55 | #BuildRequires: systemd
|
---|
56 |
|
---|
57 | # Make sure we get postscriptdriver tags.
|
---|
58 | #BuildRequires: python-cups
|
---|
59 |
|
---|
60 | # Testing font for test scripts.
|
---|
61 | #BuildRequires: dejavu-sans-fonts
|
---|
62 |
|
---|
63 | # autogen.sh
|
---|
64 | BuildRequires: autoconf
|
---|
65 | BuildRequires: automake
|
---|
66 | BuildRequires: libtool
|
---|
67 |
|
---|
68 | Requires: cups-filesystem
|
---|
69 | Requires: poppler-utils >= 0.38.0-2
|
---|
70 | Requires: ghostscript >= 9.18
|
---|
71 |
|
---|
72 | # texttopdf
|
---|
73 | Requires: liberation-mono-fonts
|
---|
74 |
|
---|
75 | # pstopdf
|
---|
76 | Requires: bc grep sed
|
---|
77 |
|
---|
78 | # cups-browsed
|
---|
79 | #Requires(post): systemd
|
---|
80 | #Requires(preun): systemd
|
---|
81 | #Requires(postun): systemd
|
---|
82 |
|
---|
83 | # Ghostscript CUPS filters live here since Ghostscript 9.08.
|
---|
84 | Provides: ghostscript-cups = 9.08
|
---|
85 | Obsoletes: ghostscript-cups < 9.08
|
---|
86 |
|
---|
87 | # foomatic-rip's upstream moved from foomatic-filters to cups-filters-1.0.42
|
---|
88 | Provides: foomatic-filters = 4.0.9-8
|
---|
89 | Obsoletes: foomatic-filters < 4.0.9-8
|
---|
90 |
|
---|
91 | %package libs
|
---|
92 | Summary: OpenPrinting CUPS filters and backends - cupsfilters and fontembed libraries
|
---|
93 | Group: System Environment/Libraries
|
---|
94 | # LGPLv2: libcupsfilters
|
---|
95 | # MIT: libfontembed
|
---|
96 | License: LGPLv2 and MIT
|
---|
97 |
|
---|
98 | %package devel
|
---|
99 | Summary: OpenPrinting CUPS filters and backends - development environment
|
---|
100 | Group: Development/Libraries
|
---|
101 | License: LGPLv2 and MIT
|
---|
102 | Requires: cups-filters-libs = %{version}-%{release}
|
---|
103 |
|
---|
104 | %description
|
---|
105 | Contains backends, filters, and other software that was
|
---|
106 | once part of the core CUPS distribution but is no longer maintained by
|
---|
107 | Apple Inc. In addition it contains additional filters developed
|
---|
108 | independently of Apple, especially filters for the PDF-centric printing
|
---|
109 | workflow introduced by OpenPrinting.
|
---|
110 |
|
---|
111 | %description libs
|
---|
112 | This package provides cupsfilters and fontembed libraries.
|
---|
113 |
|
---|
114 | %description devel
|
---|
115 | This is the development package for OpenPrinting CUPS filters and backends.
|
---|
116 |
|
---|
117 | %debug_package
|
---|
118 |
|
---|
119 | %prep
|
---|
120 | %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
|
---|
121 | %setup -q
|
---|
122 | %else
|
---|
123 | %setup -n "%{name}-%{version}" -Tc
|
---|
124 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
---|
125 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
|
---|
126 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
|
---|
127 | %endif
|
---|
128 |
|
---|
129 | %build
|
---|
130 | # work-around Rpath
|
---|
131 | ./autogen.sh
|
---|
132 |
|
---|
133 | # --with-pdftops=pdftops - use Poppler's pdftops instead of Ghostscript
|
---|
134 | # --with-rcdir=no - don't install SysV init script
|
---|
135 | export LDFLAGS=" -Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
---|
136 | %configure --disable-static \
|
---|
137 | --disable-silent-rules \
|
---|
138 | --with-pdftops=pdftops \
|
---|
139 | --with-rcdir=no \
|
---|
140 | --enable-dbus=no \
|
---|
141 | --with-test-font-path=/@system_drive/psfonts/DejaVuSans.ttf
|
---|
142 |
|
---|
143 | make %{?_smp_mflags}
|
---|
144 |
|
---|
145 | %install
|
---|
146 | make install DESTDIR=%{buildroot}
|
---|
147 |
|
---|
148 | # Don't ship libtool la files.
|
---|
149 | rm -f %{buildroot}%{_libdir}/lib*.la
|
---|
150 |
|
---|
151 | # Not sure what is this good for.
|
---|
152 | rm -f %{buildroot}%{_bindir}/ttfread.exe
|
---|
153 |
|
---|
154 | rm -f %{buildroot}%{_defaultdocdir}/cups-filters/INSTALL
|
---|
155 | mkdir -p %{buildroot}%{_defaultdocdir}/cups-filters/fontembed/
|
---|
156 | cp -p fontembed/README %{buildroot}%{_defaultdocdir}/cups-filters/fontembed/
|
---|
157 |
|
---|
158 | # systemd unit file
|
---|
159 | #mkdir -p %{buildroot}%{_unitdir}
|
---|
160 | #install -p -m 644 utils/cups-browsed.service %{buildroot}%{_unitdir}
|
---|
161 |
|
---|
162 | # LSB3.2 requires /usr/bin/foomatic-rip,
|
---|
163 | # create it temporarily as a relative symlink
|
---|
164 | ln -sf ../lib/cups/filter/foomatic-rip %{buildroot}%{_bindir}/foomatic-rip
|
---|
165 |
|
---|
166 | # Don't ship urftopdf for now (bug #1002947).
|
---|
167 | rm -f %{buildroot}%{_cups_serverbin}/filter/urftopdf.exe
|
---|
168 | sed -i '/urftopdf/d' %{buildroot}%{_datadir}/cups/mime/cupsfilters.convs
|
---|
169 |
|
---|
170 | # Don't ship pdftoopvp for now (bug #1027557).
|
---|
171 | rm -f %{buildroot}%{_cups_serverbin}/filter/pdftoopvp.exe
|
---|
172 | rm -f %{buildroot}%{_sysconfdir}/fonts/conf.d/99pdftoopvp.conf
|
---|
173 |
|
---|
174 |
|
---|
175 | %check
|
---|
176 | # this export is needed, as else the dll for the tests are not found
|
---|
177 | export BEGINLIBPATH=%{_builddir}/%{buildsubdir}/.libs
|
---|
178 | make check
|
---|
179 |
|
---|
180 |
|
---|
181 | %post
|
---|
182 | #systemd_post cups-browsed.service
|
---|
183 |
|
---|
184 | # Initial installation
|
---|
185 | if [ $1 -eq 1 ] ; then
|
---|
186 | IN=%{_sysconfdir}/cups/cupsd.conf
|
---|
187 | OUT=%{_sysconfdir}/cups/cups-browsed.conf
|
---|
188 | keyword=BrowsePoll
|
---|
189 |
|
---|
190 | # We can remove this after few releases, it's just for the introduction of cups-browsed.
|
---|
191 | if [ -f "$OUT" ]; then
|
---|
192 | echo -e "\n# NOTE: This file is not part of CUPS.\n# You need to enable cups-browsed service\n# and allow ipp-client service in firewall." >> "$OUT"
|
---|
193 | fi
|
---|
194 |
|
---|
195 | # move BrowsePoll from cupsd.conf to cups-browsed.conf
|
---|
196 | if [ -f "$IN" ] && grep -iq ^$keyword "$IN"; then
|
---|
197 | if ! grep -iq ^$keyword "$OUT"; then
|
---|
198 | (cat >> "$OUT" <<EOF
|
---|
199 |
|
---|
200 | # Settings automatically moved from cupsd.conf by RPM package:
|
---|
201 | EOF
|
---|
202 | ) || :
|
---|
203 | (grep -i ^$keyword "$IN" >> "$OUT") || :
|
---|
204 | #systemctl enable cups-browsed.service >/dev/null 2>&1 || :
|
---|
205 | fi
|
---|
206 | sed -i -e "s,^$keyword,#$keyword directive moved to cups-browsed.conf\n#$keyword,i" "$IN" || :
|
---|
207 | fi
|
---|
208 | fi
|
---|
209 |
|
---|
210 | %preun
|
---|
211 | #systemd_preun cups-browsed.service
|
---|
212 |
|
---|
213 | %postun
|
---|
214 | #systemd_postun_with_restart cups-browsed.service
|
---|
215 |
|
---|
216 | #post libs -p /sbin/ldconfig
|
---|
217 |
|
---|
218 | #postun libs -p /sbin/ldconfig
|
---|
219 |
|
---|
220 |
|
---|
221 | %files
|
---|
222 | %{_defaultdocdir}/cups-filters/README
|
---|
223 | %{_defaultdocdir}/cups-filters/AUTHORS
|
---|
224 | %{_defaultdocdir}/cups-filters/NEWS
|
---|
225 | %config(noreplace) %{_sysconfdir}/cups/cups-browsed.conf
|
---|
226 | %attr(0755,root,root) %{_cups_serverbin}/filter/*.exe
|
---|
227 | %attr(0755,root,root) %{_cups_serverbin}/filter/brftoembosser
|
---|
228 | %attr(0755,root,root) %{_cups_serverbin}/filter/gstopxl
|
---|
229 | %attr(0755,root,root) %{_cups_serverbin}/filter/imagetobrf
|
---|
230 | %attr(0755,root,root) %{_cups_serverbin}/filter/imagetops
|
---|
231 | %attr(0755,root,root) %{_cups_serverbin}/filter/imagetoubrl
|
---|
232 | %attr(0755,root,root) %{_cups_serverbin}/filter/imageubrltoindexv3
|
---|
233 | %attr(0755,root,root) %{_cups_serverbin}/filter/imageubrltoindexv4
|
---|
234 | %attr(0755,root,root) %{_cups_serverbin}/filter/pstopdf
|
---|
235 | %attr(0755,root,root) %{_cups_serverbin}/filter/textbrftoindexv3
|
---|
236 | %attr(0755,root,root) %{_cups_serverbin}/filter/textbrftoindexv4
|
---|
237 | %attr(0755,root,root) %{_cups_serverbin}/filter/textonly
|
---|
238 | %attr(0755,root,root) %{_cups_serverbin}/filter/texttobrf
|
---|
239 | %attr(0755,root,root) %{_cups_serverbin}/filter/texttops
|
---|
240 | %attr(0755,root,root) %{_cups_serverbin}/backend/parallel.exe
|
---|
241 | # Serial backend needs to run as root (bug #212577#c4).
|
---|
242 | #attr(0700,root,root) %{_cups_serverbin}/backend/serial
|
---|
243 | %attr(0755,root,root) %{_cups_serverbin}/backend/implicitclass.exe
|
---|
244 | %attr(0755,root,root) %{_cups_serverbin}/backend/beh.exe
|
---|
245 | %{_datadir}/cups/banners
|
---|
246 | %{_datadir}/cups/braille
|
---|
247 | %{_datadir}/cups/charsets
|
---|
248 | %{_datadir}/cups/data/*
|
---|
249 | # this needs to be in the main package because of cupsfilters.drv
|
---|
250 | %{_datadir}/cups/ppdc/pcl.h
|
---|
251 | %{_datadir}/cups/ppdc/braille.defs
|
---|
252 | %{_datadir}/cups/ppdc/fr-braille.po
|
---|
253 | %{_datadir}/cups/ppdc/imagemagick.defs
|
---|
254 | %{_datadir}/cups/ppdc/index.defs
|
---|
255 | %{_datadir}/cups/ppdc/liblouis.defs
|
---|
256 | %{_datadir}/cups/ppdc/liblouis1.defs
|
---|
257 | %{_datadir}/cups/ppdc/liblouis2.defs
|
---|
258 | %{_datadir}/cups/ppdc/liblouis3.defs
|
---|
259 | %{_datadir}/cups/ppdc/liblouis4.defs
|
---|
260 | %{_datadir}/cups/ppdc/media-braille.defs
|
---|
261 | %{_datadir}/cups/drv/cupsfilters.drv
|
---|
262 | %{_datadir}/cups/drv/generic-brf.drv
|
---|
263 | %{_datadir}/cups/drv/indexv3.drv
|
---|
264 | %{_datadir}/cups/drv/indexv4.drv
|
---|
265 | %{_datadir}/cups/mime/cupsfilters.types
|
---|
266 | %{_datadir}/cups/mime/cupsfilters.convs
|
---|
267 | %{_datadir}/cups/mime/braille.convs
|
---|
268 | %{_datadir}/cups/mime/braille.types
|
---|
269 | %{_datadir}/ppd/cupsfilters
|
---|
270 | #{_sbindir}/cups-browsed.exe
|
---|
271 | #{_unitdir}/cups-browsed.service
|
---|
272 | %{_mandir}/man8/cups-browsed.8
|
---|
273 | %{_mandir}/man5/cups-browsed.conf.5
|
---|
274 | %{_mandir}/man1/foomatic-rip.1
|
---|
275 | %{_bindir}/foomatic-rip
|
---|
276 |
|
---|
277 | %files libs
|
---|
278 | %dir %{_defaultdocdir}/cups-filters/
|
---|
279 | %{_defaultdocdir}/cups-filters/COPYING
|
---|
280 | %{_defaultdocdir}/cups-filters/fontembed/README
|
---|
281 | %{_libdir}/cupsfil*.dll
|
---|
282 | %{_libdir}/fontemb*.dll
|
---|
283 |
|
---|
284 | %files devel
|
---|
285 | %{_includedir}/cupsfilters
|
---|
286 | %{_includedir}/fontembed
|
---|
287 | %{_datadir}/cups/ppdc/escp.h
|
---|
288 | %{_libdir}/pkgconfig/libcupsfilters.pc
|
---|
289 | %{_libdir}/pkgconfig/libfontembed.pc
|
---|
290 | %{_libdir}/cupsfilters*.a
|
---|
291 | %{_libdir}/fontembed*.a
|
---|
292 |
|
---|
293 | %changelog
|
---|
294 | * Mon Mar 14 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 1.8.2-1
|
---|
295 | - first version
|
---|