2 # "$Id: cups.spec.in 10558 2012-07-27 20:33:27Z mike $"
4 # RPM "spec" file for CUPS.
6 # Original version by Jason McMullan <jmcc@ontv.com>.
8 # Copyright 2007-2012 by Apple Inc.
9 # Copyright 1999-2007 by Easy Software Products, all rights reserved.
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/".
18 # Conditional build options (--with name/--without name):
20 # dbus - Enable/disable DBUS support (default = enable)
21 # dnssd - Enable/disable DNS-SD support (default = enable)
22 # static - Enable/disable static libraries (default = enable)
24 %{!?_with_dbus: %{!?_without_dbus: %define _with_dbus --with-dbus}}
25 %{?_with_dbus: %define _dbus --enable-dbus}
26 %{!?_with_dbus: %define _dbus --disable-dbus}
28 %{!?_with_dnssd: %{!?_without_dnssd: %define _with_dnssd --with-dnssd}}
29 %{?_with_dnssd: %define _dnssd --enable-dnssd}
30 %{!?_with_dnssd: %define _dnssd --disable-dnssd}
32 %{!?_with_static: %{!?_without_static: %define _without_static --without-static}}
33 %{?_with_static: %define _static --enable-static}
34 %{!?_with_static: %define _static --disable-static}
36 %define _unpackaged_files_terminate_build 0
42 License: GPLv2, LGPLv2
43 Group: System Environment/Daemons
44 Source: %{name}-%{version}.tar.gz
46 Patch01: network-backends-snmp-queries-optional.patch
47 Patch02: get-ppd-file-for-statically-configured-bonjour-shared-queues.patch
48 Patch03: usb-backend-reset-after-job-only-for-specific-devices.patch
49 Patch04: usb-backend-more-quirk-rules.patch
50 Patch05: printers-c-recognize-remote-cups-queue-via-dnssd-uri.patch
51 Patch06: avahi-not-considered-at-some-dnssd-conditionals.patch
52 Patch07: cupsd-conf-remove-obsolete-browse-directives.patch
53 Patch08: filter-out-all-control-characters-from-the-1284-device-id.patch
54 Patch09: ipp-backend-did-not-specify-the-compression-used.patch
55 Patch10: work-around-some-broken-ipp-printers.patch
56 Patch11: prevent-crash-due-to-null-host-name-or-fqdn-from-avahi.patch
57 Patch12: fix-crash-on-shutdown-caused-by-broken-avahi-config.patch
58 Patch13: fix-another-spot-where-avahi-crashes-cupsd-because-it-does-not-handle-null-values-from-its-own-apis.patch
59 Patch14: ipp-backend-abort-the-outer-loop-if-we-get-a-failure-from-send-document.patch
60 Patch15: ipp-backend-could-get-stuck-in-an-endless-loop-on-certain-network-errors.patch
61 Patch16: ipp-backend-did-not-send-cancel-request-to-printers-when-a-job-was-canceled-and-printer-did-not-support-create-job.patch
62 Patch17: get-ppd-file-for-statically-configured-ipp-shared-queues.patch
63 Patch18: pidfile.patch
64 Patch19: ppd-poll-with-client-conf.patch
65 Patch20: manpage-translations.patch
66 Patch21: rootbackends-worldreadable.patch
67 Patch22: airprint-support.patch
68 Patch23: removecvstag.patch
69 Patch24: no-conffile-timestamp.patch
70 Patch25: drop_unnecessary_dependencies.patch
71 Patch26: reactivate_recommended_driver.patch
72 Patch27: read-embedded-options-from-incoming-postscript-and-add-to-ipp-attrs.patch
73 Patch28: do-not-broadcast-with-hostnames.patch
74 Patch29: cups-deviced-allow-device-ids-with-newline.patch
75 Patch30: cups-snmp-oids-device-id-hp-ricoh.patch
76 Patch31: configure-default-browse-protocols.patch
77 Patch32: add-ipp-backend-of-cups-1.4.patch
78 Patch33: logfiles_adm_readable.patch
79 Patch34: default_log_settings.patch
80 Patch35: confdirperms.patch
81 Patch36: printer-filtering.patch
82 Patch37: show-compile-command-lines.patch
83 Patch38: ppdc-dynamic-linking.patch
84 Patch39: log-debug-history-nearly-unlimited.patch
85 Patch40: pstops-based-workflow-only-for-printing-ps-on-a-ps-printer.patch
86 Patch41: tests-ignore-warnings.patch
87 Patch42: tests-ignore-usb-crash.patch
88 Patch43: test-i18n-nonlinux.patch
89 Patch44: tests-slow-lpstat.patch
90 Patch45: forward-port-cups-1-5-x-cups-browsing.patch
91 Patch46: cupsd-no-crash-on-avahi-threaded-poll-shutdown.patch
92 Patch47: CVE-2012-5519.patch
95 Patch48: tizen_fix_build_error.patch
96 Patch49: tizen_fix_temp_path.patch
97 Patch50: tizen_set_configuration.patch
98 Patch51: tizen_fix_unable_to_locate_printer.patch
99 Patch52: tizen_fix_ps_progress.patch
100 Patch53: tizen_fix_unable_to_find_ipp_printer_temporarily.patch
101 Patch54: tizen_work_around_samsung_ipp_printer.patch
102 Patch55: tizen_fix_ignore_sigpipe.patch
103 Patch56: tizen_add_job_media_progress.patch
105 # Use buildroot so as not to disturb the version already installed
106 BuildRoot: /tmp/%{name}-root
109 Requires: %{name}-libs
111 Requires(post): eglibc
112 BuildRequires: pkgconfig(gnutls)
113 #BuildRequires: pkgconfig(libusb)
114 BuildRequires: libgcrypt-devel
115 BuildRequires: avahi-libs
116 BuildRequires: avahi-devel
117 #BuildRequires: pkgconfig(po4a)
118 Obsoletes: lpd, lpr, LPRng
119 Provides: lpd, lpr, LPRng
120 Obsoletes: cups-da, cups-de, cups-es, cups-et, cups-fi, cups-fr, cups-he
121 Obsoletes: cups-id, cups-it, cups-ja, cups-ko, cups-nl, cups-no, cups-pl
122 Obsoletes: cups-pt, cups-ru, cups-sv, cups-zh
125 Summary: CUPS - development environment
126 Group: Development/Libraries
127 Requires: %{name}-libs
130 Summary: CUPS - shared libraries
131 Group: System Environment/Libraries
134 %package -n cups-data
135 Summary: CUPS - shared libraries
136 Group: System Environment/Libraries
138 Requires: %{name}-libs
141 #Summary: CUPS - LPD support
142 #Group: System Environment/Daemons
143 #Requires: %{name} = %{epoch}:%{version} xinetd
146 CUPS is the standards-based, open source printing system developed by
147 Apple Inc. for OS X and other UNIX®-like operating systems.
150 This package provides the CUPS headers and development environment.
153 This package provides the CUPS shared libraries.
155 %description -n cups-data
156 This package provides CUPS configuration files
159 #This package provides LPD client support.
225 --localedir=/usr/share/cups/locale \
226 --sysconfdir=/usr/etc \
227 --localstatedir=/opt/var \
231 --disable-tcp-wrappers \
235 --disable-unit-tests \
240 --enable-debug-printfs \
250 --enable-raw-printing \
251 --without-java --without-php --without-python --without-perl --disable-webif \
252 --with-languages=en --without-smfmanifestdir \
253 --with-local_protocols='dnssd' --without-printcap \
254 --with-remote_protocols='dnssd' --with-log-level=debug --with-system-groups=system,root
256 # If we got this far, all prerequisite libraries must be here.
260 # Make sure the RPM_BUILD_ROOT directory exists.
261 rm -rf $RPM_BUILD_ROOT
263 make BUILDROOT=$RPM_BUILD_ROOT install
265 mkdir -p %{buildroot}/usr/share/license
266 cp %{_builddir}/%{buildsubdir}/LICENSE.txt %{buildroot}/usr/share/license/cups-libs
267 cp %{_builddir}/%{buildsubdir}/LICENSE.txt %{buildroot}/usr/share/license/cups-data
268 cp %{_builddir}/%{buildsubdir}/LICENSE.txt %{buildroot}/usr/share/license/cups
271 #if [ ! -z "`getent group app`" ]; then
272 chown -R 5000:5000 /usr/lib/cups/backend/*
276 mkdir -p /opt/var/run/cups
277 if [ -f /usr/lib/rpm-plugins/msm.so ]
279 chsmack -a _ /opt/var/run
280 chsmack -a mobileprint /opt/var/run/cups
283 mkdir -p /opt/etc/cups/ssl
284 mkdir -p /opt/var/spool/
285 mkdir -p /opt/var/spool/cups/
286 mkdir -p /opt/var/spool/cups/tmp
287 mkdir -p /opt/var/cache/cups
288 mkdir -p /opt/var/log/cups
290 if [ -f /usr/lib/rpm-plugins/msm.so ]
292 chsmack -a mobileprint /opt/etc/cups/ssl
293 chsmack -a mobileprint /opt/var/spool/
294 chsmack -a mobileprint /opt/var/spool/cups/
295 chsmack -a mobileprint /opt/var/spool/cups/tmp
296 chsmack -a mobileprint /opt/var/cache/cups
297 chsmack -a mobileprint /opt/var/log/cups
300 #if [ ! -z "`getent group app`" ]; then
301 chown -R 5000:5000 /opt/etc/cups/
302 chown -R 5000:5000 /opt/var/run/cups/
303 chown -R 5000:5000 /opt/var/spool/cups/
304 chown -R 5000:5000 /opt/var/cache/cups/
305 chown -R 5000:5000 /opt/var/log/cups/
306 chown -R 5000:5000 /usr/lib/cups/backend/*
309 if [ -f /usr/lib/rpm-plugins/msm.so ]
311 chsmack -a mobileprint /opt/etc/cups/
312 chsmack -t /opt/etc/cups/
313 chsmack -a mobileprint /opt/etc/cups/ssl
316 # Deal with config migration due to CVE-2012-5519 (STR #4223)
317 IN=/usr/etc/cups/cupsd.conf
318 OUT=/usr/etc/cups/cups-files.conf
320 for keyword in AccessLog CacheDir ConfigFilePerm \
321 DataDir DocumentRoot ErrorLog FatalErrors \
322 FileDevice FontPath Group LogFilePerm \
323 LPDConfigFile PageLog Printcap PrintcapFormat \
324 RemoteRoot RequestRoot ServerBin ServerCertificate \
325 ServerKey ServerRoot SMBConfigFile StateDir \
326 SystemGroup SystemGroupAuthKey TempDir User; do
327 if ! /bin/grep -iq ^$keyword "$IN"; then continue; fi
329 if /bin/grep -iq ^$keyword "$OUT"; then
330 if [ "`/bin/grep -i ^$keyword "$IN"`" == \
331 "`/bin/grep -i ^$keyword "$OUT"`" ]; then
334 /bin/sed -i -e "s,^$keyword,#$keyword,i" "$OUT" || :
337 if [ "$copy" == "yes" ]; then
338 if [ "$copiedany" == "no" ]; then
341 # Settings automatically moved from cupsd.conf by RPM package:
346 (/bin/grep -i ^$keyword "$IN" >> "$OUT") || :
350 /bin/sed -i -e "s,^$keyword,#$keyword,i" "$IN" || :
361 rm -rf $RPM_BUILD_ROOT
364 %manifest cups.manifest
365 #%docdir /usr/share/doc/cups
366 %defattr(-,root,root)
367 /usr/share/license/%{name}
369 #%if %{?_with_dbus:1}%{!?_with_dbus:0}
371 #/etc/dbus-1/system.d/*
378 # RC dirs are a pain under Linux... Uncomment the appropriate ones if you
379 # don't use Red Hat or Mandrake...
387 # OLD RedHat/Mandrake
408 %attr(0755,root,root) %dir /usr/lib/cups
409 %attr(0755,root,root) %dir /usr/lib/cups/backend
410 /usr/lib/cups/backend/dnssd
411 /usr/lib/cups/backend/http
412 /usr/lib/cups/backend/https
413 /usr/lib/cups/backend/ipp
414 /usr/lib/cups/backend/ipp14
415 /usr/lib/cups/backend/ipps
416 /usr/lib/cups/backend/lpd
418 /usr/lib/cups/backend/snmp
419 /usr/lib/cups/backend/socket
420 /usr/lib/cups/backend/usb
421 %exclude %attr(0755,root,root) %dir /usr/lib/cups/cgi-bin
422 %exclude /usr/lib/cups/cgi-bin/*
423 %attr(0755,root,root) %dir /usr/lib/cups/daemon
424 /usr/lib/cups/daemon/cups-deviced
425 /usr/lib/cups/daemon/cups-driverd
426 /usr/lib/cups/daemon/cups-exec
427 /usr/lib/cups/daemon/cups-polld
428 %dir /usr/lib/cups/driver
429 %attr(0755,root,root) %dir /usr/lib/cups/filter
430 /usr/lib/cups/filter/*
431 %exclude /usr/lib/cups/filter/rastertodymo
432 %exclude /usr/lib/cups/filter/rastertoepson
433 %exclude /usr/lib/cups/filter/rastertohp
434 %exclude /usr/lib/cups/filter/rastertolabel
435 %attr(0755,root,root) %dir /usr/lib/cups/monitor
436 /usr/lib/cups/monitor/*
437 %attr(0755,root,root) %dir /usr/lib/cups/notifier
438 %exclude /usr/lib/cups/notifier/*
439 %attr(0755, root, root) /usr/sbin/cupsaccept
440 %attr(0755, root, root) /usr/sbin/cupsaddsmb
441 %attr(0755, root, root) /usr/sbin/cupsctl
442 %attr(0755, root, root) /usr/sbin/cupsd
443 %attr(0755, root, root) /usr/sbin/cupsfilter
444 %attr(0755, root, root) /usr/sbin/lpadmin
445 %attr(0755, root, root) /usr/sbin/lpc
446 %attr(0755, root, root) /usr/sbin/lpinfo
447 %attr(0755, root, root) /usr/sbin/lpmove
448 %attr(-,root,root) %dir /usr/share/cups
449 #%dir /usr/share/cups/charsets
450 #/usr/share/cups/charsets/*
451 %dir /usr/share/cups/mime
452 /usr/share/cups/mime/*
453 %dir /usr/share/cups/model
454 %dir /usr/share/cups/ppdc
455 /usr/share/cups/ppdc/*
458 %manifest cups-libs.manifest
459 %defattr(-,root,root)
460 /usr/share/license/cups-libs
464 %defattr(-,root,root)
465 %{_bindir}/cups-config
468 /usr/share/cups/ipptool/*
469 /usr/lib/cups/backend/pseudo
472 %manifest cups-data.manifest
473 %defattr(-,root,root)
474 /usr/share/license/cups-data
476 %dir /usr/etc/cups/interfaces
477 %attr(0755,app,app) %dir /opt/var/cache/cups
478 %attr(0775,app,app) %dir /opt/var/cache/cups/rss
479 %attr(0755,app,app) %dir /opt/var/log/cups
480 %attr(0755,app,app) %dir /opt/var/run/cups
481 %attr(0711,app,app) %dir /opt/var/run/cups/certs
482 %attr(0755,app,app) %dir /opt/var/spool/cups
483 %attr(1777,app,app) %dir /opt/var/spool/cups/tmp
487 #/opt/etc/xinetd.d/cups-lpd
489 #%dir /usr/lib/cups/daemon
490 #/usr/lib/cups/daemon/cups-lpd
491 #%dir /usr/share/man/man8
492 #/usr/share/man/man8/cups-lpd.8.gz
496 # End of "$Id: cups.spec.in 10558 2012-07-27 20:33:27Z mike $".