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