1 Summary: OpenPrinting CUPS filters and backends
5 # For a breakdown of the licensing, see COPYING file
6 # GPLv2: filters: commandto*, imagetoraster, pdftops, rasterto*,
7 # imagetopdf, pstopdf, texttopdf
8 # backends: parallel, serial
9 # GPLv2+: filters: gstopxl, textonly, texttops, imagetops
10 # GPLv3: filters: bannertopdf
11 # GPLv3+: filters: urftopdf
12 # LGPLv2+: utils: cups-browsed
13 # MIT: filters: gstoraster, pdftoijs, pdftoopvp, pdftopdf, pdftoraster
14 License: GPLv2 and GPLv2+ and GPLv3 and GPLv3+ and LGPLv2+ and MIT
15 Group: Applications/Printing
16 Source0: http://www.openprinting.org/download/cups-filters/%{name}-%{version}.tar.xz
17 # Source0-md5: fe5a9a07b9a64b35975154068cbedef9
18 Patch1: %{name}-pdf-landscape.patch
19 Patch2: %{name}-dbus.patch
20 URL: http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups-filters
21 BuildRequires: autoconf
22 BuildRequires: automake
23 BuildRequires: avahi-devel
24 BuildRequires: avahi-glib-devel
25 BuildRequires: cups-devel >= 1:1.6.0
26 BuildRequires: dbus-devel
27 BuildRequires: fontconfig-devel
28 BuildRequires: freetype-devel
29 BuildRequires: ghostscript-ijs-devel
30 BuildRequires: lcms2-devel
31 BuildRequires: libjpeg-devel
32 BuildRequires: libpng-devel
33 BuildRequires: libtiff-devel
34 BuildRequires: libtool
35 BuildRequires: pkgconfig
36 BuildRequires: poppler-cpp-devel
37 BuildRequires: poppler-devel
38 BuildRequires: poppler-progs
39 BuildRequires: python-pycups
40 BuildRequires: rpmbuild(macros) >= 1.671
41 BuildRequires: qpdf-devel
42 BuildRequires: systemd
43 BuildRequires: zlib-devel
44 # Testing font for test scripts.
45 #BuildRequires: dejavu-sans-fonts
46 Requires: cups-filters-libs = %{version}-%{release}
47 Requires: poppler-progs
52 Provides: ghostscript-cups = 9.08
53 Obsoletes: ghostscript-cups < 9.08
54 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56 %define _cups_serverbin %(/usr/bin/cups-config --serverbin)
59 Summary: OpenPrinting CUPS filters and backends - cupsfilters and fontembed libraries
61 # LGPLv2: libcupsfilters
63 License: LGPLv2 and MIT
66 Summary: OpenPrinting CUPS filters and backends - development environment
67 License: LGPLv2 and MIT
68 Group: Development/Libraries
69 Requires: cups-filters-libs = %{version}-%{release}
72 Contains backends, filters, and other software that was once part of
73 the core CUPS distribution but is no longer maintained by Apple Inc.
74 In addition it contains additional filters developed independently of
75 Apple, especially filters for the PDF-centric printing workflow
76 introduced by OpenPrinting.
79 This package provides cupsfilters and fontembed libraries.
82 This is the development package for OpenPrinting CUPS filters and
85 %package -n cups-browsed
86 Summary: A daemon for browsing the Bonjour broadcasts of shared, remote CUPS printers
87 Group: Applications/Printing
88 Requires(post,preun,postun): systemd-units
89 Requires: cups-filters-libs = %{version}-%{release}
90 Requires: systemd-units >= 38
92 %description -n cups-browsed
93 A daemon for browsing the Bonjour broadcasts of shared,
96 %package -n cups-backend-serial
97 Summary: Serial port backend for CUPS
98 Summary(pl.UTF-8): Backend obsługujący porty szeregowe dla CUPS-a
99 # must be larger than cups.spec
101 License: GPL v2 + openssl exception
102 Group: Applications/Printing
103 Requires: %{name} = %{version}-%{release}
105 %description -n cups-backend-serial
106 This package allow CUPS printing on printers connected by serial
109 %description -n cups-backend-serial -l pl.UTF-8
110 Ten pakiet umożliwia drukowanie z poziomu CUPS-a na drukarkach
111 podłączonych do portów szeregowych.
113 %package -n cups-backend-parallel
114 Summary: Parallel port backend for CUPS
115 Summary(pl.UTF-8): Backend obsługujący porty równoległe dla CUPS-a
116 # must be larger than cups.spec
118 License: GPL v2 + openssl exception
119 Group: Applications/Printing
120 Requires: %{name} = %{version}-%{release}
122 %description -n cups-backend-parallel
123 This package allow CUPS printing on printers connected by parallel
126 %description -n cups-backend-parallel -l pl.UTF-8
127 Ten pakiet umożliwia drukowanie z poziomu CUPS-a na drukarkach
128 podłączonych do portów równoległych.
130 # CREATE ANY NEW PACKAGES BEFORE cups-backend-* (EPOCH)
144 --disable-silent-rules \
145 --with-pdftops=hybrid \
152 rm -rf $RPM_BUILD_ROOT
153 install -d $RPM_BUILD_ROOT%{systemdunitdir}
156 DESTDIR=$RPM_BUILD_ROOT
158 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
160 # Not sure what is this good for.
161 %{__rm} $RPM_BUILD_ROOT%{_bindir}/ttfread
163 install -p utils/cups-browsed.service $RPM_BUILD_ROOT%{systemdunitdir}
166 rm -rf $RPM_BUILD_ROOT
168 %post -n cups-browsed
169 if [ $1 -eq 1 ] ; then
170 # We can remove this after few releases, it's just for the introduction of cups-browsed.
171 if [ -f %{_sysconfdir}/cups/cups-browsed.conf ]; then
172 echo -e "\n# NOTE: This file is not part of CUPS. You need to start & enable cups-browsed service." >>%{_sysconfdir}/cups/cups-browsed.conf
175 # move BrowsePoll from cupsd.conf to cups-browsed.conf
176 if [ -f %{_sysconfdir}/cups/cupsd.conf ] && grep -iq "^BrowsePoll" %{_sysconfdir}/cups/cupsd.conf; then
177 if ! grep -iq "^BrowsePoll" %{_sysconfdir}/cups/cups-browsed.conf; then
178 echo "# Settings automatically moved from cupsd.conf by RPM package:" >>%{_sysconfdir}/cups/cups-browsed.conf
179 grep -i "^BrowsePoll" %{_sysconfdir}/cups/cupsd.conf >> %{_sysconfdir}/cups/cups-browsed.conf || :
181 sed -i -e "s,^BrowsePoll,#BrowsePoll directive moved to cups-browsed.conf\n#BrowsePoll,i" %{_sysconfdir}/cups/cupsd.conf || :
184 %systemd_post cups-browsed.service
186 %preun -n cups-browsed
187 %systemd_preun cups-browsed.service
189 %postun -n cups-browsed
192 %post libs -p /sbin/ldconfig
193 %postun libs -p /sbin/ldconfig
196 %defattr(644,root,root,755)
197 %doc README AUTHORS NEWS
198 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fonts/conf.d/99pdftoopvp.conf
199 %attr(755,root,root) %{_cups_serverbin}/filter/*
200 %{_datadir}/cups/banners
201 %{_datadir}/cups/charsets
202 %{_datadir}/cups/data/*.pdf
203 # this needs to be in the main package because of cupsfilters.drv
204 %{_datadir}/cups/ppdc/pcl.h
205 %{_datadir}/cups/drv/cupsfilters.drv
206 %{_datadir}/cups/mime/cupsfilters.types
207 %{_datadir}/cups/mime/cupsfilters.convs
208 %{_datadir}/ppd/cupsfilters
211 %defattr(644,root,root,755)
212 %doc fontembed/README
213 %attr(755,root,root) %{_libdir}/libcupsfilters.so.*.*.*
214 %attr(755,root,root) %ghost %{_libdir}/libcupsfilters.so.1
215 %attr(755,root,root) %{_libdir}/libfontembed.so.*.*.*
216 %attr(755,root,root) %ghost %{_libdir}/libfontembed.so.1
219 %defattr(644,root,root,755)
220 %{_includedir}/cupsfilters
221 %{_includedir}/fontembed
222 %{_datadir}/cups/ppdc/escp.h
223 %{_pkgconfigdir}/libcupsfilters.pc
224 %{_pkgconfigdir}/libfontembed.pc
225 %attr(755,root,root) %{_libdir}/libcupsfilters.so
226 %attr(755,root,root) %{_libdir}/libfontembed.so
228 %files -n cups-browsed
229 %defattr(644,root,root,755)
230 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cups/cups-browsed.conf
231 %attr(755,root,root) %{_sbindir}/cups-browsed
232 %{systemdunitdir}/cups-browsed.service
233 %{_mandir}/man8/cups-browsed.8*
234 %{_mandir}/man5/cups-browsed.conf.5*
236 %files -n cups-backend-serial
237 %defattr(644,root,root,755)
238 %attr(755,root,root) %{_cups_serverbin}/backend/serial
240 %files -n cups-backend-parallel
241 %defattr(644,root,root,755)
242 %attr(755,root,root) %{_cups_serverbin}/backend/parallel