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