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