1 %define _cups_serverbin %(/usr/bin/cups-config --serverbin)
3 Summary: OpenPrinting CUPS filters and backends
7 # For a breakdown of the licensing, see COPYING file
8 # GPLv2: filters: commandto*, imagetoraster, pdftops, rasterto*,
9 # imagetopdf, pstopdf, texttopdf
10 # backends: parallel, serial
11 # GPLv2+: filters: gstopxl, textonly, texttops, imagetops
12 # GPLv3: filters: bannertopdf
13 # GPLv3+: filters: urftopdf
14 # LGPLv2+: utils: cups-browsed
15 # MIT: filters: gstoraster, pdftoijs, pdftoopvp, pdftopdf, pdftoraster
16 License: GPLv2 and GPLv2+ and GPLv3 and GPLv3+ and LGPLv2+ and MIT
17 Group: Applications/Printing
18 Source0: http://www.openprinting.org/download/cups-filters/%{name}-%{version}.tar.xz
19 # Source0-md5: fe5a9a07b9a64b35975154068cbedef9
20 Patch1: %{name}-pdf-landscape.patch
21 Patch2: %{name}-dbus.patch
22 URL: http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups-filters
23 BuildRequires: autoconf
24 BuildRequires: automake
25 BuildRequires: avahi-devel
26 BuildRequires: avahi-glib-devel
27 BuildRequires: cups-devel >= 1:1.6.0
28 BuildRequires: dbus-devel
29 BuildRequires: fontconfig-devel
30 BuildRequires: freetype-devel
31 BuildRequires: ghostscript-ijs-devel
32 BuildRequires: lcms2-devel
33 BuildRequires: libjpeg-devel
34 BuildRequires: libpng-devel
35 BuildRequires: libtiff-devel
36 BuildRequires: libtool
37 BuildRequires: pkgconfig
38 BuildRequires: poppler-cpp-devel
39 BuildRequires: poppler-devel
40 BuildRequires: poppler-progs
41 BuildRequires: python-pycups
42 BuildRequires: qpdf-devel
43 BuildRequires: systemd
44 BuildRequires: zlib-devel
45 # Testing font for test scripts.
46 #BuildRequires: dejavu-sans-fonts
47 Requires: cups-filters-libs = %{version}-%{release}
48 Requires: poppler-progs
53 Obsoletes: cups-php < 1:1.6.0-1
54 # Don't Provide it because we don't build the php module
55 #Provides: cups-php = 1:1.6.0-1
56 # Ghostscript CUPS filters live here since Ghostscript 9.08.
57 Provides: ghostscript-cups = 9.08
58 Obsoletes: ghostscript-cups < 9.08
59 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62 Requires(post): systemd
63 Requires(preun): systemd
64 Requires(postun): systemd
67 Summary: OpenPrinting CUPS filters and backends - cupsfilters and fontembed libraries
69 # LGPLv2: libcupsfilters
71 License: LGPLv2 and MIT
74 Summary: OpenPrinting CUPS filters and backends - development environment
75 License: LGPLv2 and MIT
76 Group: Development/Libraries
77 Requires: cups-filters-libs = %{version}-%{release}
80 Contains backends, filters, and other software that was once part of
81 the core CUPS distribution but is no longer maintained by Apple Inc.
82 In addition it contains additional filters developed independently of
83 Apple, especially filters for the PDF-centric printing workflow
84 introduced by OpenPrinting.
87 This package provides cupsfilters and fontembed libraries.
90 This is the development package for OpenPrinting CUPS filters and
93 %package -n cups-browsed
94 Summary: A daemon for browsing the Bonjour broadcasts of shared, remote CUPS printers
95 Group: Applications/Printing
96 Requires: cups-filters-libs = %{version}-%{release}
98 %description -n cups-browsed
99 A daemon for browsing the Bonjour broadcasts of shared,
100 remote CUPS printers.
114 --disable-silent-rules \
115 --with-pdftops=hybrid \
122 rm -rf $RPM_BUILD_ROOT
123 install -d $RPM_BUILD_ROOT%{systemdunitdir}
126 DESTDIR=$RPM_BUILD_ROOT
128 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
130 # Not sure what is this good for.
131 %{__rm} $RPM_BUILD_ROOT%{_bindir}/ttfread
133 install -p utils/cups-browsed.service $RPM_BUILD_ROOT%{systemdunitdir}
136 rm -rf $RPM_BUILD_ROOT
138 %post -n cups-browsed
139 if [ $1 -eq 1 ] ; then
140 # We can remove this after few releases, it's just for the introduction of cups-browsed.
141 if [ -f %{_sysconfdir}/cups/cups-browsed.conf ]; then
142 echo -e "\n# NOTE: This file is not part of CUPS. You need to start & enable cups-browsed service." >>%{_sysconfdir}/cups/cups-browsed.conf
145 # move BrowsePoll from cupsd.conf to cups-browsed.conf
146 if [ -f %{_sysconfdir}/cups/cupsd.conf ] && grep -iq "^BrowsePoll" %{_sysconfdir}/cups/cupsd.conf; then
147 if ! grep -iq "^BrowsePoll" %{_sysconfdir}/cups/cups-browsed.conf; then
148 echo "# Settings automatically moved from cupsd.conf by RPM package:" >>%{_sysconfdir}/cups/cups-browsed.conf
149 grep -i "^BrowsePoll" %{_sysconfdir}/cups/cupsd.conf >> %{_sysconfdir}/cups/cups-browsed.conf || :
151 sed -i -e "s,^BrowsePoll,#BrowsePoll directive moved to cups-browsed.conf\n#BrowsePoll,i" %{_sysconfdir}/cups/cupsd.conf || :
154 %systemd_post cups-browsed.service
156 %preun -n cups-browsed
157 %systemd_preun cups-browsed.service
159 %postun -n cups-browsed
162 %post libs -p /sbin/ldconfig
163 %postun libs -p /sbin/ldconfig
166 %defattr(644,root,root,755)
167 %doc README AUTHORS NEWS
168 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fonts/conf.d/99pdftoopvp.conf
169 %attr(755,root,root) %{_cups_serverbin}/filter/*
170 %attr(755,root,root) %{_cups_serverbin}/backend/parallel
171 %attr(755,root,root) %{_cups_serverbin}/backend/serial
172 %{_datadir}/cups/banners
173 %{_datadir}/cups/charsets
174 %{_datadir}/cups/data/*
175 # this needs to be in the main package because of cupsfilters.drv
176 %{_datadir}/cups/ppdc/pcl.h
177 %{_datadir}/cups/drv/cupsfilters.drv
178 %{_datadir}/cups/mime/cupsfilters.types
179 %{_datadir}/cups/mime/cupsfilters.convs
180 %{_datadir}/ppd/cupsfilters
183 %defattr(644,root,root,755)
184 %doc fontembed/README
185 %attr(755,root,root) %{_libdir}/libcupsfilters.so.*.*.*
186 %attr(755,root,root) %ghost %{_libdir}/libcupsfilters.so.1
187 %attr(755,root,root) %{_libdir}/libfontembed.so.*.*.*
188 %attr(755,root,root) %ghost %{_libdir}/libfontembed.so.1
191 %defattr(644,root,root,755)
192 %{_includedir}/cupsfilters
193 %{_includedir}/fontembed
194 %{_datadir}/cups/ppdc/escp.h
195 %{_pkgconfigdir}/libcupsfilters.pc
196 %{_pkgconfigdir}/libfontembed.pc
197 %attr(755,root,root) %{_libdir}/libcupsfilters.so
198 %attr(755,root,root) %{_libdir}/libfontembed.so
200 %files -n cups-browsed
201 %defattr(644,root,root,755)
202 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cups/cups-browsed.conf
203 %attr(755,root,root) %{_sbindir}/cups-browsed
204 %{systemdunitdir}/cups-browsed.service
205 %{_mandir}/man8/cups-browsed.8*
206 %{_mandir}/man5/cups-browsed.conf.5*