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