]> git.ipfire.org Git - thirdparty/cups.git/blame - packaging/cups.spec.in
Red Hat renamed the libusb developer package (again).
[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#
46cc8b81 8# Copyright 2007-2014 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)
ecdc0628 24
25%{!?_with_dbus: %{!?_without_dbus: %define _with_dbus --with-dbus}}
26%{?_with_dbus: %define _dbus --enable-dbus}
27%{!?_with_dbus: %define _dbus --disable-dbus}
28
37e7e6e0 29%{!?_with_dnssd: %{!?_without_dnssd: %define _with_dnssd --with-dnssd}}
f3c17241
MS
30%{?_with_dnssd: %define _dnssd --enable-dnssd}
31%{!?_with_dnssd: %define _dnssd --disable-dnssd}
32
7f5ce42e
MS
33%{!?_with_libusb1: %{!?_without_libusb1: %define _with_libusb1 --with-libusb1}}
34%{?_with_libusb1: %define _libusb1 --enable-libusb}
35%{!?_with_libusb1: %define _libusb1 --disable-libusb}
36
d6ae789d 37%{!?_with_static: %{!?_without_static: %define _without_static --without-static}}
38%{?_with_static: %define _static --enable-static}
39%{!?_with_static: %define _static --disable-static}
40
8c29c890
MS
41%{!?_with_systemd: %{!?_without_systemd: %define _with_systemd --with-systemd}}
42%{?_with_systemd: %define _systemd --enable-systemd}
43%{!?_with_systemd: %define _systemd --disable-systemd}
44
9aff70cc 45Summary: CUPS
ef416fc2 46Name: cups
47Version: @CUPS_VERSION@
48Release: 0
49Epoch: 1
50License: GPL
51Group: System Environment/Daemons
f3c17241 52Source: http://ftp.cups.org/pub/cups/%{version}/cups-%{version}-source.tar.bz2
ef416fc2 53Url: http://www.cups.org
54Packager: Anonymous <anonymous@foo.com>
bc44d920 55Vendor: Apple Inc.
ef416fc2 56
7f5ce42e 57# Package names are as defined for Red Hat (and clone) distributions
93aa5239
MS
58BuildRequires: gnutls-devel, pam-devel
59
7f5ce42e
MS
60%if %{?_with_dbus:1}%{!?_with_dbus:0}
61BuildRequires: dbus-devel
62%endif
63
64%if %{?_with_dnssd:1}%{!?_with_dnssd:0}
65BuildRequires: avahi-devel
66%endif
67
68%if %{?_with_libusb1:1}%{!?_with_libusb1:0}
995b120a 69BuildRequires: libusb-devel >= 1.0
7f5ce42e
MS
70%endif
71
8c29c890
MS
72%if %{?_with_systemd:1}%{!?_with_systemd:0}
73BuildRequires: systemd-devel
74%endif
75
ef416fc2 76# Use buildroot so as not to disturb the version already installed
77BuildRoot: /tmp/%{name}-root
78
79# Dependencies...
80Requires: %{name}-libs = %{epoch}:%{version}
81Obsoletes: lpd, lpr, LPRng
82Provides: lpd, lpr, LPRng
75bd9771
MS
83Obsoletes: cups-da, cups-de, cups-es, cups-et, cups-fi, cups-fr, cups-he
84Obsoletes: cups-id, cups-it, cups-ja, cups-ko, cups-nl, cups-no, cups-pl
85Obsoletes: cups-pt, cups-ru, cups-sv, cups-zh
ef416fc2 86
87%package devel
9aff70cc 88Summary: CUPS - development environment
ef416fc2 89Group: Development/Libraries
90Requires: %{name}-libs = %{epoch}:%{version}
91
92%package libs
9aff70cc 93Summary: CUPS - shared libraries
ef416fc2 94Group: System Environment/Libraries
95Provides: libcups1
96
97%package lpd
9aff70cc 98Summary: CUPS - LPD support
ef416fc2 99Group: System Environment/Daemons
100Requires: %{name} = %{epoch}:%{version} xinetd
101
102%description
9aff70cc 103CUPS is the standards-based, open source printing system developed by
f3c17241 104Apple Inc. for OS X and other UNIX®-like operating systems.
ef416fc2 105
106%description devel
9aff70cc 107This package provides the CUPS headers and development environment.
ef416fc2 108
109%description libs
9aff70cc 110This package provides the CUPS shared libraries.
ef416fc2 111
112%description lpd
9aff70cc 113This package provides LPD client support.
ef416fc2 114
115%prep
116%setup
117
118%build
e1d6a774 119CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_OPT_FLAGS" \
7f5ce42e 120 ./configure %{_dbus} %{_dnssd} %{_libusb1} %{_static}
ef416fc2 121# If we got this far, all prerequisite libraries must be here.
122make
123
124%install
125# Make sure the RPM_BUILD_ROOT directory exists.
126rm -rf $RPM_BUILD_ROOT
127
128make BUILDROOT=$RPM_BUILD_ROOT install
ab428cc0 129rm -rf $RPM_BUILD_ROOT/usr/share/cups/banners $RPM_BUILD_ROOT/usr/share/cups/data
ef416fc2 130
131%post
bd7854cb 132/sbin/chkconfig --add cups
133/sbin/chkconfig cups on
ef416fc2 134
bd7854cb 135# Restart cupsd if we are upgrading...
136if test $1 -gt 1; then
137 /sbin/service cups stop
138 /sbin/service cups start
ef416fc2 139fi
140
bd7854cb 141%post libs
142/sbin/ldconfig
ef416fc2 143
144%preun
bd7854cb 145if test $1 = 0; then
146 /sbin/service cups stop
147 /sbin/chkconfig --del cups
ef416fc2 148fi
149
bd7854cb 150%postun
151if test $1 -ge 1; then
152 /sbin/service cups stop
153 /sbin/service cups start
ef416fc2 154fi
155
bd7854cb 156%postun libs
157/sbin/ldconfig
158
ef416fc2 159%clean
160rm -rf $RPM_BUILD_ROOT
161
162%files
bd7854cb 163%docdir /usr/share/doc/cups
ef416fc2 164%defattr(-,root,root)
165%dir /etc/cups
166%config(noreplace) /etc/cups/*.conf
fa73b229 167/etc/cups/cupsd.conf.default
ef416fc2 168%dir /etc/cups/interfaces
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
183/usr/lib/systemd/system/*
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
252/usr/share/doc/cups/help/glossary.html
355e94dc 253/usr/share/doc/cups/help/kerberos.html
4744bd90 254/usr/share/doc/cups/help/license.html
ef416fc2 255/usr/share/doc/cups/help/man-*.html
256/usr/share/doc/cups/help/network.html
4744bd90 257/usr/share/doc/cups/help/options.html
ef416fc2 258/usr/share/doc/cups/help/overview.html
8ca02f3c 259/usr/share/doc/cups/help/policies.html
4744bd90 260/usr/share/doc/cups/help/ref-*.html
261/usr/share/doc/cups/help/security.html
d2354e63 262/usr/share/doc/cups/help/sharing.html
4744bd90 263/usr/share/doc/cups/help/translation.html
ef416fc2 264/usr/share/doc/cups/help/whatsnew.html
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/*
272#%dir /usr/share/doc/cups/es
273#/usr/share/doc/cups/es/*
274#%dir /usr/share/doc/cups/fr
275#/usr/share/doc/cups/fr/*
276#%dir /usr/share/doc/cups/ja
277#/usr/share/doc/cups/ja/*
278#%dir /usr/share/doc/cups/ru
279#/usr/share/doc/cups/ru/*
280
071b2906
MS
281%dir /usr/share/locale/ca
282/usr/share/locale/ca/cups_ca.po
283%dir /usr/share/locale/cs
284/usr/share/locale/cs/cups_cs.po
285%dir /usr/share/locale/es
286/usr/share/locale/es/cups_es.po
287%dir /usr/share/locale/fr
288/usr/share/locale/fr/cups_fr.po
f463b80c
MS
289%dir /usr/share/locale/it
290/usr/share/locale/it/cups_it.po
071b2906
MS
291%dir /usr/share/locale/ja
292/usr/share/locale/ja/cups_ja.po
293%dir /usr/share/locale/ru
294/usr/share/locale/ru/cups_ru.po
ef416fc2 295
296%dir /usr/share/man/man1
297/usr/share/man/man1/cancel.1.gz
80ca4592 298/usr/share/man/man1/cupstestdsc.1.gz
ef416fc2 299/usr/share/man/man1/cupstestppd.1.gz
ad0357ca 300/usr/share/man/man1/ippfind.1.gz
aaf19ab0 301/usr/share/man/man1/ipptool.1.gz
ef416fc2 302/usr/share/man/man1/lp.1.gz
303/usr/share/man/man1/lpoptions.1.gz
ef416fc2 304/usr/share/man/man1/lpq.1.gz
305/usr/share/man/man1/lpr.1.gz
306/usr/share/man/man1/lprm.1.gz
307/usr/share/man/man1/lpstat.1.gz
308%dir /usr/share/man/man5
ac884b6a 309/usr/share/man/man5/*.conf.5.gz
aaf19ab0 310/usr/share/man/man5/ipptoolfile.5.gz
ac884b6a 311/usr/share/man/man5/mime.*.5.gz
ef416fc2 312%dir /usr/share/man/man8
313/usr/share/man/man8/accept.8.gz
314/usr/share/man/man8/cupsaddsmb.8.gz
1f6f3dbc 315/usr/share/man/man8/cupsaccept.8.gz
bc44d920 316/usr/share/man/man8/cupsctl.8.gz
355e94dc 317/usr/share/man/man8/cupsfilter.8.gz
ef416fc2 318/usr/share/man/man8/cupsd.8.gz
319/usr/share/man/man8/cupsdisable.8.gz
320/usr/share/man/man8/cupsenable.8.gz
1f6f3dbc 321/usr/share/man/man8/cupsreject.8.gz
bd7854cb 322/usr/share/man/man8/cups-deviced.8.gz
323/usr/share/man/man8/cups-driverd.8.gz
37e7e6e0 324/usr/share/man/man8/cups-snmp.8.gz
ef416fc2 325/usr/share/man/man8/lpadmin.8.gz
326/usr/share/man/man8/lpc.8.gz
327/usr/share/man/man8/lpinfo.8.gz
328/usr/share/man/man8/lpmove.8.gz
329/usr/share/man/man8/reject.8.gz
330
331%dir /var/cache/cups
f7deaa1a 332%attr(0775,root,sys) %dir /var/cache/cups/rss
ef416fc2 333%dir /var/log/cups
334%dir /var/run/cups
bd7854cb 335%attr(0711,lp,sys) %dir /var/run/cups/certs
336%attr(0710,lp,sys) %dir /var/spool/cups
337%attr(1770,lp,sys) %dir /var/spool/cups/tmp
ef416fc2 338
e1d6a774 339# Desktop files
340/usr/share/applications/*
341/usr/share/icons/*
342
ef416fc2 343%files devel
344%defattr(-,root,root)
e6013cfa
MS
345%dir /usr/share/cups/examples
346/usr/share/cups/examples/*
ef416fc2 347%dir /usr/share/man/man1
ef416fc2 348/usr/share/man/man1/cups-config.1.gz
ac884b6a
MS
349/usr/share/man/man1/ppd*.1.gz
350%dir /usr/share/man/man5
351/usr/share/man/man5/ppdcfile.5.gz
352/usr/share/man/man7/backend.7.gz
353/usr/share/man/man7/filter.7.gz
178cb736 354/usr/share/man/man7/notifier.7.gz
ef416fc2 355
356/usr/bin/cups-config
ac884b6a 357/usr/bin/ppd*
ef416fc2 358%dir /usr/include/cups
359/usr/include/cups/*
e1d6a774 360/usr/lib*/*.so
ef416fc2 361
d6ae789d 362%if %{?_with_static:1}%{!?_with_static:0}
363/usr/lib*/*.a
364%endif
365
ef416fc2 366%dir /usr/share/doc/cups/help
367/usr/share/doc/cups/help/api*.html
e6013cfa
MS
368/usr/share/doc/cups/help/postscript-driver.html
369/usr/share/doc/cups/help/ppd-compiler.html
370/usr/share/doc/cups/help/raster-driver.html
ef416fc2 371/usr/share/doc/cups/help/spec*.html
372
373%files libs
374%defattr(-,root,root)
e1d6a774 375/usr/lib*/*.so.*
ef416fc2 376
377%files lpd
378%defattr(-,root,root)
e1d6a774 379/etc/xinetd.d/cups-lpd
ef416fc2 380%dir /usr/lib/cups
381%dir /usr/lib/cups/daemon
382/usr/lib/cups/daemon/cups-lpd
383%dir /usr/share/man/man8
384/usr/share/man/man8/cups-lpd.8.gz
385
b423cd4c 386
ef416fc2 387#
b34254bc 388# End of "$Id$".
ef416fc2 389#