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