]>
Commit | Line | Data |
---|---|---|
98eddd8d JR |
1 | Summary: OpenPrinting CUPS filters and backends |
2 | Name: cups-filters | |
3 | Version: 1.0.41 | |
551e22e7 | 4 | Release: 5 |
98eddd8d JR |
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 | |
be95c05b | 25 | BuildRequires: cups-devel >= 1:1.6.0 |
98eddd8d JR |
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 | |
b84b8132 | 40 | BuildRequires: rpmbuild(macros) >= 1.671 |
98eddd8d JR |
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 | |
48 | # pstopdf | |
49 | Requires: bc | |
50 | Requires: grep | |
51 | Requires: sed | |
98eddd8d JR |
52 | Provides: ghostscript-cups = 9.08 |
53 | Obsoletes: ghostscript-cups < 9.08 | |
54 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
55 | ||
b84b8132 | 56 | %define _cups_serverbin %(/usr/bin/cups-config --serverbin) |
98eddd8d JR |
57 | |
58 | %package libs | |
59 | Summary: OpenPrinting CUPS filters and backends - cupsfilters and fontembed libraries | |
60 | Group: Libraries | |
61 | # LGPLv2: libcupsfilters | |
62 | # MIT: libfontembed | |
63 | License: LGPLv2 and MIT | |
64 | ||
65 | %package devel | |
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} | |
70 | ||
71 | %description | |
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. | |
77 | ||
78 | %description libs | |
79 | This package provides cupsfilters and fontembed libraries. | |
80 | ||
81 | %description devel | |
82 | This is the development package for OpenPrinting CUPS filters and | |
83 | backends. | |
84 | ||
85 | %package -n cups-browsed | |
86 | Summary: A daemon for browsing the Bonjour broadcasts of shared, remote CUPS printers | |
87 | Group: Applications/Printing | |
b84b8132 | 88 | Requires(post,preun,postun): systemd-units |
98eddd8d | 89 | Requires: cups-filters-libs = %{version}-%{release} |
b84b8132 | 90 | Requires: systemd-units >= 38 |
98eddd8d JR |
91 | |
92 | %description -n cups-browsed | |
93 | A daemon for browsing the Bonjour broadcasts of shared, | |
94 | remote CUPS printers. | |
95 | ||
b84b8132 JR |
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 | |
100 | Epoch: 2 | |
101 | License: GPL v2 + openssl exception | |
102 | Group: Applications/Printing | |
551e22e7 | 103 | Requires: %{name} = %{version}-%{release} |
b84b8132 JR |
104 | |
105 | %description -n cups-backend-serial | |
106 | This package allow CUPS printing on printers connected by serial | |
107 | ports. | |
108 | ||
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. | |
112 | ||
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 | |
117 | Epoch: 2 | |
118 | License: GPL v2 + openssl exception | |
119 | Group: Applications/Printing | |
551e22e7 | 120 | Requires: %{name} = %{version}-%{release} |
b84b8132 JR |
121 | |
122 | %description -n cups-backend-parallel | |
123 | This package allow CUPS printing on printers connected by parallel | |
124 | ports. | |
125 | ||
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. | |
129 | ||
130 | # CREATE ANY NEW PACKAGES BEFORE cups-backend-* (EPOCH) | |
131 | ||
98eddd8d JR |
132 | %prep |
133 | %setup -q | |
134 | %patch1 -p1 | |
135 | %patch2 -p1 | |
136 | ||
137 | %build | |
138 | %{__aclocal} | |
139 | %{__autoconf} | |
140 | %{__automake} | |
141 | ||
142 | %configure \ | |
143 | --disable-static \ | |
144 | --disable-silent-rules \ | |
145 | --with-pdftops=hybrid \ | |
146 | --enable-dbus \ | |
147 | --with-rcdir=no | |
148 | ||
149 | %{__make} | |
150 | ||
151 | %install | |
152 | rm -rf $RPM_BUILD_ROOT | |
153 | install -d $RPM_BUILD_ROOT%{systemdunitdir} | |
154 | ||
155 | %{__make} install \ | |
156 | DESTDIR=$RPM_BUILD_ROOT | |
157 | ||
158 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la | |
159 | ||
160 | # Not sure what is this good for. | |
161 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/ttfread | |
162 | ||
163 | install -p utils/cups-browsed.service $RPM_BUILD_ROOT%{systemdunitdir} | |
164 | ||
165 | %clean | |
166 | rm -rf $RPM_BUILD_ROOT | |
167 | ||
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 | |
173 | fi | |
174 | ||
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 || : | |
180 | fi | |
181 | sed -i -e "s,^BrowsePoll,#BrowsePoll directive moved to cups-browsed.conf\n#BrowsePoll,i" %{_sysconfdir}/cups/cupsd.conf || : | |
182 | fi | |
183 | fi | |
184 | %systemd_post cups-browsed.service | |
185 | ||
186 | %preun -n cups-browsed | |
187 | %systemd_preun cups-browsed.service | |
188 | ||
189 | %postun -n cups-browsed | |
190 | %systemd_reload | |
191 | ||
192 | %post libs -p /sbin/ldconfig | |
193 | %postun libs -p /sbin/ldconfig | |
194 | ||
195 | %files | |
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/* | |
98eddd8d JR |
200 | %{_datadir}/cups/banners |
201 | %{_datadir}/cups/charsets | |
202 | %{_datadir}/cups/data/* | |
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 | |
209 | ||
210 | %files libs | |
211 | %defattr(644,root,root,755) | |
eed8649d | 212 | %doc fontembed/README |
98eddd8d JR |
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 | |
217 | ||
218 | %files devel | |
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 | |
227 | ||
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* | |
b84b8132 JR |
235 | |
236 | %files -n cups-backend-serial | |
237 | %defattr(644,root,root,755) | |
238 | %attr(755,root,root) %{_cups_serverbin}/backend/serial | |
239 | ||
240 | %files -n cups-backend-parallel | |
241 | %defattr(644,root,root,755) | |
242 | %attr(755,root,root) %{_cups_serverbin}/backend/parallel |