]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
b34254bc | 2 | # "$Id$" |
ef416fc2 | 3 | # |
7f5ce42e | 4 | # RPM "spec" file for CUPS. |
ef416fc2 | 5 | # |
7f5ce42e | 6 | # Original version by Jason McMullan <jmcc@ontv.com>. |
ef416fc2 | 7 | # |
46cc8b81 | 8 | # Copyright 2007-2014 by Apple Inc. |
7f5ce42e | 9 | # Copyright 1999-2007 by Easy Software Products, all rights reserved. |
ef416fc2 | 10 | # |
7f5ce42e MS |
11 | # These coded instructions, statements, and computer programs are the |
12 | # property of Apple Inc. and are protected by Federal copyright | |
13 | # law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
14 | # which should have been included with this file. If this file is | |
15 | # file is missing or damaged, see the license at "http://www.cups.org/". | |
ef416fc2 | 16 | # |
17 | ||
ecdc0628 | 18 | # Conditional build options (--with name/--without name): |
19 | # | |
20 | # dbus - Enable/disable DBUS support (default = enable) | |
f3c17241 | 21 | # dnssd - Enable/disable DNS-SD support (default = enable) |
7f5ce42e | 22 | # libusb1 - Enable/disable LIBUSB 1.0 support (default = enable) |
f3c17241 | 23 | # static - Enable/disable static libraries (default = enable) |
ecdc0628 | 24 | |
25 | %{!?_with_dbus: %{!?_without_dbus: %define _with_dbus --with-dbus}} | |
26 | %{?_with_dbus: %define _dbus --enable-dbus} | |
27 | %{!?_with_dbus: %define _dbus --disable-dbus} | |
28 | ||
37e7e6e0 | 29 | %{!?_with_dnssd: %{!?_without_dnssd: %define _with_dnssd --with-dnssd}} |
f3c17241 MS |
30 | %{?_with_dnssd: %define _dnssd --enable-dnssd} |
31 | %{!?_with_dnssd: %define _dnssd --disable-dnssd} | |
32 | ||
7f5ce42e MS |
33 | %{!?_with_libusb1: %{!?_without_libusb1: %define _with_libusb1 --with-libusb1}} |
34 | %{?_with_libusb1: %define _libusb1 --enable-libusb} | |
35 | %{!?_with_libusb1: %define _libusb1 --disable-libusb} | |
36 | ||
d6ae789d | 37 | %{!?_with_static: %{!?_without_static: %define _without_static --without-static}} |
38 | %{?_with_static: %define _static --enable-static} | |
39 | %{!?_with_static: %define _static --disable-static} | |
40 | ||
8c29c890 MS |
41 | %{!?_with_systemd: %{!?_without_systemd: %define _with_systemd --with-systemd}} |
42 | %{?_with_systemd: %define _systemd --enable-systemd} | |
43 | %{!?_with_systemd: %define _systemd --disable-systemd} | |
44 | ||
9aff70cc | 45 | Summary: CUPS |
ef416fc2 | 46 | Name: cups |
47 | Version: @CUPS_VERSION@ | |
48 | Release: 0 | |
49 | Epoch: 1 | |
50 | License: GPL | |
51 | Group: System Environment/Daemons | |
f3c17241 | 52 | Source: http://ftp.cups.org/pub/cups/%{version}/cups-%{version}-source.tar.bz2 |
ef416fc2 | 53 | Url: http://www.cups.org |
54 | Packager: Anonymous <anonymous@foo.com> | |
bc44d920 | 55 | Vendor: Apple Inc. |
ef416fc2 | 56 | |
7f5ce42e | 57 | # Package names are as defined for Red Hat (and clone) distributions |
93aa5239 MS |
58 | BuildRequires: gnutls-devel, pam-devel |
59 | ||
7f5ce42e MS |
60 | %if %{?_with_dbus:1}%{!?_with_dbus:0} |
61 | BuildRequires: dbus-devel | |
62 | %endif | |
63 | ||
64 | %if %{?_with_dnssd:1}%{!?_with_dnssd:0} | |
65 | BuildRequires: avahi-devel | |
66 | %endif | |
67 | ||
68 | %if %{?_with_libusb1:1}%{!?_with_libusb1:0} | |
69 | BuildRequires: libusbx-devel | |
70 | %endif | |
71 | ||
8c29c890 MS |
72 | %if %{?_with_systemd:1}%{!?_with_systemd:0} |
73 | BuildRequires: systemd-devel | |
74 | %endif | |
75 | ||
ef416fc2 | 76 | # Use buildroot so as not to disturb the version already installed |
77 | BuildRoot: /tmp/%{name}-root | |
78 | ||
79 | # Dependencies... | |
80 | Requires: %{name}-libs = %{epoch}:%{version} | |
81 | Obsoletes: lpd, lpr, LPRng | |
82 | Provides: lpd, lpr, LPRng | |
75bd9771 MS |
83 | Obsoletes: cups-da, cups-de, cups-es, cups-et, cups-fi, cups-fr, cups-he |
84 | Obsoletes: cups-id, cups-it, cups-ja, cups-ko, cups-nl, cups-no, cups-pl | |
85 | Obsoletes: cups-pt, cups-ru, cups-sv, cups-zh | |
ef416fc2 | 86 | |
87 | %package devel | |
9aff70cc | 88 | Summary: CUPS - development environment |
ef416fc2 | 89 | Group: Development/Libraries |
90 | Requires: %{name}-libs = %{epoch}:%{version} | |
91 | ||
92 | %package libs | |
9aff70cc | 93 | Summary: CUPS - shared libraries |
ef416fc2 | 94 | Group: System Environment/Libraries |
95 | Provides: libcups1 | |
96 | ||
97 | %package lpd | |
9aff70cc | 98 | Summary: CUPS - LPD support |
ef416fc2 | 99 | Group: System Environment/Daemons |
100 | Requires: %{name} = %{epoch}:%{version} xinetd | |
101 | ||
102 | %description | |
9aff70cc | 103 | CUPS is the standards-based, open source printing system developed by |
f3c17241 | 104 | Apple Inc. for OS X and other UNIX®-like operating systems. |
ef416fc2 | 105 | |
106 | %description devel | |
9aff70cc | 107 | This package provides the CUPS headers and development environment. |
ef416fc2 | 108 | |
109 | %description libs | |
9aff70cc | 110 | This package provides the CUPS shared libraries. |
ef416fc2 | 111 | |
112 | %description lpd | |
9aff70cc | 113 | This package provides LPD client support. |
ef416fc2 | 114 | |
115 | %prep | |
116 | %setup | |
117 | ||
118 | %build | |
e1d6a774 | 119 | CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_OPT_FLAGS" \ |
7f5ce42e | 120 | ./configure %{_dbus} %{_dnssd} %{_libusb1} %{_static} |
ef416fc2 | 121 | # If we got this far, all prerequisite libraries must be here. |
122 | make | |
123 | ||
124 | %install | |
125 | # Make sure the RPM_BUILD_ROOT directory exists. | |
126 | rm -rf $RPM_BUILD_ROOT | |
127 | ||
128 | make BUILDROOT=$RPM_BUILD_ROOT install | |
129 | ||
130 | %post | |
bd7854cb | 131 | /sbin/chkconfig --add cups |
132 | /sbin/chkconfig cups on | |
ef416fc2 | 133 | |
bd7854cb | 134 | # Restart cupsd if we are upgrading... |
135 | if test $1 -gt 1; then | |
136 | /sbin/service cups stop | |
137 | /sbin/service cups start | |
ef416fc2 | 138 | fi |
139 | ||
bd7854cb | 140 | %post libs |
141 | /sbin/ldconfig | |
ef416fc2 | 142 | |
143 | %preun | |
bd7854cb | 144 | if test $1 = 0; then |
145 | /sbin/service cups stop | |
146 | /sbin/chkconfig --del cups | |
ef416fc2 | 147 | fi |
148 | ||
bd7854cb | 149 | %postun |
150 | if test $1 -ge 1; then | |
151 | /sbin/service cups stop | |
152 | /sbin/service cups start | |
ef416fc2 | 153 | fi |
154 | ||
bd7854cb | 155 | %postun libs |
156 | /sbin/ldconfig | |
157 | ||
ef416fc2 | 158 | %clean |
159 | rm -rf $RPM_BUILD_ROOT | |
160 | ||
161 | %files | |
bd7854cb | 162 | %docdir /usr/share/doc/cups |
ef416fc2 | 163 | %defattr(-,root,root) |
164 | %dir /etc/cups | |
165 | %config(noreplace) /etc/cups/*.conf | |
fa73b229 | 166 | /etc/cups/cupsd.conf.default |
ef416fc2 | 167 | %dir /etc/cups/interfaces |
ef416fc2 | 168 | %dir /etc/cups/ppd |
8ca02f3c | 169 | %attr(0700,root,root) %dir /etc/cups/ssl |
bd7854cb | 170 | |
ecdc0628 | 171 | %if %{?_with_dbus:1}%{!?_with_dbus:0} |
bd7854cb | 172 | # DBUS |
173 | /etc/dbus-1/system.d/* | |
ecdc0628 | 174 | %endif |
bd7854cb | 175 | |
176 | # PAM | |
ef416fc2 | 177 | %dir /etc/pam.d |
178 | /etc/pam.d/* | |
179 | ||
8c29c890 MS |
180 | %if %{?_with_systemd:1}%{!?_with_systemd:0} |
181 | # SystemD | |
182 | /usr/lib/systemd/system/* | |
ef416fc2 | 183 | |
8c29c890 MS |
184 | %else |
185 | # Legacy init support on Linux | |
ef416fc2 | 186 | /etc/init.d/* |
187 | /etc/rc0.d/* | |
188 | /etc/rc2.d/* | |
189 | /etc/rc3.d/* | |
190 | /etc/rc5.d/* | |
8c29c890 | 191 | %endif |
ef416fc2 | 192 | |
193 | /usr/bin/cancel | |
80ca4592 | 194 | /usr/bin/cupstestdsc |
ef416fc2 | 195 | /usr/bin/cupstestppd |
ad0357ca | 196 | /usr/bin/ippfind |
aaf19ab0 | 197 | /usr/bin/ipptool |
ef416fc2 | 198 | /usr/bin/lp* |
199 | %dir /usr/lib/cups | |
200 | %dir /usr/lib/cups/backend | |
f3c17241 | 201 | %if %{?_with_dnssd:1}%{!?_with_dnssd:0} |
37e7e6e0 | 202 | # DNS-SD |
f3c17241 MS |
203 | /usr/lib/cups/backend/dnssd |
204 | %endif | |
e00b005a | 205 | /usr/lib/cups/backend/http |
f99f3698 | 206 | /usr/lib/cups/backend/https |
7ff4fea9 | 207 | %attr(0700,root,root) /usr/lib/cups/backend/ipp |
f99f3698 | 208 | /usr/lib/cups/backend/ipps |
e00b005a | 209 | %attr(0700,root,root) /usr/lib/cups/backend/lpd |
89d46774 | 210 | /usr/lib/cups/backend/snmp |
4400e98d | 211 | /usr/lib/cups/backend/socket |
e00b005a | 212 | /usr/lib/cups/backend/usb |
ef416fc2 | 213 | %dir /usr/lib/cups/cgi-bin |
214 | /usr/lib/cups/cgi-bin/* | |
215 | %dir /usr/lib/cups/daemon | |
216 | /usr/lib/cups/daemon/cups-deviced | |
217 | /usr/lib/cups/daemon/cups-driverd | |
f99f3698 | 218 | /usr/lib/cups/daemon/cups-exec |
ef416fc2 | 219 | %dir /usr/lib/cups/driver |
220 | %dir /usr/lib/cups/filter | |
221 | /usr/lib/cups/filter/* | |
bd7854cb | 222 | %dir /usr/lib/cups/monitor |
223 | /usr/lib/cups/monitor/* | |
ef416fc2 | 224 | %dir /usr/lib/cups/notifier |
225 | /usr/lib/cups/notifier/* | |
226 | ||
227 | /usr/sbin/* | |
228 | %dir /usr/share/cups | |
d6ae789d | 229 | %dir /usr/share/cups/banners |
230 | /usr/share/cups/banners/* | |
d6ae789d | 231 | %dir /usr/share/cups/data |
232 | /usr/share/cups/data/* | |
634763e8 MS |
233 | %dir /usr/share/cups/drv |
234 | /usr/share/cups/drv/* | |
aaf19ab0 MS |
235 | %dir /usr/share/cups/ipptool |
236 | /usr/share/cups/ipptool/* | |
dd1abb6b MS |
237 | %dir /usr/share/cups/mime |
238 | /usr/share/cups/mime/* | |
d6ae789d | 239 | %dir /usr/share/cups/model |
ac884b6a MS |
240 | %dir /usr/share/cups/ppdc |
241 | /usr/share/cups/ppdc/* | |
d6ae789d | 242 | %dir /usr/share/cups/templates |
634763e8 | 243 | /usr/share/cups/templates/* |
46cc8b81 | 244 | %if %{?_with_libusb1:1}%{!?_with_libusb1:0} |
7f5ce42e | 245 | # LIBUSB quirks files |
89a65306 MS |
246 | %dir /usr/share/cups/usb |
247 | /usr/share/cups/usb/* | |
7f5ce42e | 248 | %endif |
89a65306 | 249 | |
ef416fc2 | 250 | %dir /usr/share/doc/cups |
251 | /usr/share/doc/cups/*.* | |
252 | %dir /usr/share/doc/cups/help | |
09a101d6 | 253 | /usr/share/doc/cups/help/accounting.html |
4744bd90 | 254 | /usr/share/doc/cups/help/cgi.html |
255 | /usr/share/doc/cups/help/glossary.html | |
355e94dc | 256 | /usr/share/doc/cups/help/kerberos.html |
4744bd90 | 257 | /usr/share/doc/cups/help/license.html |
ef416fc2 | 258 | /usr/share/doc/cups/help/man-*.html |
259 | /usr/share/doc/cups/help/network.html | |
4744bd90 | 260 | /usr/share/doc/cups/help/options.html |
ef416fc2 | 261 | /usr/share/doc/cups/help/overview.html |
8ca02f3c | 262 | /usr/share/doc/cups/help/policies.html |
4744bd90 | 263 | /usr/share/doc/cups/help/ref-*.html |
264 | /usr/share/doc/cups/help/security.html | |
d2354e63 | 265 | /usr/share/doc/cups/help/sharing.html |
4744bd90 | 266 | /usr/share/doc/cups/help/translation.html |
ef416fc2 | 267 | /usr/share/doc/cups/help/whatsnew.html |
268 | %dir /usr/share/doc/cups/images | |
269 | /usr/share/doc/cups/images/* | |
37e7e6e0 | 270 | |
8c29c890 MS |
271 | #%dir /usr/share/doc/cups/ca |
272 | #/usr/share/doc/cups/ca/* | |
273 | #%dir /usr/share/doc/cups/cs | |
274 | #/usr/share/doc/cups/cs/* | |
275 | #%dir /usr/share/doc/cups/es | |
276 | #/usr/share/doc/cups/es/* | |
277 | #%dir /usr/share/doc/cups/fr | |
278 | #/usr/share/doc/cups/fr/* | |
279 | #%dir /usr/share/doc/cups/ja | |
280 | #/usr/share/doc/cups/ja/* | |
281 | #%dir /usr/share/doc/cups/ru | |
282 | #/usr/share/doc/cups/ru/* | |
283 | ||
071b2906 MS |
284 | %dir /usr/share/locale/ca |
285 | /usr/share/locale/ca/cups_ca.po | |
286 | %dir /usr/share/locale/cs | |
287 | /usr/share/locale/cs/cups_cs.po | |
288 | %dir /usr/share/locale/es | |
289 | /usr/share/locale/es/cups_es.po | |
290 | %dir /usr/share/locale/fr | |
291 | /usr/share/locale/fr/cups_fr.po | |
292 | %dir /usr/share/locale/ja | |
293 | /usr/share/locale/ja/cups_ja.po | |
294 | %dir /usr/share/locale/ru | |
295 | /usr/share/locale/ru/cups_ru.po | |
ef416fc2 | 296 | |
297 | %dir /usr/share/man/man1 | |
298 | /usr/share/man/man1/cancel.1.gz | |
80ca4592 | 299 | /usr/share/man/man1/cupstestdsc.1.gz |
ef416fc2 | 300 | /usr/share/man/man1/cupstestppd.1.gz |
ad0357ca | 301 | /usr/share/man/man1/ippfind.1.gz |
aaf19ab0 | 302 | /usr/share/man/man1/ipptool.1.gz |
ef416fc2 | 303 | /usr/share/man/man1/lp.1.gz |
304 | /usr/share/man/man1/lpoptions.1.gz | |
305 | /usr/share/man/man1/lppasswd.1.gz | |
306 | /usr/share/man/man1/lpq.1.gz | |
307 | /usr/share/man/man1/lpr.1.gz | |
308 | /usr/share/man/man1/lprm.1.gz | |
309 | /usr/share/man/man1/lpstat.1.gz | |
310 | %dir /usr/share/man/man5 | |
ac884b6a | 311 | /usr/share/man/man5/*.conf.5.gz |
aaf19ab0 | 312 | /usr/share/man/man5/ipptoolfile.5.gz |
ac884b6a | 313 | /usr/share/man/man5/mime.*.5.gz |
ef416fc2 | 314 | %dir /usr/share/man/man8 |
315 | /usr/share/man/man8/accept.8.gz | |
316 | /usr/share/man/man8/cupsaddsmb.8.gz | |
1f6f3dbc | 317 | /usr/share/man/man8/cupsaccept.8.gz |
bc44d920 | 318 | /usr/share/man/man8/cupsctl.8.gz |
355e94dc | 319 | /usr/share/man/man8/cupsfilter.8.gz |
ef416fc2 | 320 | /usr/share/man/man8/cupsd.8.gz |
321 | /usr/share/man/man8/cupsdisable.8.gz | |
322 | /usr/share/man/man8/cupsenable.8.gz | |
1f6f3dbc | 323 | /usr/share/man/man8/cupsreject.8.gz |
bd7854cb | 324 | /usr/share/man/man8/cups-deviced.8.gz |
325 | /usr/share/man/man8/cups-driverd.8.gz | |
37e7e6e0 | 326 | /usr/share/man/man8/cups-snmp.8.gz |
ef416fc2 | 327 | /usr/share/man/man8/lpadmin.8.gz |
328 | /usr/share/man/man8/lpc.8.gz | |
329 | /usr/share/man/man8/lpinfo.8.gz | |
330 | /usr/share/man/man8/lpmove.8.gz | |
331 | /usr/share/man/man8/reject.8.gz | |
332 | ||
333 | %dir /var/cache/cups | |
f7deaa1a | 334 | %attr(0775,root,sys) %dir /var/cache/cups/rss |
ef416fc2 | 335 | %dir /var/log/cups |
336 | %dir /var/run/cups | |
bd7854cb | 337 | %attr(0711,lp,sys) %dir /var/run/cups/certs |
338 | %attr(0710,lp,sys) %dir /var/spool/cups | |
339 | %attr(1770,lp,sys) %dir /var/spool/cups/tmp | |
ef416fc2 | 340 | |
e1d6a774 | 341 | # Desktop files |
342 | /usr/share/applications/* | |
343 | /usr/share/icons/* | |
344 | ||
ef416fc2 | 345 | %files devel |
346 | %defattr(-,root,root) | |
e6013cfa MS |
347 | %dir /usr/share/cups/examples |
348 | /usr/share/cups/examples/* | |
ef416fc2 | 349 | %dir /usr/share/man/man1 |
ef416fc2 | 350 | /usr/share/man/man1/cups-config.1.gz |
ac884b6a MS |
351 | /usr/share/man/man1/ppd*.1.gz |
352 | %dir /usr/share/man/man5 | |
353 | /usr/share/man/man5/ppdcfile.5.gz | |
354 | /usr/share/man/man7/backend.7.gz | |
355 | /usr/share/man/man7/filter.7.gz | |
178cb736 | 356 | /usr/share/man/man7/notifier.7.gz |
ef416fc2 | 357 | |
358 | /usr/bin/cups-config | |
ac884b6a | 359 | /usr/bin/ppd* |
ef416fc2 | 360 | %dir /usr/include/cups |
361 | /usr/include/cups/* | |
e1d6a774 | 362 | /usr/lib*/*.so |
ef416fc2 | 363 | |
d6ae789d | 364 | %if %{?_with_static:1}%{!?_with_static:0} |
365 | /usr/lib*/*.a | |
366 | %endif | |
367 | ||
ef416fc2 | 368 | %dir /usr/share/doc/cups/help |
369 | /usr/share/doc/cups/help/api*.html | |
e6013cfa MS |
370 | /usr/share/doc/cups/help/postscript-driver.html |
371 | /usr/share/doc/cups/help/ppd-compiler.html | |
372 | /usr/share/doc/cups/help/raster-driver.html | |
ef416fc2 | 373 | /usr/share/doc/cups/help/spec*.html |
374 | ||
375 | %files libs | |
376 | %defattr(-,root,root) | |
e1d6a774 | 377 | /usr/lib*/*.so.* |
ef416fc2 | 378 | |
379 | %files lpd | |
380 | %defattr(-,root,root) | |
e1d6a774 | 381 | /etc/xinetd.d/cups-lpd |
ef416fc2 | 382 | %dir /usr/lib/cups |
383 | %dir /usr/lib/cups/daemon | |
384 | /usr/lib/cups/daemon/cups-lpd | |
385 | %dir /usr/share/man/man8 | |
386 | /usr/share/man/man8/cups-lpd.8.gz | |
387 | ||
b423cd4c | 388 | |
ef416fc2 | 389 | # |
b34254bc | 390 | # End of "$Id$". |
ef416fc2 | 391 | # |