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