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