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