]> git.ipfire.org Git - thirdparty/cups.git/blame - packaging/cups.spec.in
Import CUPS v1.7.1
[thirdparty/cups.git] / packaging / cups.spec.in
CommitLineData
ef416fc2 1#
61515785 2# "$Id: cups.spec.in 11516 2014-01-08 16:24:32Z msweet $"
ef416fc2 3#
f4515965 4# RPM "spec" file for CUPS.
ef416fc2 5#
f4515965 6# Original version by Jason McMullan <jmcc@ontv.com>.
ef416fc2 7#
61515785 8# Copyright 2007-2014 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
9aff70cc 41Summary: CUPS
ef416fc2 42Name: cups
43Version: @CUPS_VERSION@
44Release: 0
45Epoch: 1
46License: GPL
47Group: System Environment/Daemons
f3c17241 48Source: http://ftp.cups.org/pub/cups/%{version}/cups-%{version}-source.tar.bz2
ef416fc2 49Url: http://www.cups.org
50Packager: Anonymous <anonymous@foo.com>
bc44d920 51Vendor: Apple Inc.
ef416fc2 52
f4515965
MS
53# Package names are as defined for Red Hat (and clone) distributions
54BuildRequires: gnutls-devel, pam-devel
55
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}
65BuildRequires: libusbx-devel
66%endif
67
ef416fc2 68# Use buildroot so as not to disturb the version already installed
69BuildRoot: /tmp/%{name}-root
70
71# Dependencies...
72Requires: %{name}-libs = %{epoch}:%{version}
73Obsoletes: lpd, lpr, LPRng
74Provides: lpd, lpr, LPRng
75bd9771
MS
75Obsoletes: cups-da, cups-de, cups-es, cups-et, cups-fi, cups-fr, cups-he
76Obsoletes: cups-id, cups-it, cups-ja, cups-ko, cups-nl, cups-no, cups-pl
77Obsoletes: cups-pt, cups-ru, cups-sv, cups-zh
ef416fc2 78
79%package devel
9aff70cc 80Summary: CUPS - development environment
ef416fc2 81Group: Development/Libraries
82Requires: %{name}-libs = %{epoch}:%{version}
83
84%package libs
9aff70cc 85Summary: CUPS - shared libraries
ef416fc2 86Group: System Environment/Libraries
87Provides: libcups1
88
89%package lpd
9aff70cc 90Summary: CUPS - LPD support
ef416fc2 91Group: System Environment/Daemons
92Requires: %{name} = %{epoch}:%{version} xinetd
93
94%description
9aff70cc 95CUPS is the standards-based, open source printing system developed by
f3c17241 96Apple Inc. for OS X and other UNIX®-like operating systems.
ef416fc2 97
98%description devel
9aff70cc 99This package provides the CUPS headers and development environment.
ef416fc2 100
101%description libs
9aff70cc 102This package provides the CUPS shared libraries.
ef416fc2 103
104%description lpd
9aff70cc 105This package provides LPD client support.
ef416fc2 106
107%prep
108%setup
109
110%build
e1d6a774 111CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_OPT_FLAGS" \
f4515965 112 ./configure %{_dbus} %{_dnssd} %{_libusb1} %{_static}
ef416fc2 113# If we got this far, all prerequisite libraries must be here.
114make
115
116%install
117# Make sure the RPM_BUILD_ROOT directory exists.
118rm -rf $RPM_BUILD_ROOT
119
120make BUILDROOT=$RPM_BUILD_ROOT install
121
122%post
bd7854cb 123/sbin/chkconfig --add cups
124/sbin/chkconfig cups on
ef416fc2 125
bd7854cb 126# Restart cupsd if we are upgrading...
127if test $1 -gt 1; then
128 /sbin/service cups stop
129 /sbin/service cups start
ef416fc2 130fi
131
bd7854cb 132%post libs
133/sbin/ldconfig
ef416fc2 134
135%preun
bd7854cb 136if test $1 = 0; then
137 /sbin/service cups stop
138 /sbin/chkconfig --del cups
ef416fc2 139fi
140
bd7854cb 141%postun
142if test $1 -ge 1; then
143 /sbin/service cups stop
144 /sbin/service cups start
ef416fc2 145fi
146
bd7854cb 147%postun libs
148/sbin/ldconfig
149
ef416fc2 150%clean
151rm -rf $RPM_BUILD_ROOT
152
153%files
bd7854cb 154%docdir /usr/share/doc/cups
ef416fc2 155%defattr(-,root,root)
156%dir /etc/cups
157%config(noreplace) /etc/cups/*.conf
fa73b229 158/etc/cups/cupsd.conf.default
ef416fc2 159%dir /etc/cups/interfaces
ef416fc2 160%dir /etc/cups/ppd
8ca02f3c 161%attr(0700,root,root) %dir /etc/cups/ssl
bd7854cb 162
ecdc0628 163%if %{?_with_dbus:1}%{!?_with_dbus:0}
bd7854cb 164# DBUS
165/etc/dbus-1/system.d/*
ecdc0628 166%endif
bd7854cb 167
168# PAM
ef416fc2 169%dir /etc/pam.d
170/etc/pam.d/*
171
172# RC dirs are a pain under Linux... Uncomment the appropriate ones if you
173# don't use Red Hat or Mandrake...
174
175/etc/init.d/*
176/etc/rc0.d/*
177/etc/rc2.d/*
178/etc/rc3.d/*
179/etc/rc5.d/*
180
181# OLD RedHat/Mandrake
182#/etc/rc.d/init.d/*
183#/etc/rc.d/rc0.d/*
184#/etc/rc.d/rc2.d/*
185#/etc/rc.d/rc3.d/*
186#/etc/rc.d/rc5.d/*
187
188#/sbin/rc.d/*
189#/sbin/rc.d/rc0.d/*
190#/sbin/rc.d/rc2.d/*
191#/sbin/rc.d/rc3.d/*
192#/sbin/rc.d/rc5.d/*
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
d6ae789d 230%dir /usr/share/cups/banners
231/usr/share/cups/banners/*
d6ae789d 232%dir /usr/share/cups/data
233/usr/share/cups/data/*
634763e8
MS
234%dir /usr/share/cups/drv
235/usr/share/cups/drv/*
aaf19ab0
MS
236%dir /usr/share/cups/ipptool
237/usr/share/cups/ipptool/*
dd1abb6b
MS
238%dir /usr/share/cups/mime
239/usr/share/cups/mime/*
d6ae789d 240%dir /usr/share/cups/model
ac884b6a
MS
241%dir /usr/share/cups/ppdc
242/usr/share/cups/ppdc/*
d6ae789d 243%dir /usr/share/cups/templates
634763e8 244/usr/share/cups/templates/*
61515785 245%if %{?_with_libusb1:1}%{!?_with_libusb1:0}
f4515965 246# LIBUSB quirks files
89a65306
MS
247%dir /usr/share/cups/usb
248/usr/share/cups/usb/*
f4515965 249%endif
89a65306 250
ef416fc2 251%dir /usr/share/doc/cups
252/usr/share/doc/cups/*.*
253%dir /usr/share/doc/cups/help
09a101d6 254/usr/share/doc/cups/help/accounting.html
4744bd90 255/usr/share/doc/cups/help/cgi.html
256/usr/share/doc/cups/help/glossary.html
355e94dc 257/usr/share/doc/cups/help/kerberos.html
4744bd90 258/usr/share/doc/cups/help/license.html
ef416fc2 259/usr/share/doc/cups/help/man-*.html
260/usr/share/doc/cups/help/network.html
4744bd90 261/usr/share/doc/cups/help/options.html
ef416fc2 262/usr/share/doc/cups/help/overview.html
8ca02f3c 263/usr/share/doc/cups/help/policies.html
4744bd90 264/usr/share/doc/cups/help/ref-*.html
265/usr/share/doc/cups/help/security.html
d2354e63 266/usr/share/doc/cups/help/sharing.html
4744bd90 267/usr/share/doc/cups/help/translation.html
ef416fc2 268/usr/share/doc/cups/help/whatsnew.html
269%dir /usr/share/doc/cups/images
270/usr/share/doc/cups/images/*
37e7e6e0
MS
271
272%dir /usr/share/doc/cups/ca
273/usr/share/doc/cups/ca/*
94436c5a
MS
274%dir /usr/share/doc/cups/cs
275/usr/share/doc/cups/cs/*
37e7e6e0
MS
276%dir /usr/share/doc/cups/es
277/usr/share/doc/cups/es/*
94436c5a
MS
278%dir /usr/share/doc/cups/fr
279/usr/share/doc/cups/fr/*
27efcd61
MS
280%dir /usr/share/doc/cups/it
281/usr/share/doc/cups/it/*
37e7e6e0
MS
282%dir /usr/share/doc/cups/ja
283/usr/share/doc/cups/ja/*
94436c5a
MS
284%dir /usr/share/doc/cups/ru
285/usr/share/doc/cups/ru/*
37e7e6e0
MS
286
287%dir /usr/share/locale/ca
288/usr/share/locale/ca/cups_ca.po
94436c5a
MS
289%dir /usr/share/locale/cs
290/usr/share/locale/cs/cups_cs.po
37e7e6e0
MS
291%dir /usr/share/locale/es
292/usr/share/locale/es/cups_es.po
94436c5a
MS
293%dir /usr/share/locale/fr
294/usr/share/locale/fr/cups_fr.po
27efcd61
MS
295%dir /usr/share/locale/it
296/usr/share/locale/it/cups_it.po
37e7e6e0
MS
297%dir /usr/share/locale/ja
298/usr/share/locale/ja/cups_ja.po
94436c5a
MS
299%dir /usr/share/locale/ru
300/usr/share/locale/ru/cups_ru.po
ef416fc2 301
302%dir /usr/share/man/man1
303/usr/share/man/man1/cancel.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
310/usr/share/man/man1/lppasswd.1.gz
311/usr/share/man/man1/lpq.1.gz
312/usr/share/man/man1/lpr.1.gz
313/usr/share/man/man1/lprm.1.gz
314/usr/share/man/man1/lpstat.1.gz
315%dir /usr/share/man/man5
ac884b6a 316/usr/share/man/man5/*.conf.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
321/usr/share/man/man8/cupsaddsmb.8.gz
1f6f3dbc 322/usr/share/man/man8/cupsaccept.8.gz
bc44d920 323/usr/share/man/man8/cupsctl.8.gz
355e94dc 324/usr/share/man/man8/cupsfilter.8.gz
ef416fc2 325/usr/share/man/man8/cupsd.8.gz
326/usr/share/man/man8/cupsdisable.8.gz
327/usr/share/man/man8/cupsenable.8.gz
1f6f3dbc 328/usr/share/man/man8/cupsreject.8.gz
bd7854cb 329/usr/share/man/man8/cups-deviced.8.gz
330/usr/share/man/man8/cups-driverd.8.gz
37e7e6e0 331/usr/share/man/man8/cups-snmp.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)
e1d6a774 386/etc/xinetd.d/cups-lpd
ef416fc2 387%dir /usr/lib/cups
388%dir /usr/lib/cups/daemon
389/usr/lib/cups/daemon/cups-lpd
390%dir /usr/share/man/man8
391/usr/share/man/man8/cups-lpd.8.gz
392
b423cd4c 393
ef416fc2 394#
61515785 395# End of "$Id: cups.spec.in 11516 2014-01-08 16:24:32Z msweet $".
ef416fc2 396#