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