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