]> git.ipfire.org Git - thirdparty/cups.git/blame - packaging/cups.spec.in
Fix RPM packaging file.
[thirdparty/cups.git] / packaging / cups.spec.in
CommitLineData
b5365858 1#
d5cfdccb 2# "$Id$"
b5365858 3#
86de9054 4# RPM "spec" file for CUPS.
b5365858 5#
6# Original version by Jason McMullan <jmcc@ontv.com>.
7#
113ba79a 8# Copyright 2007-2012 by Apple Inc.
c72fc9bc 9# Copyright 1999-2007 by Easy Software Products, all rights reserved.
b5365858 10#
11# These coded instructions, statements, and computer programs are the
4e8d321f 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/".
b5365858 16#
17
046285fd 18# Conditional build options (--with name/--without name):
19#
20# dbus - Enable/disable DBUS support (default = enable)
113ba79a 21# dnssd - Enable/disable DNS-SD support (default = enable)
22# static - Enable/disable static libraries (default = enable)
046285fd 23
24%{!?_with_dbus: %{!?_without_dbus: %define _with_dbus --with-dbus}}
25%{?_with_dbus: %define _dbus --enable-dbus}
1721a2eb 26%{!?_with_dbus: %define _dbus --disable-dbus}
046285fd 27
2f0ca56e 28%{!?_with_dnssd: %{!?_without_dnssd: %define _with_dnssd --with-dnssd}}
113ba79a 29%{?_with_dnssd: %define _dnssd --enable-dnssd}
30%{!?_with_dnssd: %define _dnssd --disable-dnssd}
31
6dacf3fc 32%{!?_with_static: %{!?_without_static: %define _without_static --without-static}}
33%{?_with_static: %define _static --enable-static}
34%{!?_with_static: %define _static --disable-static}
35
86de9054 36Summary: CUPS
b5365858 37Name: cups
38Version: @CUPS_VERSION@
39Release: 0
1ab61008 40Epoch: 1
41License: GPL
b5365858 42Group: System Environment/Daemons
113ba79a 43Source: http://ftp.cups.org/pub/cups/%{version}/cups-%{version}-source.tar.bz2
b5365858 44Url: http://www.cups.org
45Packager: Anonymous <anonymous@foo.com>
4e8d321f 46Vendor: Apple Inc.
b5365858 47
48# Use buildroot so as not to disturb the version already installed
15ebe270 49BuildRoot: /tmp/%{name}-root
b5365858 50
51# Dependencies...
1ab61008 52Requires: %{name}-libs = %{epoch}:%{version}
53Obsoletes: lpd, lpr, LPRng
54Provides: lpd, lpr, LPRng
9bca52c6 55Obsoletes: cups-da, cups-de, cups-es, cups-et, cups-fi, cups-fr, cups-he
56Obsoletes: cups-id, cups-it, cups-ja, cups-ko, cups-nl, cups-no, cups-pl
57Obsoletes: cups-pt, cups-ru, cups-sv, cups-zh
b5365858 58
59%package devel
86de9054 60Summary: CUPS - development environment
b5365858 61Group: Development/Libraries
1ab61008 62Requires: %{name}-libs = %{epoch}:%{version}
b5365858 63
64%package libs
86de9054 65Summary: CUPS - shared libraries
b5365858 66Group: System Environment/Libraries
67Provides: libcups1
68
1ab61008 69%package lpd
86de9054 70Summary: CUPS - LPD support
1ab61008 71Group: System Environment/Daemons
72Requires: %{name} = %{epoch}:%{version} xinetd
73
b5365858 74%description
86de9054 75CUPS is the standards-based, open source printing system developed by
113ba79a 76Apple Inc. for OS X and other UNIX®-like operating systems.
b5365858 77
78%description devel
86de9054 79This package provides the CUPS headers and development environment.
b5365858 80
81%description libs
86de9054 82This package provides the CUPS shared libraries.
b5365858 83
1ab61008 84%description lpd
86de9054 85This package provides LPD client support.
1ab61008 86
b5365858 87%prep
88%setup
89
90%build
78e99b14 91CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_OPT_FLAGS" \
113ba79a 92 ./configure %{_dbus} %{_dnssd} %{_static}
b5365858 93# If we got this far, all prerequisite libraries must be here.
94make
95
96%install
97# Make sure the RPM_BUILD_ROOT directory exists.
98rm -rf $RPM_BUILD_ROOT
99
100make BUILDROOT=$RPM_BUILD_ROOT install
101
102%post
4c855409 103/sbin/chkconfig --add cups
104/sbin/chkconfig cups on
b5365858 105
db4fea51 106# Restart cupsd if we are upgrading...
107if test $1 -gt 1; then
b6fab1ef 108 /sbin/service cups stop
4c855409 109 /sbin/service cups start
db4fea51 110fi
111
4c855409 112%post libs
113/sbin/ldconfig
b5365858 114
115%preun
4c855409 116if test $1 = 0; then
117 /sbin/service cups stop
b5365858 118 /sbin/chkconfig --del cups
119fi
120
4c855409 121%postun
122if test $1 -ge 1; then
9dd7b295 123 /sbin/service cups stop
124 /sbin/service cups start
4c855409 125fi
126
127%postun libs
128/sbin/ldconfig
129
b5365858 130%clean
131rm -rf $RPM_BUILD_ROOT
132
133%files
db4fea51 134%docdir /usr/share/doc/cups
b5365858 135%defattr(-,root,root)
136%dir /etc/cups
137%config(noreplace) /etc/cups/*.conf
17220774 138/etc/cups/cupsd.conf.default
b5365858 139%dir /etc/cups/interfaces
b5365858 140%dir /etc/cups/ppd
f29e4f04 141%attr(0700,root,root) %dir /etc/cups/ssl
bebab6d6 142
046285fd 143%if %{?_with_dbus:1}%{!?_with_dbus:0}
bebab6d6 144# DBUS
145/etc/dbus-1/system.d/*
046285fd 146%endif
bebab6d6 147
148# PAM
b5365858 149%dir /etc/pam.d
150/etc/pam.d/*
151
152# RC dirs are a pain under Linux... Uncomment the appropriate ones if you
153# don't use Red Hat or Mandrake...
154
155/etc/init.d/*
156/etc/rc0.d/*
157/etc/rc2.d/*
158/etc/rc3.d/*
159/etc/rc5.d/*
160
161# OLD RedHat/Mandrake
162#/etc/rc.d/init.d/*
163#/etc/rc.d/rc0.d/*
164#/etc/rc.d/rc2.d/*
165#/etc/rc.d/rc3.d/*
166#/etc/rc.d/rc5.d/*
167
168#/sbin/rc.d/*
169#/sbin/rc.d/rc0.d/*
170#/sbin/rc.d/rc2.d/*
171#/sbin/rc.d/rc3.d/*
172#/sbin/rc.d/rc5.d/*
173
174/usr/bin/cancel
e61c1bdd 175/usr/bin/cupstestdsc
b5365858 176/usr/bin/cupstestppd
76da224c 177/usr/bin/ipptool
b5365858 178/usr/bin/lp*
179%dir /usr/lib/cups
1ab61008 180%dir /usr/lib/cups/backend
d1f8e89e 181%if %{?_with_dnssd:1}%{!?_with_dnssd:0}
182# DNS-SD
183/usr/lib/cups/backend/dnssd
184%endif
f9ab96a4 185/usr/lib/cups/backend/http
68a801d9 186/usr/lib/cups/backend/https
97958d05 187%attr(0700,root,root) /usr/lib/cups/backend/ipp
68a801d9 188/usr/lib/cups/backend/ipps
f9ab96a4 189%attr(0700,root,root) /usr/lib/cups/backend/lpd
e5a23114 190/usr/lib/cups/backend/snmp
7bb839da 191/usr/lib/cups/backend/socket
f9ab96a4 192/usr/lib/cups/backend/usb
1ab61008 193%dir /usr/lib/cups/cgi-bin
194/usr/lib/cups/cgi-bin/*
195%dir /usr/lib/cups/daemon
196/usr/lib/cups/daemon/cups-deviced
197/usr/lib/cups/daemon/cups-driverd
68a801d9 198/usr/lib/cups/daemon/cups-exec
1ab61008 199%dir /usr/lib/cups/driver
200%dir /usr/lib/cups/filter
201/usr/lib/cups/filter/*
d5cfdccb 202%dir /usr/lib/cups/monitor
203/usr/lib/cups/monitor/*
a998cc08 204%dir /usr/lib/cups/notifier
205/usr/lib/cups/notifier/*
1ab61008 206
b5365858 207/usr/sbin/*
208%dir /usr/share/cups
02062880 209%dir /usr/share/cups/banners
210/usr/share/cups/banners/*
02062880 211%dir /usr/share/cups/data
212/usr/share/cups/data/*
24a938fe 213%dir /usr/share/cups/drv
214/usr/share/cups/drv/*
76da224c 215%dir /usr/share/cups/ipptool
216/usr/share/cups/ipptool/*
5ca995ba 217%dir /usr/share/cups/mime
218/usr/share/cups/mime/*
02062880 219%dir /usr/share/cups/model
c15aa60b 220%dir /usr/share/cups/ppdc
221/usr/share/cups/ppdc/*
02062880 222%dir /usr/share/cups/templates
24a938fe 223/usr/share/cups/templates/*
b5365858 224%dir /usr/share/doc/cups
fca2d560 225/usr/share/doc/cups/*.*
226%dir /usr/share/doc/cups/help
7a11aa99 227/usr/share/doc/cups/help/accounting.html
03b17690 228/usr/share/doc/cups/help/cgi.html
2f831281 229/usr/share/doc/cups/help/glossary.html
30b7d29a 230/usr/share/doc/cups/help/kerberos.html
03b17690 231/usr/share/doc/cups/help/license.html
344eda27 232/usr/share/doc/cups/help/man-*.html
233/usr/share/doc/cups/help/network.html
2f831281 234/usr/share/doc/cups/help/options.html
344eda27 235/usr/share/doc/cups/help/overview.html
7e1b9e17 236/usr/share/doc/cups/help/policies.html
075c29b2 237/usr/share/doc/cups/help/ref-*.html
2f831281 238/usr/share/doc/cups/help/security.html
1dc13f73 239/usr/share/doc/cups/help/sharing.html
344eda27 240/usr/share/doc/cups/help/standard.html
2f831281 241/usr/share/doc/cups/help/translation.html
344eda27 242/usr/share/doc/cups/help/whatsnew.html
fca2d560 243%dir /usr/share/doc/cups/images
244/usr/share/doc/cups/images/*
b5365858 245
f79831a2 246%dir /usr/share/doc/cups/ca
247/usr/share/doc/cups/ca/*
32d3b052 248%dir /usr/share/doc/cups/cs
249/usr/share/doc/cups/cs/*
f79831a2 250%dir /usr/share/doc/cups/es
251/usr/share/doc/cups/es/*
32d3b052 252%dir /usr/share/doc/cups/fr
253/usr/share/doc/cups/fr/*
cc7a0b90 254%dir /usr/share/doc/cups/ja
255/usr/share/doc/cups/ja/*
32d3b052 256%dir /usr/share/doc/cups/ru
257/usr/share/doc/cups/ru/*
cc7a0b90 258
f79831a2 259%dir /usr/share/locale/ca
260/usr/share/locale/ca/cups_ca.po
32d3b052 261%dir /usr/share/locale/cs
262/usr/share/locale/cs/cups_cs.po
f79831a2 263%dir /usr/share/locale/es
264/usr/share/locale/es/cups_es.po
32d3b052 265%dir /usr/share/locale/fr
266/usr/share/locale/fr/cups_fr.po
cc7a0b90 267%dir /usr/share/locale/ja
268/usr/share/locale/ja/cups_ja.po
32d3b052 269%dir /usr/share/locale/ru
270/usr/share/locale/ru/cups_ru.po
cc7a0b90 271
b5365858 272%dir /usr/share/man/man1
51bfe7c3 273/usr/share/man/man1/cancel.1.gz
e61c1bdd 274/usr/share/man/man1/cupstestdsc.1.gz
b5365858 275/usr/share/man/man1/cupstestppd.1.gz
76da224c 276/usr/share/man/man1/ipptool.1.gz
b5365858 277/usr/share/man/man1/lp.1.gz
278/usr/share/man/man1/lpoptions.1.gz
279/usr/share/man/man1/lppasswd.1.gz
280/usr/share/man/man1/lpq.1.gz
281/usr/share/man/man1/lpr.1.gz
282/usr/share/man/man1/lprm.1.gz
283/usr/share/man/man1/lpstat.1.gz
284%dir /usr/share/man/man5
64c60afc 285/usr/share/man/man5/*.conf.5.gz
76da224c 286/usr/share/man/man5/ipptoolfile.5.gz
64c60afc 287/usr/share/man/man5/mime.*.5.gz
b5365858 288%dir /usr/share/man/man8
0efda061 289/usr/share/man/man8/accept.8.gz
290/usr/share/man/man8/cupsaddsmb.8.gz
eb77041c 291/usr/share/man/man8/cupsaccept.8.gz
a5de518c 292/usr/share/man/man8/cupsctl.8.gz
49a3c41c 293/usr/share/man/man8/cupsfilter.8.gz
0efda061 294/usr/share/man/man8/cupsd.8.gz
e43e7922 295/usr/share/man/man8/cupsdisable.8.gz
0efda061 296/usr/share/man/man8/cupsenable.8.gz
eb77041c 297/usr/share/man/man8/cupsreject.8.gz
7c77a58d 298/usr/share/man/man8/cups-deviced.8.gz
299/usr/share/man/man8/cups-driverd.8.gz
b6711787 300/usr/share/man/man8/cups-snmp.8.gz
0efda061 301/usr/share/man/man8/lpadmin.8.gz
302/usr/share/man/man8/lpc.8.gz
303/usr/share/man/man8/lpinfo.8.gz
304/usr/share/man/man8/lpmove.8.gz
e43e7922 305/usr/share/man/man8/reject.8.gz
b5365858 306
2c780061 307%dir /var/cache/cups
c72fc9bc 308%attr(0775,root,sys) %dir /var/cache/cups/rss
f15becc8 309%dir /var/log/cups
2c780061 310%dir /var/run/cups
bee0ecb9 311%attr(0711,lp,sys) %dir /var/run/cups/certs
312%attr(0710,lp,sys) %dir /var/spool/cups
313%attr(1770,lp,sys) %dir /var/spool/cups/tmp
b5365858 314
069587e3 315# Desktop files
316/usr/share/applications/*
317/usr/share/icons/*
318
b5365858 319%files devel
1ab61008 320%defattr(-,root,root)
567079c9 321%dir /usr/share/cups/examples
322/usr/share/cups/examples/*
b5365858 323%dir /usr/share/man/man1
324/usr/share/man/man1/cups-config.1.gz
16a649cd 325/usr/share/man/man1/ppd*.1.gz
64c60afc 326%dir /usr/share/man/man5
327/usr/share/man/man5/ppdcfile.5.gz
328/usr/share/man/man7/backend.7.gz
329/usr/share/man/man7/filter.7.gz
5363607d 330/usr/share/man/man7/notifier.7.gz
b5365858 331
332/usr/bin/cups-config
64c60afc 333/usr/bin/ppd*
b5365858 334%dir /usr/include/cups
335/usr/include/cups/*
866eebf9 336/usr/lib*/*.so
b5365858 337
6dacf3fc 338%if %{?_with_static:1}%{!?_with_static:0}
339/usr/lib*/*.a
340%endif
341
fca2d560 342%dir /usr/share/doc/cups/help
343/usr/share/doc/cups/help/api*.html
567079c9 344/usr/share/doc/cups/help/postscript-driver.html
345/usr/share/doc/cups/help/ppd-compiler.html
346/usr/share/doc/cups/help/raster-driver.html
236d301d 347/usr/share/doc/cups/help/spec*.html
fca2d560 348
b5365858 349%files libs
1ab61008 350%defattr(-,root,root)
866eebf9 351/usr/lib*/*.so.*
1ab61008 352
353%files lpd
354%defattr(-,root,root)
069587e3 355/etc/xinetd.d/cups-lpd
1ab61008 356%dir /usr/lib/cups
357%dir /usr/lib/cups/daemon
358/usr/lib/cups/daemon/cups-lpd
0efda061 359%dir /usr/share/man/man8
360/usr/share/man/man8/cups-lpd.8.gz
b5365858 361
7c58fa6f 362
b5365858 363#
d5cfdccb 364# End of "$Id$".
b5365858 365#