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