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