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