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: fonts-TTF-freefont
48 Requires: poppler-progs
53 Provides: ghostscript-cups = 9.08
54 Obsoletes: ghostscript-cups < 9.08
55 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57 %define _cups_serverbin %(/usr/bin/cups-config --serverbin)
60 Summary: OpenPrinting CUPS filters and backends - cupsfilters and fontembed libraries
62 # LGPLv2: libcupsfilters
64 License: LGPLv2 and MIT
67 Summary: OpenPrinting CUPS filters and backends - development environment
68 License: LGPLv2 and MIT
69 Group: Development/Libraries
70 Requires: cups-filters-libs = %{version}-%{release}
73 Contains backends, filters, and other software that was once part of
74 the core CUPS distribution but is no longer maintained by Apple Inc.
75 In addition it contains additional filters developed independently of
76 Apple, especially filters for the PDF-centric printing workflow
77 introduced by OpenPrinting.
80 This package provides cupsfilters and fontembed libraries.
83 This is the development package for OpenPrinting CUPS filters and
86 %package -n cups-browsed
87 Summary: A daemon for browsing the Bonjour broadcasts of shared, remote CUPS printers
88 Group: Applications/Printing
89 Requires(post,preun,postun): systemd-units
90 Requires: cups-filters-libs = %{version}-%{release}
91 Requires: systemd-units >= 38
93 %description -n cups-browsed
94 A daemon for browsing the Bonjour broadcasts of shared,
97 %package -n cups-backend-serial
98 Summary: Serial port backend for CUPS
99 Summary(pl.UTF-8): Backend obsługujący porty szeregowe dla CUPS-a
100 # must be larger than cups.spec
102 License: GPL v2 + openssl exception
103 Group: Applications/Printing
104 Requires: %{name} = %{version}-%{release}
106 %description -n cups-backend-serial
107 This package allow CUPS printing on printers connected by serial
110 %description -n cups-backend-serial -l pl.UTF-8
111 Ten pakiet umożliwia drukowanie z poziomu CUPS-a na drukarkach
112 podłączonych do portów szeregowych.
114 %package -n cups-backend-parallel
115 Summary: Parallel port backend for CUPS
116 Summary(pl.UTF-8): Backend obsługujący porty równoległe dla CUPS-a
117 # must be larger than cups.spec
119 License: GPL v2 + openssl exception
120 Group: Applications/Printing
121 Requires: %{name} = %{version}-%{release}
123 %description -n cups-backend-parallel
124 This package allow CUPS printing on printers connected by parallel
127 %description -n cups-backend-parallel -l pl.UTF-8
128 Ten pakiet umożliwia drukowanie z poziomu CUPS-a na drukarkach
129 podłączonych do portów równoległych.
131 # CREATE ANY NEW PACKAGES BEFORE cups-backend-* (EPOCH)
145 --disable-silent-rules \
146 --with-pdftops=hybrid \
153 rm -rf $RPM_BUILD_ROOT
154 install -d $RPM_BUILD_ROOT%{systemdunitdir}
157 DESTDIR=$RPM_BUILD_ROOT
159 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
161 # Not sure what is this good for.
162 %{__rm} $RPM_BUILD_ROOT%{_bindir}/ttfread
164 install -p utils/cups-browsed.service $RPM_BUILD_ROOT%{systemdunitdir}
167 rm -rf $RPM_BUILD_ROOT
169 %post -n cups-browsed
170 if [ $1 -eq 1 ] ; then
171 # We can remove this after few releases, it's just for the introduction of cups-browsed.
172 if [ -f %{_sysconfdir}/cups/cups-browsed.conf ]; then
173 echo -e "\n# NOTE: This file is not part of CUPS. You need to start & enable cups-browsed service." >>%{_sysconfdir}/cups/cups-browsed.conf
176 # move BrowsePoll from cupsd.conf to cups-browsed.conf
177 if [ -f %{_sysconfdir}/cups/cupsd.conf ] && grep -iq "^BrowsePoll" %{_sysconfdir}/cups/cupsd.conf; then
178 if ! grep -iq "^BrowsePoll" %{_sysconfdir}/cups/cups-browsed.conf; then
179 echo "# Settings automatically moved from cupsd.conf by RPM package:" >>%{_sysconfdir}/cups/cups-browsed.conf
180 grep -i "^BrowsePoll" %{_sysconfdir}/cups/cupsd.conf >> %{_sysconfdir}/cups/cups-browsed.conf || :
182 sed -i -e "s,^BrowsePoll,#BrowsePoll directive moved to cups-browsed.conf\n#BrowsePoll,i" %{_sysconfdir}/cups/cupsd.conf || :
185 %systemd_post cups-browsed.service
187 %preun -n cups-browsed
188 %systemd_preun cups-browsed.service
190 %postun -n cups-browsed
193 %post libs -p /sbin/ldconfig
194 %postun libs -p /sbin/ldconfig
197 %defattr(644,root,root,755)
198 %doc README AUTHORS NEWS
199 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fonts/conf.d/99pdftoopvp.conf
200 %attr(755,root,root) %{_cups_serverbin}/filter/*
201 %{_datadir}/cups/banners
202 %{_datadir}/cups/charsets
203 %{_datadir}/cups/data/*.pdf
204 %{_datadir}/cups/data/testprint
205 # this needs to be in the main package because of cupsfilters.drv
206 %{_datadir}/cups/ppdc/pcl.h
207 %{_datadir}/cups/drv/cupsfilters.drv
208 %{_datadir}/cups/mime/cupsfilters.types
209 %{_datadir}/cups/mime/cupsfilters.convs
210 %{_datadir}/ppd/cupsfilters
213 %defattr(644,root,root,755)
214 %doc fontembed/README
215 %attr(755,root,root) %{_libdir}/libcupsfilters.so.*.*.*
216 %attr(755,root,root) %ghost %{_libdir}/libcupsfilters.so.1
217 %attr(755,root,root) %{_libdir}/libfontembed.so.*.*.*
218 %attr(755,root,root) %ghost %{_libdir}/libfontembed.so.1
221 %defattr(644,root,root,755)
222 %{_includedir}/cupsfilters
223 %{_includedir}/fontembed
224 %{_datadir}/cups/ppdc/escp.h
225 %{_pkgconfigdir}/libcupsfilters.pc
226 %{_pkgconfigdir}/libfontembed.pc
227 %attr(755,root,root) %{_libdir}/libcupsfilters.so
228 %attr(755,root,root) %{_libdir}/libfontembed.so
230 %files -n cups-browsed
231 %defattr(644,root,root,755)
232 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cups/cups-browsed.conf
233 %attr(755,root,root) %{_sbindir}/cups-browsed
234 %{systemdunitdir}/cups-browsed.service
235 %{_mandir}/man8/cups-browsed.8*
236 %{_mandir}/man5/cups-browsed.conf.5*
238 %files -n cups-backend-serial
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_cups_serverbin}/backend/serial
242 %files -n cups-backend-parallel
243 %defattr(644,root,root,755)
244 %attr(755,root,root) %{_cups_serverbin}/backend/parallel