]> git.ipfire.org Git - thirdparty/cups.git/blame - packaging/cups.spec.in
Import CUPS v2.0.4
[thirdparty/cups.git] / packaging / cups.spec.in
CommitLineData
ef416fc2 1#
00d0ae86 2# "$Id: cups.spec.in 12770 2015-06-30 16:17:56Z msweet $"
ef416fc2 3#
f4515965 4# RPM "spec" file for CUPS.
ef416fc2 5#
f4515965 6# Original version by Jason McMullan <jmcc@ontv.com>.
ef416fc2 7#
00d0ae86 8# Copyright 2007-2015 by Apple Inc.
f4515965 9# Copyright 1999-2007 by Easy Software Products, all rights reserved.
ef416fc2 10#
f4515965
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)
f4515965 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
f4515965
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
1a18c85c
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
f4515965
MS
57# Package names are as defined for Red Hat (and clone) distributions
58BuildRequires: gnutls-devel, pam-devel
59
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}
a51f28ec 69BuildRequires: libusb-devel >= 1.0
f4515965
MS
70%endif
71
1a18c85c
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" \
f4515965 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
1a18c85c 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
1a18c85c
MS
181%if %{?_with_systemd:1}%{!?_with_systemd:0}
182# SystemD
86243a75 183/usr/lib/systemd/system/org.cups.cupsd.*
ef416fc2 184
1a18c85c
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/*
1a18c85c 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/*
61515785 241%if %{?_with_libusb1:1}%{!?_with_libusb1:0}
f4515965 242# LIBUSB quirks files
89a65306
MS
243%dir /usr/share/cups/usb
244/usr/share/cups/usb/*
f4515965 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%dir /usr/share/doc/cups/images
265/usr/share/doc/cups/images/*
37e7e6e0 266
1a18c85c
MS
267#%dir /usr/share/doc/cups/ca
268#/usr/share/doc/cups/ca/*
269#%dir /usr/share/doc/cups/cs
270#/usr/share/doc/cups/cs/*
00d0ae86
MS
271%dir /usr/share/doc/cups/de
272/usr/share/doc/cups/de/*
86243a75
MS
273%dir /usr/share/doc/cups/es
274/usr/share/doc/cups/es/*
1a18c85c
MS
275#%dir /usr/share/doc/cups/fr
276#/usr/share/doc/cups/fr/*
4ef75dec
MS
277%dir /usr/share/doc/cups/ja
278/usr/share/doc/cups/ja/*
00d0ae86
MS
279%dir /usr/share/doc/cups/ru
280/usr/share/doc/cups/ru/*
37e7e6e0
MS
281
282%dir /usr/share/locale/ca
283/usr/share/locale/ca/cups_ca.po
94436c5a
MS
284%dir /usr/share/locale/cs
285/usr/share/locale/cs/cups_cs.po
00d0ae86
MS
286%dir /usr/share/locale/de
287/usr/share/locale/de/cups_de.po
37e7e6e0
MS
288%dir /usr/share/locale/es
289/usr/share/locale/es/cups_es.po
94436c5a
MS
290%dir /usr/share/locale/fr
291/usr/share/locale/fr/cups_fr.po
27efcd61
MS
292%dir /usr/share/locale/it
293/usr/share/locale/it/cups_it.po
37e7e6e0
MS
294%dir /usr/share/locale/ja
295/usr/share/locale/ja/cups_ja.po
94436c5a
MS
296%dir /usr/share/locale/ru
297/usr/share/locale/ru/cups_ru.po
ef416fc2 298
299%dir /usr/share/man/man1
300/usr/share/man/man1/cancel.1.gz
1a18c85c 301/usr/share/man/man1/cups.1.gz
80ca4592 302/usr/share/man/man1/cupstestdsc.1.gz
ef416fc2 303/usr/share/man/man1/cupstestppd.1.gz
ad0357ca 304/usr/share/man/man1/ippfind.1.gz
aaf19ab0 305/usr/share/man/man1/ipptool.1.gz
ef416fc2 306/usr/share/man/man1/lp.1.gz
307/usr/share/man/man1/lpoptions.1.gz
ef416fc2 308/usr/share/man/man1/lpq.1.gz
309/usr/share/man/man1/lpr.1.gz
310/usr/share/man/man1/lprm.1.gz
311/usr/share/man/man1/lpstat.1.gz
312%dir /usr/share/man/man5
ac884b6a 313/usr/share/man/man5/*.conf.5.gz
aaf19ab0 314/usr/share/man/man5/ipptoolfile.5.gz
ac884b6a 315/usr/share/man/man5/mime.*.5.gz
ef416fc2 316%dir /usr/share/man/man8
317/usr/share/man/man8/accept.8.gz
1a18c85c
MS
318/usr/share/man/man8/cups-deviced.8.gz
319/usr/share/man/man8/cups-driverd.8.gz
320/usr/share/man/man8/cups-exec.8.gz
321/usr/share/man/man8/cups-snmp.8.gz
ef416fc2 322/usr/share/man/man8/cupsaddsmb.8.gz
1f6f3dbc 323/usr/share/man/man8/cupsaccept.8.gz
bc44d920 324/usr/share/man/man8/cupsctl.8.gz
355e94dc 325/usr/share/man/man8/cupsfilter.8.gz
ef416fc2 326/usr/share/man/man8/cupsd.8.gz
1a18c85c
MS
327/usr/share/man/man8/cupsd-helper.8.gz
328/usr/share/man/man8/cupsd-logs.8.gz
ef416fc2 329/usr/share/man/man8/cupsdisable.8.gz
330/usr/share/man/man8/cupsenable.8.gz
1f6f3dbc 331/usr/share/man/man8/cupsreject.8.gz
ef416fc2 332/usr/share/man/man8/lpadmin.8.gz
333/usr/share/man/man8/lpc.8.gz
334/usr/share/man/man8/lpinfo.8.gz
335/usr/share/man/man8/lpmove.8.gz
336/usr/share/man/man8/reject.8.gz
337
338%dir /var/cache/cups
f7deaa1a 339%attr(0775,root,sys) %dir /var/cache/cups/rss
ef416fc2 340%dir /var/log/cups
341%dir /var/run/cups
bd7854cb 342%attr(0711,lp,sys) %dir /var/run/cups/certs
343%attr(0710,lp,sys) %dir /var/spool/cups
344%attr(1770,lp,sys) %dir /var/spool/cups/tmp
ef416fc2 345
e1d6a774 346# Desktop files
347/usr/share/applications/*
348/usr/share/icons/*
349
ef416fc2 350%files devel
351%defattr(-,root,root)
e6013cfa
MS
352%dir /usr/share/cups/examples
353/usr/share/cups/examples/*
ef416fc2 354%dir /usr/share/man/man1
ef416fc2 355/usr/share/man/man1/cups-config.1.gz
ac884b6a
MS
356/usr/share/man/man1/ppd*.1.gz
357%dir /usr/share/man/man5
358/usr/share/man/man5/ppdcfile.5.gz
359/usr/share/man/man7/backend.7.gz
360/usr/share/man/man7/filter.7.gz
178cb736 361/usr/share/man/man7/notifier.7.gz
ef416fc2 362
363/usr/bin/cups-config
ac884b6a 364/usr/bin/ppd*
ef416fc2 365%dir /usr/include/cups
366/usr/include/cups/*
e1d6a774 367/usr/lib*/*.so
ef416fc2 368
d6ae789d 369%if %{?_with_static:1}%{!?_with_static:0}
370/usr/lib*/*.a
371%endif
372
ef416fc2 373%dir /usr/share/doc/cups/help
374/usr/share/doc/cups/help/api*.html
e6013cfa
MS
375/usr/share/doc/cups/help/postscript-driver.html
376/usr/share/doc/cups/help/ppd-compiler.html
377/usr/share/doc/cups/help/raster-driver.html
ef416fc2 378/usr/share/doc/cups/help/spec*.html
379
380%files libs
381%defattr(-,root,root)
e1d6a774 382/usr/lib*/*.so.*
ef416fc2 383
384%files lpd
385%defattr(-,root,root)
86243a75
MS
386%if %{?_with_systemd:1}%{!?_with_systemd:0}
387# SystemD
388/usr/lib/systemd/system/org.cups.cups-lpd*
389%else
390# Legacy xinetd
e1d6a774 391/etc/xinetd.d/cups-lpd
86243a75
MS
392%endif
393
ef416fc2 394%dir /usr/lib/cups
395%dir /usr/lib/cups/daemon
396/usr/lib/cups/daemon/cups-lpd
397%dir /usr/share/man/man8
398/usr/share/man/man8/cups-lpd.8.gz
399
b423cd4c 400
ef416fc2 401#
00d0ae86 402# End of "$Id: cups.spec.in 12770 2015-06-30 16:17:56Z msweet $".
ef416fc2 403#