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