]> git.pld-linux.org Git - packages/cups-filters.git/blob - cups-filters.spec
- release 2 (by relup.sh)
[packages/cups-filters.git] / cups-filters.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static libraries
4 %bcond_without  perl            # Perl module
5 %bcond_without  php             # PHP extension
6 #
7 Summary:        OpenPrinting CUPS filters and backends
8 Summary(pl.UTF-8):      Filtry i backendy CUPS-a z projektu OpenPrinting
9 Name:           cups-filters
10 Version:        1.0.53
11 Release:        2
12 # For a breakdown of the licensing, see COPYING file
13 # GPLv2:   filters: commandto*, imagetoraster, pdftops, rasterto*,
14 #                   imagetopdf, pstopdf, texttopdf
15 #         backends: parallel, serial
16 # GPLv2+:  filters: gstopxl, textonly, texttops, imagetops
17 # GPLv3:   filters: bannertopdf
18 # GPLv3+:  filters: urftopdf
19 # LGPLv2+:   utils: cups-browsed
20 # MIT:     filters: gstoraster, pdftoijs, pdftoopvp, pdftopdf, pdftoraster
21 License:        GPL v2, GPL v2+, GPL v3, GPL v3+, LGPL v2+, MIT
22 Group:          Applications/Printing
23 Source0:        http://www.openprinting.org/download/cups-filters/%{name}-%{version}.tar.xz
24 # Source0-md5:  85c605f82cddfd9990a17f1ffaf51eec
25 Patch0:         %{name}-dbus.patch
26 Patch1:         %{name}-php.patch
27 URL:            http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups-filters
28 BuildRequires:  autoconf >= 2.65
29 BuildRequires:  automake >= 1:1.11
30 BuildRequires:  avahi-devel
31 BuildRequires:  avahi-glib-devel
32 BuildRequires:  cups-devel >= 1:1.6.0
33 BuildRequires:  dbus-devel
34 BuildRequires:  fontconfig-devel >= 2.0.0
35 BuildRequires:  freetype-devel >= 2
36 # /usr/bin/gs, for features detection
37 BuildRequires:  ghostscript
38 BuildRequires:  ghostscript-ijs-devel
39 BuildRequires:  glib2-devel >= 1:2.30.2
40 BuildRequires:  lcms2-devel >= 2
41 BuildRequires:  libjpeg-devel
42 BuildRequires:  libpng-devel
43 BuildRequires:  libstdc++-devel
44 BuildRequires:  libtiff-devel
45 BuildRequires:  libtool
46 %{?with_perl:BuildRequires:     perl-devel}
47 %{?with_php:BuildRequires:      php-devel >= 5}
48 BuildRequires:  pkgconfig >= 1:0.20
49 # just for cpp/poppler-version.h
50 BuildRequires:  poppler-cpp-devel >= 0.18
51 BuildRequires:  poppler-devel >= 0.18
52 # /usr/bin/pdftops, for features detection
53 BuildRequires:  poppler-progs >= 0.18
54 BuildRequires:  rpmbuild(macros) >= 1.671
55 BuildRequires:  qpdf-devel >= 3.0.2
56 BuildRequires:  zlib-devel
57 # DejaVuSans.ttf (testing font for test scripts)
58 #BuildRequires: fonts-TTF-DejaVu
59 Requires:       %{name}-libs = %{version}-%{release}
60 Requires:       cups >= 1:1.6.0
61 Requires:       fontconfig >= 2.0.0
62 Suggests:       fonts-TTF-freefont
63 Requires:       ghostscript
64 Requires:       poppler-progs >= 0.18
65 Requires:       qpdf-libs >= 3.0.2
66 # pstopdf
67 Requires:       bc
68 Requires:       grep
69 Requires:       sed
70 Provides:       cups-filter-foomatic
71 Provides:       ghostscript-cups = 9.08
72 Obsoletes:      cups-filter-foomatic
73 Obsoletes:      foomatic-filters
74 Obsoletes:      ghostscript-cups < 9.08
75 Conflicts:      cups-backend-hp < 3.13.11-2
76 Conflicts:      hplip-ppd < 3.13.11-2
77 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
78
79 %define         _cups_serverbin         %(/usr/bin/cups-config --serverbin)
80
81 %description
82 Contains backends, filters, and other software that was once part of
83 the core CUPS distribution but is no longer maintained by Apple Inc.
84 In addition it contains additional filters developed independently of
85 Apple, especially filters for the PDF-centric printing workflow
86 introduced by OpenPrinting.
87
88 %description -l pl.UTF-8
89 Ten pakiet zawiera backendy, filtry i inne oprogramowanie, będące
90 kiedyś częścią CUPS-a, ale nie utrzymywane już przez firmę Apple Inc.
91 Dodatkowo pakiet zawiera dodatkowe filtry stworzone niezależnie od
92 Apple'a, w szczególności filtry dla PDF-ocentrycznego obiegu
93 drukowania wprowadzonego przez OpenPrinting.
94
95 %package libs
96 Summary:        OpenPrinting CUPS filters and backends - cupsfilters and fontembed libraries
97 Summary(pl.UTF-8):      Filtry i backendy CUPS-a z projektu OpenPrinting - biblioteki cupsfilters i fontembed
98 # LGPLv2: libcupsfilters
99 # MIT:    libfontembed
100 License:        LGPL v2, MIT
101 Group:          Libraries
102 Requires:       cups-lib >= 1:1.6.0
103
104 %description libs
105 This package provides cupsfilters and fontembed libraries.
106
107 %description libs -l pl.UTF-8
108 Ten pakiet udostępnia biblioteki cupsfilters i fontembed.
109
110 %package devel
111 Summary:        OpenPrinting CUPS filters and backends - development environment
112 Summary(pl.UTF-8):      Filtry i backendy CUPS-a z projektu OpenPrinting - środowisko programistyczne
113 License:        LGPL v2, MIT
114 Group:          Development/Libraries
115 Requires:       %{name}-libs = %{version}-%{release}
116 Requires:       cups-devel >= 1:1.6.0
117 Requires:       libjpeg-devel
118 Requires:       libpng-devel
119 Requires:       libtiff-devel
120
121 %description devel
122 This is the development package for OpenPrinting CUPS filters and
123 backends.
124
125 %description devel -l pl.UTF-8
126 To jest pakiet programistyczny dla filtrów i backendów CUPS-a z
127 projektu OpenPrinting.
128
129 %package static
130 Summary:        OpenPrinting CUPS filters and backends - static cupsfilters and fontembed libraries
131 Summary(pl.UTF-8):      Filtry i backendy CUPS-a z projektu OpenPrinting - statyczne biblioteki cupsfilters i fontembed
132 License:        LGPL v2, MIT
133 Group:          Development/Libraries
134 Requires:       %{name}-devel = %{version}-%{release}
135
136 %description static
137 This package provides static cupsfilters and fontembed libraries.
138
139 %description static -l pl.UTF-8
140 Ten pakiet udostępnia statyczne biblioteki cupsfilters i fontembed.
141
142 %package -n cups-browsed
143 Summary:        A daemon for browsing the Bonjour broadcasts of shared, remote CUPS printers
144 Summary(pl.UTF-8):      Demon do przeglądania broadcastów Bonjour współdzielonych, zdalnych drukarek CUPS
145 Group:          Applications/Printing
146 Requires(post,preun):   /sbin/chkconfig
147 Requires(post,preun,postun):    systemd-units
148 Requires:       glib2 >= 1:2.30.2
149 Requires:       systemd-units >= 38
150
151 %description -n cups-browsed
152 A daemon for browsing the Bonjour broadcasts of shared,
153 remote CUPS printers.
154
155 %description -n cups-browsed -l pl.UTF-8
156 Demon do przeglądania broadcastów Bonjour współdzielonych, zdalnych
157 drukarek CUPS.
158
159 %package -n cups-backend-parallel
160 Summary:        Parallel port backend for CUPS
161 Summary(pl.UTF-8):      Backend CUPS-a obsługujący porty równoległe
162 # must be larger than cups.spec before 1.6.0
163 Epoch:          2
164 License:        GPL v2 + OpenSSL exception
165 Group:          Applications/Printing
166 Requires:       cups >= 1:1.6.0
167
168 %description -n cups-backend-parallel
169 This package allow CUPS printing on printers connected by parallel
170 ports.
171
172 %description -n cups-backend-parallel -l pl.UTF-8
173 Ten pakiet umożliwia drukowanie z poziomu CUPS-a na drukarkach
174 podłączonych do portów równoległych.
175
176 %package -n cups-backend-serial
177 Summary:        Serial port backend for CUPS
178 Summary(pl.UTF-8):      Backend CUPS-a obsługujący porty szeregowe
179 # must be larger than cups.spec before 1.6.0
180 Epoch:          2
181 License:        GPL v2 + OpenSSL exception
182 Group:          Applications/Printing
183 Requires:       cups >= 1:1.6.0
184
185 %description -n cups-backend-serial
186 This package allow CUPS printing on printers connected by serial
187 ports.
188
189 %description -n cups-backend-serial -l pl.UTF-8
190 Ten pakiet umożliwia drukowanie z poziomu CUPS-a na drukarkach
191 podłączonych do portów szeregowych.
192
193 %package -n perl-cups
194 Summary:        Perl module for CUPS
195 Summary(pl.UTF-8):      Moduł Perla CUPS
196 # must be larger than cups.spec before 1.6.0
197 Epoch:          2
198 License:        GPL v2 + OpenSSL exception
199 Group:          Development/Languages/Perl
200 Requires:       cups-lib >= 1:1.6.0
201
202 %description -n perl-cups
203 Perl module for Common Unix Printing System.
204
205 %description -n perl-cups -l pl.UTF-8
206 Moduł Perla do ogólnego systemu druku dla Uniksa.
207
208 %package -n php-cups
209 Summary:        PHP module for CUPS
210 Summary(pl.UTF-8):      Moduł PHP CUPS
211 # must be larger than cups.spec before 1.6.0
212 Epoch:          2
213 License:        GPL v2 + OpenSSL exception
214 Group:          Development/Languages/PHP
215 Requires:       cups-lib >= 1:1.6.0
216 %{?requires_php_extension}
217 Requires:       /etc/php/conf.d
218 Requires:       php(core) >= 5.0.0
219
220 %description -n php-cups
221 PHP module for Common Unix Printing System.
222
223 %description -n php-cups -l pl.UTF-8
224 Moduł PHP do ogólnego systemu druku dla Uniksa.
225
226 # CREATE ANY NEW PACKAGES BEFORE cups-backend-* (EPOCH)
227
228 %prep
229 %setup -q
230 %patch0 -p1
231 %patch1 -p1
232
233 %build
234 %{__aclocal}
235 %{__autoconf}
236 %{__automake}
237
238 %configure \
239         --enable-dbus \
240         --disable-silent-rules \
241         %{!?with_static_libs:--disable-static} \
242         %{?with_php:--with-php} \
243         --with-pdftops=hybrid \
244         --with-rcdir=/etc/rc.d/init.d \
245         --with-rclevels= \
246         --with-test-font-path=/usr/share/fonts/TTF/DejaVuSans.ttf
247
248 %{__make}
249
250 %if %{with perl}
251 cd scripting/perl
252 %{__perl} Makefile.PL \
253         INSTALLDIRS=vendor \
254         OPTIMIZE="%{rpmcflags}"
255
256 %{__make}
257 cd ../..
258 %endif
259
260 %install
261 rm -rf $RPM_BUILD_ROOT
262 install -d $RPM_BUILD_ROOT%{systemdunitdir}
263
264 %{__make} install \
265         DESTDIR=$RPM_BUILD_ROOT
266
267 %if %{with php}
268 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
269 cat > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/phpcups.ini << 'EOF'
270 ; Enable phpcups extension module
271 extension=libphpcups.so
272 EOF
273 %endif
274
275 %if %{with perl}
276 %{__make} -C scripting/perl install \
277         DESTDIR=$RPM_BUILD_ROOT
278 %endif
279
280 install -p utils/cups-browsed.service $RPM_BUILD_ROOT%{systemdunitdir}
281
282 # obsoleted by pkg-config
283 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
284 # dlopened module
285 %{__rm} $RPM_BUILD_ROOT%{_libdir}/php/libphpcups.la
286 # packaged as %doc
287 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/cups-filters
288 # Not sure what is this good for.
289 %{__rm} $RPM_BUILD_ROOT%{_bindir}/ttfread
290
291 %clean
292 rm -rf $RPM_BUILD_ROOT
293
294 %post   libs -p /sbin/ldconfig
295 %postun libs -p /sbin/ldconfig
296
297 %post -n cups-browsed
298 if [ $1 -eq 1 ] ; then
299         # We can remove this after few releases, it's just for the introduction of cups-browsed.
300         if [ -f %{_sysconfdir}/cups/cups-browsed.conf ]; then
301                 echo -e "\n# NOTE: This file is not part of CUPS. You need to start & enable cups-browsed service." >>%{_sysconfdir}/cups/cups-browsed.conf
302         fi
303
304         # move BrowsePoll from cupsd.conf to cups-browsed.conf
305         if [ -f %{_sysconfdir}/cups/cupsd.conf ] && grep -iq "^BrowsePoll" %{_sysconfdir}/cups/cupsd.conf; then
306                 if ! grep -iq "^BrowsePoll" %{_sysconfdir}/cups/cups-browsed.conf; then
307                         echo "# Settings automatically moved from cupsd.conf by RPM package:" >>%{_sysconfdir}/cups/cups-browsed.conf
308                         grep -i "^BrowsePoll" %{_sysconfdir}/cups/cupsd.conf >> %{_sysconfdir}/cups/cups-browsed.conf || :
309                 fi
310                 sed -i -e "s,^BrowsePoll,#BrowsePoll directive moved to cups-browsed.conf\n#BrowsePoll,i" %{_sysconfdir}/cups/cupsd.conf || :
311         fi
312 fi
313 /sbin/chkconfig --add cups-browsed
314 %service cups-browsed restart
315 %systemd_post cups-browsed.service
316
317 %preun -n cups-browsed
318 if [ "$1" = "0" ]; then
319         %service cups-browsed stop
320         /sbin/chkconfig --del cups-browsed
321 fi
322 %systemd_preun cups-browsed.service
323
324 %postun -n cups-browsed
325 %systemd_reload
326
327 %files
328 %defattr(644,root,root,755)
329 %doc AUTHORS COPYING NEWS README
330 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fonts/conf.d/99pdftoopvp.conf
331 %attr(755,root,root) %{_cups_serverbin}/filter/bannertopdf
332 %attr(755,root,root) %{_cups_serverbin}/filter/commandtoescpx
333 %attr(755,root,root) %{_cups_serverbin}/filter/commandtopclx
334 %attr(755,root,root) %{_cups_serverbin}/filter/foomatic-rip
335 %attr(755,root,root) %{_cups_serverbin}/filter/gstopxl
336 %attr(755,root,root) %{_cups_serverbin}/filter/gstoraster
337 %attr(755,root,root) %{_cups_serverbin}/filter/imagetopdf
338 %attr(755,root,root) %{_cups_serverbin}/filter/imagetops
339 %attr(755,root,root) %{_cups_serverbin}/filter/imagetoraster
340 %attr(755,root,root) %{_cups_serverbin}/filter/pdftoijs
341 %attr(755,root,root) %{_cups_serverbin}/filter/pdftoippprinter
342 %attr(755,root,root) %{_cups_serverbin}/filter/pdftoopvp
343 %attr(755,root,root) %{_cups_serverbin}/filter/pdftopdf
344 %attr(755,root,root) %{_cups_serverbin}/filter/pdftops
345 %attr(755,root,root) %{_cups_serverbin}/filter/pdftoraster
346 %attr(755,root,root) %{_cups_serverbin}/filter/pstopdf
347 %attr(755,root,root) %{_cups_serverbin}/filter/rastertoescpx
348 %attr(755,root,root) %{_cups_serverbin}/filter/rastertopclx
349 %attr(755,root,root) %{_cups_serverbin}/filter/textonly
350 %attr(755,root,root) %{_cups_serverbin}/filter/texttopdf
351 %attr(755,root,root) %{_cups_serverbin}/filter/texttops
352 %attr(755,root,root) %{_cups_serverbin}/filter/urftopdf
353 %{_datadir}/cups/banners
354 %{_datadir}/cups/charsets
355 %{_datadir}/cups/data/default.pdf
356 %{_datadir}/cups/data/default-testpage.pdf
357 %{_datadir}/cups/data/form_english.pdf
358 %{_datadir}/cups/data/form_english_in.odt
359 %{_datadir}/cups/data/form_russian.pdf
360 %{_datadir}/cups/data/form_russian_in.odt
361 %{_datadir}/cups/data/testprint
362 %{_datadir}/cups/drv/cupsfilters.drv
363 %{_datadir}/cups/mime/cupsfilters.types
364 %{_datadir}/cups/mime/cupsfilters.convs
365 # definitions for drivers; pcl.h is used by cupsfilters.drv
366 %{_datadir}/cups/ppdc/escp.h
367 %{_datadir}/cups/ppdc/pcl.h
368 %{_datadir}/ppd/cupsfilters
369 %{_mandir}/man1/foomatic-rip.1*
370
371 %files libs
372 %defattr(644,root,root,755)
373 %doc fontembed/README
374 %attr(755,root,root) %{_libdir}/libcupsfilters.so.*.*.*
375 %attr(755,root,root) %ghost %{_libdir}/libcupsfilters.so.1
376 %attr(755,root,root) %{_libdir}/libfontembed.so.*.*.*
377 %attr(755,root,root) %ghost %{_libdir}/libfontembed.so.1
378
379 %files devel
380 %defattr(644,root,root,755)
381 %attr(755,root,root) %{_libdir}/libcupsfilters.so
382 %attr(755,root,root) %{_libdir}/libfontembed.so
383 %{_includedir}/cupsfilters
384 %{_includedir}/fontembed
385 %{_pkgconfigdir}/libcupsfilters.pc
386 %{_pkgconfigdir}/libfontembed.pc
387
388 %files static
389 %defattr(644,root,root,755)
390 %{_libdir}/libcupsfilters.a
391 %{_libdir}/libfontembed.a
392
393 %files -n cups-browsed
394 %defattr(644,root,root,755)
395 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cups/cups-browsed.conf
396 %attr(755,root,root) %{_sbindir}/cups-browsed
397 %attr(754,root,root) /etc/rc.d/init.d/cups-browsed
398 %{systemdunitdir}/cups-browsed.service
399 %{_mandir}/man5/cups-browsed.conf.5*
400 %{_mandir}/man8/cups-browsed.8*
401
402 %files -n cups-backend-parallel
403 %defattr(644,root,root,755)
404 %attr(755,root,root) %{_cups_serverbin}/backend/parallel
405
406 %files -n cups-backend-serial
407 %defattr(644,root,root,755)
408 %attr(755,root,root) %{_cups_serverbin}/backend/serial
409
410 %if %{with perl}
411 %files -n perl-cups
412 %defattr(644,root,root,755)
413 %doc scripting/perl/README
414 %{perl_vendorarch}/CUPS.pm
415 %dir %{perl_vendorarch}/auto/CUPS
416 %{perl_vendorarch}/auto/CUPS/CUPS.bs
417 %{perl_vendorarch}/auto/CUPS/autosplit.ix
418 %attr(755,root,root) %{perl_vendorarch}/auto/CUPS/CUPS.so
419 %{_mandir}/man3/CUPS.3pm*
420 %endif
421
422 %if %{with php}
423 %files -n php-cups
424 %defattr(644,root,root,755)
425 %doc scripting/php/README
426 %attr(755,root,root) %{php_extensiondir}/libphpcups.so
427 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/phpcups.ini
428 %endif
This page took 0.084575 seconds and 3 git commands to generate.