]>
Commit | Line | Data |
---|---|---|
3540b403 | 1 | # |
7be5c8e8 | 2 | # Conditional build: |
373aff1e | 3 | %bcond_with gnutls # use GNU TLS for SSL/TLS support (instead of OpenSSL) |
a329855b | 4 | %bcond_with dnssd # DNS Service Discovery support via dns_sd API (obsoleted by Avahi patch) |
cdbbf080 | 5 | %bcond_without avahi # DNS Service Discovery support via Avahi |
c52ab2b7 | 6 | %bcond_without gssapi # do not include GSSAPI support |
84d9a886 | 7 | %bcond_without python # don't build Python support in web interface |
373aff1e | 8 | %bcond_without static_libs # don't build static library |
70ba6cfc | 9 | |
fb3b4f59 ER |
10 | Summary(pl.UTF-8): Ogólny system druku dla Uniksa |
11 | Summary(pt_BR.UTF-8): Sistema Unix de Impressão | |
346112e3 | 12 | Name: cups |
c339741f JR |
13 | Version: 1.7.1 |
14 | Release: 1 | |
e73da052 | 15 | Epoch: 1 |
948a3d9c | 16 | License: LGPL v2 (libraries), GPL v2 (the rest) + openssl exception |
0366ccc3 | 17 | Group: Applications/Printing |
3e1538e5 | 18 | Source0: http://www.cups.org/software/%{version}/%{name}-%{version}-source.tar.bz2 |
c339741f | 19 | # Source0-md5: 55277c40fd4b7183dc3671d39c5c42b7 |
168e60c2 | 20 | Source1: %{name}.init |
fd7e4ff1 | 21 | Source2: %{name}.pamd |
fd4436b5 | 22 | Source3: %{name}.logrotate |
60e0cb5a | 23 | Source4: %{name}.mailto.conf |
84d9a886 | 24 | Source5: %{name}-lpd.inetd |
19a74fff | 25 | Source6: %{name}-modprobe.conf |
33a3fa2f | 26 | Source7: %{name}.tmpfiles |
f72ae4ea | 27 | # svn diff http://svn.easysw.com/public/cups/tags/release-1.4.3/ http://svn.easysw.com/public/cups/branches/branch-1.4/ > cups-branch.diff |
39a6b5e1 | 28 | # + drop config-scripts/cups-common.m4 change |
25dfe94f | 29 | Patch0: %{name}-config.patch |
25dfe94f | 30 | Patch2: %{name}-options.patch |
73a0798d | 31 | Patch3: %{name}-man_pages_linking.patch |
f75e41c7 | 32 | Patch4: %{name}-nostrip.patch |
efe7daa3 | 33 | Patch5: %{name}-certs_FHS.patch |
34 | Patch6: %{name}-direct_usb.patch | |
388c735f | 35 | Patch7: %{name}-no-polluted-krb5config.patch |
388c735f JR |
36 | Patch9: %{name}-verbose-compilation.patch |
37 | Patch10: %{name}-peercred.patch | |
2cd6a49c | 38 | Patch11: %{name}-usb.patch |
eea183cb | 39 | Patch12: %{name}-desktop.patch |
304fa3b3 | 40 | Patch13: %{name}-systemd-socket.patch |
ba7599c9 | 41 | Patch14: add-ipp-backend-of-cups-1.4.patch |
eac40fe0 KK |
42 | Patch15: reactivate_recommended_driver.patch |
43 | Patch16: read-embedded-options-from-incoming-postscript-and-add-to-ipp-attrs.patch | |
5d498f1c | 44 | Patch17: %{name}-use-ipp1.1.patch |
6df0c9a8 | 45 | Patch18: %{name}-final-content-type.patch |
d07e62b1 | 46 | # avahi patches from fedora |
3e1538e5 JR |
47 | Patch100: %{name}-avahi-address.patch |
48 | Patch101: %{name}-avahi-no-threaded.patch | |
fb328468 | 49 | URL: http://www.cups.org/ |
daf27ba0 | 50 | BuildRequires: acl-devel |
a70a3fe3 | 51 | BuildRequires: autoconf >= 2.60 |
e73da052 | 52 | BuildRequires: automake |
d07e62b1 ER |
53 | %{?with_dnssd:BuildRequires: avahi-compat-libdns_sd-devel} |
54 | %{?with_avahi:BuildRequires: avahi-devel} | |
e809c01b | 55 | BuildRequires: dbus-devel |
ceddaf82 | 56 | BuildRequires: glibc-headers |
373aff1e | 57 | %{?with_gnutls:BuildRequires: gnutls-devel} |
cc8431ac | 58 | %{?with_gssapi:BuildRequires: heimdal-devel} |
aa509eeb | 59 | BuildRequires: libjpeg-devel |
d5391671 | 60 | BuildRequires: libpaper-devel |
30d7d426 | 61 | BuildRequires: libpng-devel |
21ee9950 | 62 | BuildRequires: libstdc++-devel |
30d7d426 | 63 | BuildRequires: libtiff-devel |
9158c4a7 | 64 | BuildRequires: libusb-devel >= 1.0 |
373aff1e | 65 | %{!?with_gnutls:BuildRequires: openssl-devel} |
8bdc526e | 66 | BuildRequires: pam-devel |
3219126a | 67 | BuildRequires: pkgconfig |
cdbbf080 | 68 | BuildRequires: rpmbuild(macros) >= 1.641 |
b65c711b | 69 | BuildRequires: systemd-devel |
a329855b | 70 | BuildRequires: zlib-devel |
9e9d05b7 | 71 | Requires(post,preun): /sbin/chkconfig |
b7adbbe1 | 72 | Requires(post,preun,postun): systemd-units >= 38 |
39956f63 | 73 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} |
38b89461 | 74 | Requires: cups-filters |
7d1a8fed | 75 | Requires: openssl-tools |
6bd9c7f7 | 76 | Requires: pam >= 0.77.3 |
a73a2669 | 77 | Requires: rc-scripts |
b7adbbe1 | 78 | Requires: systemd-units >= 38 |
cbfa6c41 | 79 | Suggests: ImageMagick-coder-pdf |
60d4721a | 80 | Suggests: poppler-progs |
09af927c | 81 | Provides: printingdaemon |
1770fa4c | 82 | Obsoletes: printingdaemon |
a73a2669 | 83 | Conflicts: ghostscript < 7.05.4 |
96792ec6 | 84 | Conflicts: hplip < 3.13.11 |
9e79f779 | 85 | Conflicts: logrotate < 3.7-4 |
91331aef | 86 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
346112e3 | 87 | |
82f3f074 JK |
88 | %define _ulibdir %{_prefix}/lib |
89 | ||
fb328468 | 90 | %description |
dd843423 | 91 | CUPS provides a portable printing layer for UNIX-based operating |
8bff8fce MP |
92 | systems. It has been developed by Easy Software Products to promote a |
93 | standard printing solution for all UNIX vendors and users. CUPS | |
94 | provides the System V and Berkeley command-line interfaces. CUPS uses | |
95 | the Internet Printing Protocol ("IPP") as the basis for managing print | |
96 | jobs and queues. The Line Printer Daemon ("LPD") Server Message Block | |
97 | ("SMB"), and AppSocket (a.k.a. JetDirect) protocols are also supported | |
98 | with reduced functionality. CUPS adds network printer browsing and | |
99 | PostScript Printer Description ("PPD") based printing options to | |
100 | support real-world printing under UNIX. | |
346112e3 | 101 | |
2f78071d JR |
102 | %description -l pl.UTF-8 |
103 | CUPS dostarcza standardowy poziom drukowania dla systemów uniksowych. | |
104 | CUPS używa protokołu IPP - Internet Printint Protocol jako podstawy do | |
105 | zarządzania zadaniami i kolejkami druku. W ograniczonym zakresie | |
106 | obsługiwane są także protokoły LPD (Line Printer Daemon), SMB (Server | |
107 | Message Block) i AppSocket (znany także jako JetDirect). CUPS | |
108 | udostępnia przeglądanie drukarek sieciowych i opcje drukowania oparte | |
109 | na PPD (PostScript Printer Description) do obsługi rzeczywistych | |
bc9f5ffe | 110 | drukarek. |
30d7d426 | 111 | |
2f78071d JR |
112 | %description -l pt_BR.UTF-8 |
113 | O sistema Unix de impressão (CUPS) fornece uma camada de impressão | |
114 | portável para os sistemas operacionais baseados no UNIX®. | |
4644dd52 | 115 | |
6ebf74dd | 116 | %package lib |
fd7e4ff1 | 117 | Summary: Common Unix Printing System Libraries |
fb3b4f59 ER |
118 | Summary(pl.UTF-8): Biblioteki dla CUPS |
119 | Summary(pt_BR.UTF-8): Sistema Unix de Impressão - bibliotecas para uso em clientes cups | |
948a3d9c | 120 | License: LGPL v2 + openssl exception |
52835768 | 121 | Group: Libraries |
6ebf74dd | 122 | Provides: %{name}-libs = %{epoch}:%{version}-%{release} |
a73a2669 | 123 | Obsoletes: cups-libs |
bf6c7747 | 124 | Obsoletes: libcups1 |
fd7e4ff1 | 125 | |
6ebf74dd | 126 | %description lib |
9625f17f JB |
127 | Common Unix Printing System Libraries. |
128 | ||
2f78071d | 129 | %description lib -l pl.UTF-8 |
9625f17f | 130 | Biblioteki dla CUPS. |
fd7e4ff1 | 131 | |
2f78071d | 132 | %description lib -l pt_BR.UTF-8 |
6ebf74dd AF |
133 | Bibliotecas CUPS requeridas pelos clientes CUPS. |
134 | ||
2da56f05 SZ |
135 | %package clients |
136 | Summary: Common Unix Printing System Clients | |
fb3b4f59 | 137 | Summary(pl.UTF-8): Aplikacje klienckie dla CUPS |
948a3d9c | 138 | License: GPL v2 + openssl exception |
2da56f05 | 139 | Group: Applications/Printing |
e055e440 | 140 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} |
09af927c | 141 | Provides: printingclient |
1770fa4c | 142 | Obsoletes: printingclient |
2da56f05 SZ |
143 | |
144 | %description clients | |
145 | Common Unix Printing System Clients. | |
146 | ||
2f78071d | 147 | %description clients -l pl.UTF-8 |
2da56f05 SZ |
148 | Aplikacje klienckie dla CUPS. |
149 | ||
6ebf74dd AF |
150 | %package image-lib |
151 | Summary: Common Unix Printing System Libraries - images manipulation | |
fb3b4f59 ER |
152 | Summary(pl.UTF-8): Biblioteki dla CUPS - obsługa formatów graficznych |
153 | Summary(pt_BR.UTF-8): Sistema Unix de Impressão - bibliotecas para uso em clientes cups | |
948a3d9c | 154 | License: LGPL v2 + openssl exception |
52835768 | 155 | Group: Libraries |
039c735c | 156 | Requires: %{name}-lib = %{epoch}:%{version}-%{release} |
6ebf74dd AF |
157 | Obsoletes: libcups1 |
158 | ||
159 | %description image-lib | |
257636d7 | 160 | Common Unix Printing System Libraries - images manipalation. |
6ebf74dd | 161 | |
2f78071d JR |
162 | %description image-lib -l pl.UTF-8 |
163 | Biblioteki dla CUPS - obsługa formatów graficznych. | |
6ebf74dd | 164 | |
2f78071d | 165 | %description image-lib -l pt_BR.UTF-8 |
4644dd52 | 166 | Bibliotecas CUPS requeridas pelos clientes CUPS. |
167 | ||
980a97fe | 168 | %package devel |
169 | Summary: Common Unix Printing System development files | |
fb3b4f59 ER |
170 | Summary(pl.UTF-8): Ogólny system druku dla Uniksa - pliki nagłówkowe |
171 | Summary(pt_BR.UTF-8): Sistema Unix de Impressão - ambiente de desenvolvimento | |
948a3d9c | 172 | License: LGPL v2 + openssl exception |
980a97fe | 173 | Group: Development/Libraries |
cd99fdf9 JB |
174 | Requires: %{name}-image-lib = %{epoch}:%{version}-%{release} |
175 | Requires: %{name}-lib = %{epoch}:%{version}-%{release} | |
3e2caa76 | 176 | # for libcups |
950cc25f | 177 | %{?with_gnutls:Requires: gnutls-devel} |
4e95951c | 178 | %{?with_gssapi:Requires: heimdal-devel} |
950cc25f | 179 | %{!?with_gnutls:Requires: openssl-devel} |
717a8d25 | 180 | Requires: zlib-devel |
3e2caa76 JB |
181 | # for libcupsimage |
182 | Requires: libjpeg-devel | |
183 | Requires: libpng-devel | |
184 | Requires: libtiff-devel | |
bf6c7747 | 185 | Obsoletes: libcups1-devel |
980a97fe | 186 | |
187 | %description devel | |
9625f17f | 188 | Common Unix Printing System development files. |
980a97fe | 189 | |
2f78071d JR |
190 | %description devel -l pl.UTF-8 |
191 | Ogólny system druku dla Uniksa - pliki nagłówkowe. | |
8bdc526e | 192 | |
2f78071d JR |
193 | %description devel -l pt_BR.UTF-8 |
194 | Este pacote é um adicional que contem um ambiente de desenvolvimento | |
195 | para a criação de suporte a novas impressoras e novos serviços ao | |
4644dd52 | 196 | CUPS. |
197 | ||
980a97fe | 198 | %package static |
199 | Summary: Common Unix Printing System static libraries | |
fb3b4f59 ER |
200 | Summary(pl.UTF-8): Ogólny system druku dla Uniksa - biblioteki statyczne |
201 | Summary(pt_BR.UTF-8): Common Unix Printing System - bibliotecas estáticas | |
948a3d9c | 202 | License: LGPL v2 + openssl exception |
980a97fe | 203 | Group: Development/Libraries |
cd99fdf9 | 204 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
980a97fe | 205 | |
206 | %description static | |
8bdc526e | 207 | Common Unix Printing System static libraries. |
980a97fe | 208 | |
2f78071d JR |
209 | %description static -l pl.UTF-8 |
210 | Ogólny system druku dla Uniksa - biblioteki statyczne. | |
8bdc526e | 211 | |
2f78071d JR |
212 | %description static -l pt_BR.UTF-8 |
213 | Bibliotecas estáticas para desenvolvimento de programas que usam as | |
4644dd52 | 214 | bibliotecas do CUPS. |
215 | ||
25aeafb8 | 216 | %package backend-usb |
0f8ac12d | 217 | Summary: USB backend for CUPS |
fb3b4f59 | 218 | Summary(pl.UTF-8): Backend USB dla CUPS-a |
948a3d9c | 219 | License: GPL v2 + openssl exception |
0f8ac12d | 220 | Group: Applications/Printing |
cd99fdf9 | 221 | Requires: %{name} = %{epoch}:%{version}-%{release} |
0f8ac12d AF |
222 | |
223 | %description backend-usb | |
224 | This package allow CUPS printing on USB printers. | |
225 | ||
2f78071d JR |
226 | %description backend-usb -l pl.UTF-8 |
227 | Ten pakiet umożliwia drukowanie z poziomu CUPS-a na drukarkach USB. | |
71ac0ea6 | 228 | |
84d9a886 JR |
229 | %package lpd |
230 | Summary: LPD compatibility support for CUPS print server | |
231 | Summary(pl.UTF-8): Wsparcie dla LPD w serwerze wydruków CUPS | |
948a3d9c | 232 | License: GPL v2 + openssl exception |
84d9a886 | 233 | Group: Applications/Printing |
84d9a886 | 234 | Requires: %{name} = %{epoch}:%{version}-%{release} |
1770fa4c | 235 | Requires: rc-inetd |
84d9a886 JR |
236 | |
237 | %description lpd | |
238 | LPD compatibility support for CUPS print server. | |
239 | ||
240 | %description lpd -l pl.UTF-8 | |
241 | Wsparcie dla LPD w serwerze wydruków CUPS. | |
242 | ||
346112e3 | 243 | %prep |
735a5048 | 244 | %setup -q |
73a0798d | 245 | %patch0 -p1 |
25dfe94f | 246 | %patch2 -p1 |
73a0798d | 247 | %patch3 -p1 |
f75e41c7 | 248 | %patch4 -p1 |
653cdc22 | 249 | %patch5 -p1 |
d15c7d48 AM |
250 | # why it hasn't been merged for so long (and why no other distro uses it) |
251 | #%patch6 -p1 | |
388c735f | 252 | %patch7 -p1 |
84d9a886 | 253 | %patch9 -p1 |
948a3d9c | 254 | %patch10 -p1 |
d15c7d48 AM |
255 | # why it hasn't been merged for so long (and why no other distro uses it) |
256 | #%patch11 -p1 | |
eea183cb | 257 | %patch12 -p1 |
304fa3b3 | 258 | %patch13 -p1 |
ba7599c9 AM |
259 | %patch14 -p1 |
260 | %patch15 -p1 | |
261 | %patch16 -p1 | |
5d498f1c | 262 | %patch17 -p1 |
6df0c9a8 | 263 | %patch18 -p1 |
8bdc526e | 264 | |
84371ffc | 265 | %if %{with avahi} |
d07e62b1 ER |
266 | %patch100 -p1 |
267 | %patch101 -p1 | |
84371ffc | 268 | %endif |
d07e62b1 | 269 | |
346112e3 | 270 | %build |
daf27ba0 | 271 | %{__aclocal} -I config-scripts |
0b9d4622 | 272 | %{__autoconf} |
c6f4ebff | 273 | %configure \ |
82f3f074 | 274 | --libdir=%{_ulibdir} \ |
a329855b JB |
275 | --enable-acl \ |
276 | --enable-avahi%{!?with_avahi:=no} \ | |
5aac26ac | 277 | --disable-cdsassl \ |
a329855b JB |
278 | --enable-dbus \ |
279 | %{?debug:--enable-debug} \ | |
280 | --enable-dnssd%{!?with_dnssd:=no} \ | |
281 | --enable-gnutls%{!?with_gnutls:=no} \ | |
282 | --enable-gssapi%{!?with_gssapi:=no} \ | |
d5391671 AM |
283 | --enable-libpaper \ |
284 | --enable-libusb \ | |
a329855b | 285 | --enable-openssl%{?with_gnutls:=no} \ |
8d2025a2 | 286 | --enable-shared \ |
5aac26ac | 287 | --enable-ssl \ |
5aac26ac | 288 | %{?with_static_libs:--enable-static} \ |
32eff1a9 | 289 | --with-cups-group=lp \ |
a329855b | 290 | --with-cups-user=lp \ |
ceddaf82 | 291 | --with-system-groups=sys \ |
ceddaf82 AM |
292 | --with-config-file-perm=0640 \ |
293 | --with-log-file-perm=0640 \ | |
a329855b JB |
294 | --with-dbusdir=/etc/dbus-1 \ |
295 | --with-docdir=%{_ulibdir}/%{name}/cgi-bin \ | |
296 | --with-printcap=/etc/printcap \ | |
ceddaf82 AM |
297 | %{?with_dnssd:--with-dnssd-libs=x} \ |
298 | %{?with_dnssd:--with-dnssd-includes=x} \ | |
a329855b | 299 | --with-optim=-Wno-format-y2k \ |
b65c711b JR |
300 | %{?with_python:--with-python=%{_bindir}/python} \ |
301 | --with-systemdsystemunitdir=%{systemdunitdir} | |
373aff1e | 302 | |
03dce67c | 303 | %{__make} %{?debug:OPTIONS="-DDEBUG"} |
7be5c8e8 | 304 | |
346112e3 | 305 | %install |
306 | rm -rf $RPM_BUILD_ROOT | |
19a74fff | 307 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,pam.d,logrotate.d,modprobe.d,security,sysconfig/rc-inetd} \ |
428f33ff | 308 | $RPM_BUILD_ROOT/var/run/cups \ |
33a3fa2f | 309 | $RPM_BUILD_ROOT/var/log/{,archive/}cups \ |
cdbbf080 | 310 | $RPM_BUILD_ROOT{%{systemdunitdir},%{systemdtmpfilesdir}} |
fd7e4ff1 | 311 | |
6133c494 | 312 | %{__make} install \ |
e827011a AM |
313 | BUILDROOT=$RPM_BUILD_ROOT \ |
314 | CUPS_USER=$(id -u) \ | |
315 | CUPS_GROUP=$(id -g) | |
fd7e4ff1 | 316 | |
82f3f074 JK |
317 | if [ "%{_lib}" != "lib" ] ; then |
318 | install -d $RPM_BUILD_ROOT%{_libdir} | |
319 | mv $RPM_BUILD_ROOT%{_ulibdir}/*.so* $RPM_BUILD_ROOT%{_libdir} | |
8a37ac1d | 320 | %if %{with static_libs} |
e3bfc8b9 | 321 | mv $RPM_BUILD_ROOT%{_ulibdir}/*.a $RPM_BUILD_ROOT%{_libdir} |
8a37ac1d | 322 | %endif |
82f3f074 JK |
323 | fi |
324 | ||
bf51f358 JR |
325 | %if %{with avahi} |
326 | ln -s %{_ulibdir}/cups/backend/dnssd $RPM_BUILD_ROOT%{_ulibdir}/cups/backend/mdns | |
327 | %endif | |
328 | ||
33a3fa2f JR |
329 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
330 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/%{name} | |
331 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/%{name} | |
1770fa4c | 332 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/cups/mailto.conf |
84d9a886 | 333 | sed -e 's|__ULIBDIR__|%{_ulibdir}|g' %{SOURCE5} > $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/cups-lpd |
33a3fa2f | 334 | install %{SOURCE6} $RPM_BUILD_ROOT/etc/modprobe.d/cups.conf |
cdbbf080 | 335 | install %{SOURCE7} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf |
45a67ab9 | 336 | |
4d897458 | 337 | touch $RPM_BUILD_ROOT/var/log/cups/{access_log,error_log,page_log} |
cad7b106 | 338 | touch $RPM_BUILD_ROOT/etc/security/blacklist.cups |
a453f068 JR |
339 | touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{classes,printers}.conf |
340 | ||
341 | cat >$RPM_BUILD_ROOT%{_sysconfdir}/%{name}/client.conf <<'EOF' | |
342 | # Encryption Always | |
343 | # ServerName print.server.ip.or.name | |
344 | EOF | |
679be76f | 345 | |
ef5fe709 ER |
346 | # windows drivers can be put there. |
347 | install -d $RPM_BUILD_ROOT%{_datadir}/cups/drivers | |
348 | ||
748a0bf9 ER |
349 | # dirs for gimp-print-cups-4.2.7-1 |
350 | install -d $RPM_BUILD_ROOT%{_datadir}/cups/model/{C,da,en_GB,fr,nb,pl,sv} | |
351 | ||
daf27ba0 | 352 | touch $RPM_BUILD_ROOT/var/cache/cups/help.index |
6139e54a | 353 | touch $RPM_BUILD_ROOT/var/cache/cups/{job,remote}.cache |
68e5a032 | 354 | touch $RPM_BUILD_ROOT/var/cache/cups/ppds.dat |
748a0bf9 | 355 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/cups/ssl |
ef5fe709 | 356 | |
eea94f34 | 357 | # links to enable/disable (compatibility!) |
748a0bf9 ER |
358 | ln -s accept $RPM_BUILD_ROOT%{_sbindir}/enable |
359 | ln -s accept $RPM_BUILD_ROOT%{_sbindir}/disable | |
eea94f34 | 360 | |
2e2308c6 | 361 | # check-files cleanup |
3e1538e5 | 362 | %{__rm} -r $RPM_BUILD_ROOT/etc/{init.d,rc?.d} |
679be76f | 363 | |
38b89461 JR |
364 | # shipped in cups-filters |
365 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/cups/banners | |
7616b8ed | 366 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/cups/data/testprint |
38b89461 | 367 | |
9625f17f JB |
368 | %clean |
369 | rm -rf $RPM_BUILD_ROOT | |
370 | ||
168e60c2 | 371 | %post |
96792ec6 JR |
372 | # Deal with config migration due to CVE-2012-5519 (STR #4223) |
373 | _keywords="^\(AccessLog\|CacheDir\|ConfigFilePerm\|\ | |
374 | DataDir\|DocumentRoot\|ErrorLog\|FatalErrors\|\ | |
375 | FileDevice\|FontPath\|Group\|LogFilePerm\|\ | |
376 | LPDConfigFile\|PageLog\|Printcap\|PrintcapFormat\|\ | |
377 | RemoteRoot\|RequestRoot\|ServerBin\|ServerCertificate\|\ | |
378 | ServerKey\|ServerRoot\|SMBConfigFile\|StateDir\|\ | |
379 | SystemGroup\|SystemGroupAuthKey\|TempDir\|User\)" | |
380 | if [ -f %{_sysconfdir}/cups/cupsd.conf ] && grep -iq "$_keywords" %{_sysconfdir}/cups/cupsd.conf; then | |
381 | echo "# Settings automatically moved from cupsd.conf by RPM package:" >> %{_sysconfdir}/cups/cups-files.conf | |
382 | grep -i "$_keywords" %{_sysconfdir}/cups/cupsd.conf >> %{_sysconfdir}/cups/cups-files.conf || : | |
383 | %{__sed} -i -e "s,$_keywords,#&,ig" %{_sysconfdir}/cups/cupsd.conf || : | |
384 | fi | |
8a24ec7f | 385 | /sbin/chkconfig --add cups |
a73a2669 | 386 | %service cups restart "cups daemon" |
8b6d67b6 | 387 | /sbin/rmmod usblp > /dev/null 2>&1 || : |
304fa3b3 | 388 | %systemd_post cups.service cups.socket cups.path |
fb328468 | 389 | |
168e60c2 | 390 | %preun |
fd7e4ff1 | 391 | if [ "$1" = "0" ]; then |
a73a2669 | 392 | %service cups stop |
fd7e4ff1 | 393 | /sbin/chkconfig --del cups |
394 | fi | |
304fa3b3 | 395 | %systemd_preun cups.service cups.socket cups.path |
cdbbf080 JR |
396 | |
397 | %postun | |
398 | %systemd_reload | |
399 | ||
96792ec6 | 400 | %triggerpostun -- cups < 1:1.5.2-1 |
304fa3b3 | 401 | %systemd_trigger cups.service cups.socket cups.path |
168e60c2 | 402 | |
19e8d1ed | 403 | %post lib -p /sbin/ldconfig |
404 | %postun lib -p /sbin/ldconfig | |
405 | %post image-lib -p /sbin/ldconfig | |
406 | %postun image-lib -p /sbin/ldconfig | |
8bdc526e | 407 | |
84d9a886 JR |
408 | %post lpd |
409 | %service -q rc-inetd reload | |
410 | ||
411 | %postun lpd | |
412 | if [ "$1" = 0 ]; then | |
413 | %service -q rc-inetd reload | |
414 | fi | |
415 | ||
fd7e4ff1 | 416 | %files |
346112e3 | 417 | %defattr(644,root,root,755) |
4c209b1f | 418 | %doc *.txt |
9a4bd15e | 419 | %attr(640,root,root) %config %verify(not md5 mtime size) /etc/pam.d/cups |
8bdc526e | 420 | %attr(754,root,root) /etc/rc.d/init.d/cups |
e809c01b | 421 | /etc/dbus-1/system.d/cups.conf |
19a74fff | 422 | /etc/modprobe.d/cups.conf |
cdbbf080 | 423 | %{systemdunitdir}/cups.service |
b65c711b JR |
424 | %{systemdunitdir}/cups.socket |
425 | %{systemdunitdir}/cups.path | |
cdbbf080 | 426 | %{systemdtmpfilesdir}/%{name}.conf |
6139e54a | 427 | %attr(600,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/classes.conf |
885cd154 | 428 | %attr(640,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/cups-files.conf |
39956f63 | 429 | %attr(640,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/cupsd.conf |
3e1538e5 | 430 | %attr(640,root,lp) %{_sysconfdir}/%{name}/cupsd.conf.default |
daf27ba0 | 431 | %attr(600,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/printers.conf |
60e0cb5a | 432 | %attr(600,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/mailto.conf |
3cb197ff | 433 | %attr(600,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/snmp.conf |
cd29fb20 | 434 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.cups |
4017839a | 435 | %dir %attr(700,root,lp) %{_sysconfdir}/%{name}/ssl |
934a05d8 | 436 | %dir %{_sysconfdir}/%{name}/interfaces |
6139e54a | 437 | %dir %attr(755,root,lp) %{_sysconfdir}/%{name}/ppd |
39956f63 | 438 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name} |
fd7e4ff1 | 439 | %attr(4755,lp,root) %{_bindir}/lppasswd |
3ddab923 | 440 | %attr(755,root,root) %{_bindir}/cupstestppd |
e809c01b | 441 | %attr(755,root,root) %{_bindir}/cupstestdsc |
25802dee | 442 | %attr(755,root,root) %{_bindir}/ppd* |
ceddaf82 | 443 | %attr(755,root,root) %{_sbindir}/cupsctl |
daf27ba0 | 444 | %attr(755,root,root) %{_sbindir}/cupsd |
ceddaf82 | 445 | %attr(755,root,root) %{_sbindir}/cupsfilter |
daf27ba0 | 446 | |
82f3f074 | 447 | %dir %{_ulibdir}/cups |
9a4bd15e JB |
448 | %dir %{_ulibdir}/cups/backend |
449 | %if %{with avahi} | |
450 | %attr(755,root,root) %{_ulibdir}/cups/backend/dnssd | |
451 | %attr(755,root,root) %{_ulibdir}/cups/backend/mdns | |
452 | %endif | |
453 | %attr(755,root,root) %{_ulibdir}/cups/backend/http | |
454 | %attr(755,root,root) %{_ulibdir}/cups/backend/https | |
455 | %attr(755,root,root) %{_ulibdir}/cups/backend/ipp | |
456 | %attr(755,root,root) %{_ulibdir}/cups/backend/ipp14 | |
457 | %attr(755,root,root) %{_ulibdir}/cups/backend/ipps | |
458 | %attr(755,root,root) %{_ulibdir}/cups/backend/lpd | |
459 | %attr(755,root,root) %{_ulibdir}/cups/backend/snmp | |
460 | %attr(755,root,root) %{_ulibdir}/cups/backend/socket | |
461 | ||
462 | %dir %{_ulibdir}/cups/cgi-bin | |
daf27ba0 KK |
463 | %{_ulibdir}/cups/cgi-bin/help |
464 | %{_ulibdir}/cups/cgi-bin/images | |
465 | %attr(755,root,root) %{_ulibdir}/cups/cgi-bin/*.cgi | |
466 | %{_ulibdir}/cups/cgi-bin/*.css | |
467 | %{_ulibdir}/cups/cgi-bin/*.html | |
daf27ba0 | 468 | %{_ulibdir}/cups/cgi-bin/*.txt |
3e1538e5 JR |
469 | %lang(ca) %{_ulibdir}/cups/cgi-bin/ca |
470 | %lang(cs) %{_ulibdir}/cups/cgi-bin/cs | |
daf27ba0 | 471 | %lang(es) %{_ulibdir}/cups/cgi-bin/es |
cdbbf080 | 472 | %lang(fr) %{_ulibdir}/cups/cgi-bin/fr |
f72ae4ea | 473 | %lang(it) %{_ulibdir}/cups/cgi-bin/it |
daf27ba0 | 474 | %lang(ja) %{_ulibdir}/cups/cgi-bin/ja |
afacd72e | 475 | %lang(ru) %{_ulibdir}/cups/cgi-bin/ru |
daf27ba0 | 476 | |
9a4bd15e | 477 | %dir %{_ulibdir}/cups/daemon |
84d9a886 JR |
478 | %attr(755,root,root) %{_ulibdir}/cups/daemon/cups-deviced |
479 | %attr(755,root,root) %{_ulibdir}/cups/daemon/cups-driverd | |
d15c7d48 | 480 | %attr(755,root,root) %{_ulibdir}/cups/daemon/cups-exec |
7bb201d9 | 481 | %dir %{_ulibdir}/cups/driver |
9a4bd15e JB |
482 | %dir %{_ulibdir}/cups/filter |
483 | %attr(755,root,root) %{_ulibdir}/cups/filter/commandtops | |
484 | %attr(755,root,root) %{_ulibdir}/cups/filter/gziptoany | |
485 | %attr(755,root,root) %{_ulibdir}/cups/filter/pstops | |
486 | %attr(755,root,root) %{_ulibdir}/cups/filter/rastertodymo | |
487 | %attr(755,root,root) %{_ulibdir}/cups/filter/rastertoepson | |
488 | %attr(755,root,root) %{_ulibdir}/cups/filter/rastertohp | |
489 | %attr(755,root,root) %{_ulibdir}/cups/filter/rastertolabel | |
490 | %attr(755,root,root) %{_ulibdir}/cups/filter/rastertopwg | |
491 | %dir %{_ulibdir}/cups/monitor | |
492 | %attr(755,root,root) %{_ulibdir}/cups/monitor/bcp | |
493 | %attr(755,root,root) %{_ulibdir}/cups/monitor/tbcp | |
494 | %dir %{_ulibdir}/cups/notifier | |
495 | %attr(755,root,root) %{_ulibdir}/cups/notifier/dbus | |
496 | %attr(755,root,root) %{_ulibdir}/cups/notifier/mailto | |
497 | %attr(755,root,root) %{_ulibdir}/cups/notifier/rss | |
daf27ba0 | 498 | |
7616b8ed | 499 | %dir %{_datadir}/cups/data |
9a4bd15e JB |
500 | %dir %{_datadir}/cups/drivers |
501 | %dir %{_datadir}/cups/drv | |
502 | %{_datadir}/cups/drv/sample.drv | |
503 | %dir %{_datadir}/cups/examples | |
504 | %{_datadir}/cups/examples/*.drv | |
505 | %dir %{_datadir}/cups/mime | |
506 | %{_datadir}/cups/mime/mime.convs | |
507 | %{_datadir}/cups/mime/mime.types | |
748a0bf9 | 508 | %dir %{_datadir}/cups/model |
748a0bf9 ER |
509 | # dirs for gimp-print-cups-4.2.7-1 |
510 | %dir %{_datadir}/cups/model/C | |
511 | %lang(da) %dir %{_datadir}/cups/model/da | |
512 | %lang(en_GB) %dir %{_datadir}/cups/model/en_GB | |
513 | %lang(fr) %dir %{_datadir}/cups/model/fr | |
514 | %lang(nb) %dir %{_datadir}/cups/model/nb | |
515 | %lang(pl) %dir %{_datadir}/cups/model/pl | |
516 | %lang(sv) %dir %{_datadir}/cups/model/sv | |
517 | ||
9a4bd15e JB |
518 | %dir %{_datadir}/cups/ppdc |
519 | %{_datadir}/cups/ppdc/epson.h | |
520 | %{_datadir}/cups/ppdc/hp.h | |
521 | %{_datadir}/cups/ppdc/label.h | |
522 | %{_datadir}/cups/ppdc/font.defs | |
523 | %{_datadir}/cups/ppdc/media.defs | |
524 | %{_datadir}/cups/ppdc/raster.defs | |
25802dee | 525 | |
54906e64 ER |
526 | %dir %{_datadir}/cups/templates |
527 | %{_datadir}/cups/templates/*.tmpl | |
3e1538e5 JR |
528 | %lang(ca) %{_datadir}/cups/templates/ca |
529 | %lang(cs) %{_datadir}/cups/templates/cs | |
54906e64 | 530 | %lang(es) %{_datadir}/cups/templates/es |
cdbbf080 | 531 | %lang(fr) %{_datadir}/cups/templates/fr |
f72ae4ea | 532 | %lang(it) %{_datadir}/cups/templates/it |
54906e64 | 533 | %lang(ja) %{_datadir}/cups/templates/ja |
afacd72e | 534 | %lang(ru) %{_datadir}/cups/templates/ru |
c1555e94 | 535 | %{_mandir}/man1/cupstestppd.1* |
e809c01b | 536 | %{_mandir}/man1/cupstestdsc.1* |
0366ccc3 | 537 | %{_mandir}/man1/lppasswd.1* |
25802dee | 538 | %{_mandir}/man1/ppd*.1* |
4e75f969 JB |
539 | %{_mandir}/man7/backend.7* |
540 | %{_mandir}/man7/filter.7* | |
25802dee | 541 | %{_mandir}/man7/notifier.7* |
9a4bd15e | 542 | %{_mandir}/man5/classes.conf.5* |
9a4bd15e JB |
543 | %{_mandir}/man5/cups-files.conf.5* |
544 | %{_mandir}/man5/cups-snmp.conf.5* | |
545 | %{_mandir}/man5/cupsd.conf.5* | |
546 | %{_mandir}/man5/ipptoolfile.5* | |
547 | %{_mandir}/man5/mailto.conf.5* | |
548 | %{_mandir}/man5/mime.convs.5* | |
549 | %{_mandir}/man5/mime.types.5* | |
550 | %{_mandir}/man5/ppdcfile.5* | |
551 | %{_mandir}/man5/printers.conf.5* | |
552 | %{_mandir}/man5/subscriptions.conf.5* | |
84d9a886 JR |
553 | %{_mandir}/man8/cups-deviced.8* |
554 | %{_mandir}/man8/cups-driverd.8* | |
885cd154 | 555 | %{_mandir}/man8/cups-snmp.8* |
84d9a886 JR |
556 | %{_mandir}/man8/cupsctl.8* |
557 | %{_mandir}/man8/cupsd.8* | |
84d9a886 | 558 | %{_mandir}/man8/cupsfilter.8* |
daf27ba0 KK |
559 | |
560 | %dir %attr(775,root,lp) /var/cache/cups | |
428f33ff KK |
561 | %dir %attr(755,root,lp) /var/lib/cups |
562 | %dir %attr(511,lp,sys) /var/lib/cups/certs | |
6139e54a | 563 | %dir %attr(755,root,lp) /var/run/cups |
daf27ba0 KK |
564 | %dir %attr(710,root,lp) /var/spool/cups |
565 | %dir %attr(1770,root,lp) /var/spool/cups/tmp | |
68e5a032 | 566 | %attr(600,lp,lp) %ghost /var/cache/cups/help.index |
6139e54a | 567 | %attr(640,root,lp) %ghost /var/cache/cups/job.cache |
68e5a032 | 568 | %attr(600,lp,lp) %ghost /var/cache/cups/ppds.dat |
6139e54a | 569 | %attr(640,root,lp) %ghost /var/cache/cups/remote.cache |
081a50cb | 570 | %attr(750,root,logs) %dir /var/log/archive/cups |
40183055 JK |
571 | %attr(750,root,logs) %dir /var/log/cups |
572 | %attr(640,root,logs) %ghost /var/log/cups/access_log | |
573 | %attr(640,root,logs) %ghost /var/log/cups/error_log | |
574 | %attr(640,root,logs) %ghost /var/log/cups/page_log | |
980a97fe | 575 | |
6ebf74dd AF |
576 | %files lib |
577 | %defattr(644,root,root,755) | |
3c247a25 | 578 | %dir %attr(755,root,lp) %{_sysconfdir}/%{name} |
6ebf74dd | 579 | %attr(755,root,root) %{_libdir}/libcups.so.* |
25802dee | 580 | %attr(755,root,root) %{_libdir}/libcupscgi.so.* |
25802dee AM |
581 | %attr(755,root,root) %{_libdir}/libcupsmime.so.* |
582 | %attr(755,root,root) %{_libdir}/libcupsppdc.so.* | |
a57fa410 | 583 | %dir %{_datadir}/cups |
3e1538e5 JR |
584 | %lang(ca) %{_datadir}/locale/ca/cups_ca.po |
585 | %lang(cs) %{_datadir}/locale/cs/cups_cs.po | |
a57fa410 | 586 | %lang(es) %{_datadir}/locale/es/cups_es.po |
a57fa410 | 587 | %lang(fr) %{_datadir}/locale/fr/cups_fr.po |
a57fa410 | 588 | %lang(it) %{_datadir}/locale/it/cups_it.po |
a57fa410 | 589 | %lang(ja) %{_datadir}/locale/ja/cups_ja.po |
a57fa410 | 590 | %lang(ru) %{_datadir}/locale/ru/cups_ru.po |
6ebf74dd | 591 | |
2da56f05 SZ |
592 | %files clients |
593 | %defattr(644,root,root,755) | |
8d2025a2 | 594 | %attr(644,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/client.conf |
2da56f05 | 595 | %attr(755,root,root) %{_bindir}/cancel |
885cd154 | 596 | %attr(755,root,root) %{_bindir}/ippfind |
d15c7d48 | 597 | %attr(755,root,root) %{_bindir}/ipptool |
2da56f05 SZ |
598 | %attr(755,root,root) %{_bindir}/lp |
599 | %attr(755,root,root) %{_bindir}/lpoptions | |
600 | %attr(755,root,root) %{_bindir}/lpq | |
601 | %attr(755,root,root) %{_bindir}/lpr | |
602 | %attr(755,root,root) %{_bindir}/lprm | |
603 | %attr(755,root,root) %{_bindir}/lpstat | |
501ef07e | 604 | %attr(755,root,root) %{_sbindir}/accept |
25802dee | 605 | %attr(755,root,root) %{_sbindir}/cupsaccept |
501ef07e | 606 | %attr(755,root,root) %{_sbindir}/cupsaddsmb |
eea94f34 | 607 | %attr(755,root,root) %{_sbindir}/cupsenable |
608 | %attr(755,root,root) %{_sbindir}/cupsdisable | |
25802dee | 609 | %attr(755,root,root) %{_sbindir}/cupsreject |
eea94f34 | 610 | %attr(755,root,root) %{_sbindir}/disable |
611 | %attr(755,root,root) %{_sbindir}/enable | |
501ef07e AM |
612 | %attr(755,root,root) %{_sbindir}/lpadmin |
613 | %attr(755,root,root) %{_sbindir}/lpc | |
614 | %attr(755,root,root) %{_sbindir}/lpinfo | |
615 | %attr(755,root,root) %{_sbindir}/lpmove | |
616 | %attr(755,root,root) %{_sbindir}/reject | |
d15c7d48 | 617 | %{_datadir}/cups/ipptool |
1770fa4c ER |
618 | %{_desktopdir}/cups.desktop |
619 | %{_iconsdir}/hicolor/*/apps/cups.png | |
93040bdf | 620 | %{_mandir}/man1/cancel.1* |
885cd154 | 621 | %{_mandir}/man1/ippfind.1* |
d15c7d48 | 622 | %{_mandir}/man1/ipptool.1* |
0366ccc3 AF |
623 | %{_mandir}/man1/lp.1* |
624 | %{_mandir}/man1/lpoptions.1* | |
625 | %{_mandir}/man1/lpq.1* | |
626 | %{_mandir}/man1/lpr.1* | |
627 | %{_mandir}/man1/lprm.1* | |
628 | %{_mandir}/man1/lpstat.1* | |
a453f068 JR |
629 | %{_mandir}/man5/client.conf.5* |
630 | %{_mandir}/man8/accept.8* | |
25802dee | 631 | %{_mandir}/man8/cupsaccept.8* |
a453f068 JR |
632 | %{_mandir}/man8/cupsaddsmb.8* |
633 | %{_mandir}/man8/cupsenable.8* | |
25802dee AM |
634 | %{_mandir}/man8/cupsdisable.8* |
635 | %{_mandir}/man8/cupsreject.8* | |
a453f068 JR |
636 | %{_mandir}/man8/lpadmin.8* |
637 | %{_mandir}/man8/lpc.8* | |
638 | %{_mandir}/man8/lpinfo.8* | |
639 | %{_mandir}/man8/lpmove.8* | |
25802dee | 640 | %{_mandir}/man8/reject.8* |
2da56f05 | 641 | |
6ebf74dd | 642 | %files image-lib |
fd7e4ff1 | 643 | %defattr(644,root,root,755) |
6ebf74dd | 644 | %attr(755,root,root) %{_libdir}/libcupsimage.so.* |
fd7e4ff1 | 645 | |
980a97fe | 646 | %files devel |
647 | %defattr(644,root,root,755) | |
6e2c2519 | 648 | %attr(755,root,root) %{_bindir}/cups-config |
4e75f969 | 649 | %attr(755,root,root) %{_libdir}/libcups.so |
25802dee | 650 | %attr(755,root,root) %{_libdir}/libcupscgi.so |
4e75f969 | 651 | %attr(755,root,root) %{_libdir}/libcupsimage.so |
25802dee AM |
652 | %attr(755,root,root) %{_libdir}/libcupsmime.so |
653 | %attr(755,root,root) %{_libdir}/libcupsppdc.so | |
980a97fe | 654 | %{_includedir}/cups |
4e75f969 | 655 | %{_mandir}/man1/cups-config.1* |
980a97fe | 656 | |
373aff1e | 657 | %if %{with static_libs} |
8d2025a2 AM |
658 | %files static |
659 | %defattr(644,root,root,755) | |
4e75f969 | 660 | %{_libdir}/libcups.a |
25802dee | 661 | %{_libdir}/libcupscgi.a |
4e75f969 | 662 | %{_libdir}/libcupsimage.a |
25802dee AM |
663 | %{_libdir}/libcupsmime.a |
664 | %{_libdir}/libcupsppdc.a | |
373aff1e | 665 | %endif |
2e2308c6 | 666 | |
0f8ac12d AF |
667 | %files backend-usb |
668 | %defattr(644,root,root,755) | |
82f3f074 | 669 | %attr(755,root,root) %{_ulibdir}/cups/backend/usb |
885cd154 JR |
670 | %dir %{_datadir}/cups/usb |
671 | %{_datadir}/cups/usb/org.cups.usb-quirks | |
0f8ac12d | 672 | |
84d9a886 JR |
673 | %files lpd |
674 | %defattr(644,root,root,755) | |
a329855b | 675 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/cups-lpd |
84d9a886 JR |
676 | %attr(755,root,root) %{_ulibdir}/cups/daemon/cups-lpd |
677 | %{_mandir}/man8/cups-lpd.8* |