]> git.ipfire.org Git - thirdparty/cups.git/blob - packaging/cups.spec.in
4e564c176c8f98fb14edce391de17f77695a8bb7
[thirdparty/cups.git] / packaging / cups.spec.in
1 #
2 # "$Id: cups.spec.in 6889 2007-08-29 22:23:35Z mike $"
3 #
4 # RPM "spec" file for the Common UNIX Printing System (CUPS).
5 #
6 # Original version by Jason McMullan <jmcc@ontv.com>.
7 #
8 # Copyright 2007-2008 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 # php - Enable/disable PHP support (default = enable)
22
23 %{!?_with_dbus: %{!?_without_dbus: %define _with_dbus --with-dbus}}
24 %{?_with_dbus: %define _dbus --enable-dbus}
25 %{!?_with_dbus: %define _dbus --disable-dbus}
26
27 %{!?_with_php: %{!?_without_php: %define _with_php --with-php}}
28 %{?_with_php: %define _php --with-php}
29 %{!?_with_php: %define _php --without-php}
30
31 %{!?_with_static: %{!?_without_static: %define _without_static --without-static}}
32 %{?_with_static: %define _static --enable-static}
33 %{!?_with_static: %define _static --disable-static}
34
35 Summary: Common UNIX Printing System
36 Name: cups
37 Version: @CUPS_VERSION@
38 Release: 0
39 Epoch: 1
40 License: GPL
41 Group: System Environment/Daemons
42 Source: ftp://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.gz
43 Url: http://www.cups.org
44 Packager: Anonymous <anonymous@foo.com>
45 Vendor: Apple Inc.
46
47 # Use buildroot so as not to disturb the version already installed
48 BuildRoot: /tmp/%{name}-root
49
50 # Dependencies...
51 Requires: %{name}-libs = %{epoch}:%{version}
52 Obsoletes: lpd, lpr, LPRng
53 Provides: lpd, lpr, LPRng
54
55 %package devel
56 Summary: Common UNIX Printing System - development environment
57 Group: Development/Libraries
58 Requires: %{name}-libs = %{epoch}:%{version}
59
60 %package libs
61 Summary: Common UNIX Printing System - shared libraries
62 Group: System Environment/Libraries
63 Provides: libcups1
64
65 %package lpd
66 Summary: Common UNIX Printing System - LPD support
67 Group: System Environment/Daemons
68 Requires: %{name} = %{epoch}:%{version} xinetd
69
70 %if %{?_with_php:1}%{!?_with_php:0}
71 %package php
72 Summary: Common UNIX Printing System - PHP support
73 Group: Development/Languages
74 Requires: %{name}-libs = %{epoch}:%{version}
75 %endif
76
77 %description
78 The Common UNIX Printing System provides a portable printing layer for
79 UNIX® operating systems. It was developed by Easy Software Products
80 to promote a standard printing solution for all UNIX vendors and users
81 and is now owned by Apple Inc. CUPS provides the System V and Berkeley
82 command-line interfaces.
83
84 %description devel
85 The Common UNIX Printing System provides a portable printing layer for
86 UNIX® operating systems. This is the development package for creating
87 additional printer drivers and other CUPS services.
88
89 %description libs
90 The Common UNIX Printing System provides a portable printing layer for
91 UNIX® operating systems. This package contains the CUPS shared libraries.
92
93 %description lpd
94 The Common UNIX Printing System provides a portable printing layer for
95 UNIX® operating systems. This package provides LPD client support.
96
97 %if %{?_with_php:1}%{!?_with_php:0}
98 %description php
99 The Common UNIX Printing System provides a portable printing layer for
100 UNIX® operating systems. This package provides PHP support.
101 %endif
102
103 %prep
104 %setup
105
106 %build
107 %ifarch x86_64
108 ./configure --enable-32bit %{_dbus} %{_php} %{_static}
109 %else
110 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_OPT_FLAGS" \
111 ./configure %{_dbus} %{_php} %{_static}
112 %endif
113 # If we got this far, all prerequisite libraries must be here.
114 make
115
116 %install
117 # Make sure the RPM_BUILD_ROOT directory exists.
118 rm -rf $RPM_BUILD_ROOT
119
120 make BUILDROOT=$RPM_BUILD_ROOT install
121
122 %post
123 /sbin/chkconfig --add cups
124 /sbin/chkconfig cups on
125
126 # Restart cupsd if we are upgrading...
127 if test $1 -gt 1; then
128 /sbin/service cups stop
129 /sbin/service cups start
130 fi
131
132 %post libs
133 /sbin/ldconfig
134
135 %preun
136 if test $1 = 0; then
137 /sbin/service cups stop
138 /sbin/chkconfig --del cups
139 fi
140
141 %postun
142 if test $1 -ge 1; then
143 /sbin/service cups stop
144 /sbin/service cups start
145 fi
146
147 %postun libs
148 /sbin/ldconfig
149
150 %clean
151 rm -rf $RPM_BUILD_ROOT
152
153 %files
154 %docdir /usr/share/doc/cups
155 %defattr(-,root,root)
156 %dir /etc/cups
157 %config(noreplace) /etc/cups/*.conf
158 /etc/cups/cupsd.conf.default
159 %dir /etc/cups/interfaces
160 %dir /etc/cups/ppd
161 %attr(0700,root,root) %dir /etc/cups/ssl
162
163 %if %{?_with_dbus:1}%{!?_with_dbus:0}
164 # DBUS
165 /etc/dbus-1/system.d/*
166 %endif
167
168 # PAM
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
195 /usr/bin/cupstestdsc
196 /usr/bin/cupstestppd
197 /usr/bin/lp*
198 %dir /usr/lib/cups
199 %dir /usr/lib/cups/backend
200 /usr/lib/cups/backend/http
201 %attr(0700,root,root) /usr/lib/cups/backend/ipp
202 %attr(0700,root,root) /usr/lib/cups/backend/lpd
203 /usr/lib/cups/backend/parallel
204 /usr/lib/cups/backend/scsi
205 /usr/lib/cups/backend/serial
206 /usr/lib/cups/backend/snmp
207 /usr/lib/cups/backend/socket
208 /usr/lib/cups/backend/usb
209 %dir /usr/lib/cups/cgi-bin
210 /usr/lib/cups/cgi-bin/*
211 %dir /usr/lib/cups/daemon
212 /usr/lib/cups/daemon/cups-deviced
213 /usr/lib/cups/daemon/cups-driverd
214 /usr/lib/cups/daemon/cups-polld
215 %dir /usr/lib/cups/driver
216 /usr/lib/cups/driver/drv
217 %dir /usr/lib/cups/filter
218 /usr/lib/cups/filter/*
219 %dir /usr/lib/cups/monitor
220 /usr/lib/cups/monitor/*
221 %dir /usr/lib/cups/notifier
222 /usr/lib/cups/notifier/*
223
224 /usr/sbin/*
225 %dir /usr/share/cups
226 %dir /usr/share/cups/banners
227 /usr/share/cups/banners/*
228 %dir /usr/share/cups/charmaps
229 /usr/share/cups/charmaps/*
230 %dir /usr/share/cups/charsets
231 /usr/share/cups/charsets/*
232 %dir /usr/share/cups/data
233 /usr/share/cups/data/*
234 %dir /usr/share/cups/drv
235 /usr/share/cups/drv/*
236 %dir /usr/share/cups/fonts
237 /usr/share/cups/fonts/*
238 %dir /usr/share/cups/mime
239 /usr/share/cups/mime/*
240 %dir /usr/share/cups/model
241 %dir /usr/share/cups/ppdc
242 /usr/share/cups/ppdc/*
243 %dir /usr/share/cups/templates
244 /usr/share/cups/templates/*
245 %dir /usr/share/doc/cups
246 /usr/share/doc/cups/*.*
247 %dir /usr/share/doc/cups/help
248 /usr/share/doc/cups/help/accounting.html
249 /usr/share/doc/cups/help/cgi.html
250 /usr/share/doc/cups/help/glossary.html
251 /usr/share/doc/cups/help/kerberos.html
252 /usr/share/doc/cups/help/license.html
253 /usr/share/doc/cups/help/man-*.html
254 /usr/share/doc/cups/help/network.html
255 /usr/share/doc/cups/help/options.html
256 /usr/share/doc/cups/help/overview.html
257 /usr/share/doc/cups/help/policies.html
258 /usr/share/doc/cups/help/ref-*.html
259 /usr/share/doc/cups/help/security.html
260 /usr/share/doc/cups/help/standard.html
261 /usr/share/doc/cups/help/translation.html
262 /usr/share/doc/cups/help/whatsnew.html
263 %dir /usr/share/doc/cups/images
264 /usr/share/doc/cups/images/*
265 /usr/share/locale/*
266
267 %dir /usr/share/man/man1
268 /usr/share/man/man1/cancel.1.gz
269 /usr/share/man/man1/cupstestdsc.1.gz
270 /usr/share/man/man1/cupstestppd.1.gz
271 /usr/share/man/man1/lp.1.gz
272 /usr/share/man/man1/lpoptions.1.gz
273 /usr/share/man/man1/lppasswd.1.gz
274 /usr/share/man/man1/lpq.1.gz
275 /usr/share/man/man1/lpr.1.gz
276 /usr/share/man/man1/lprm.1.gz
277 /usr/share/man/man1/lpstat.1.gz
278 %dir /usr/share/man/man5
279 /usr/share/man/man5/*.conf.5.gz
280 /usr/share/man/man5/mime.*.5.gz
281 %dir /usr/share/man/man7
282 /usr/share/man/man7/commandto*
283 /usr/share/man/man7/drv*
284 /usr/share/man/man7/rasterto*
285 %dir /usr/share/man/man8
286 /usr/share/man/man8/accept.8.gz
287 /usr/share/man/man8/cupsaddsmb.8.gz
288 /usr/share/man/man8/cupsctl.8.gz
289 /usr/share/man/man8/cupsfilter.8.gz
290 /usr/share/man/man8/cupsd.8.gz
291 /usr/share/man/man8/cupsdisable.8.gz
292 /usr/share/man/man8/cupsenable.8.gz
293 /usr/share/man/man8/cups-deviced.8.gz
294 /usr/share/man/man8/cups-driverd.8.gz
295 /usr/share/man/man8/cups-polld.8.gz
296 /usr/share/man/man8/lpadmin.8.gz
297 /usr/share/man/man8/lpc.8.gz
298 /usr/share/man/man8/lpinfo.8.gz
299 /usr/share/man/man8/lpmove.8.gz
300 /usr/share/man/man8/reject.8.gz
301
302 %dir /var/cache/cups
303 %attr(0775,root,sys) %dir /var/cache/cups/rss
304 %dir /var/log/cups
305 %dir /var/run/cups
306 %attr(0711,lp,sys) %dir /var/run/cups/certs
307 %attr(0710,lp,sys) %dir /var/spool/cups
308 %attr(1770,lp,sys) %dir /var/spool/cups/tmp
309
310 # Desktop files
311 /usr/share/applications/*
312 /usr/share/icons/*
313
314 %files devel
315 %defattr(-,root,root)
316 %dir /usr/share/man/man1
317 /usr/share/man/man1/cups-config.1.gz
318 /usr/share/man/man1/ppd*.1.gz
319 %dir /usr/share/man/man5
320 /usr/share/man/man5/ppdcfile.5.gz
321 /usr/share/man/man7/backend.7.gz
322 /usr/share/man/man7/filter.7.gz
323
324 /usr/bin/cups-config
325 /usr/bin/ppd*
326 %dir /usr/include/cups
327 /usr/include/cups/*
328 /usr/lib*/*.so
329
330 %if %{?_with_static:1}%{!?_with_static:0}
331 /usr/lib*/*.a
332 %endif
333
334 %dir /usr/share/doc/cups/help
335 /usr/share/doc/cups/help/api*.html
336 /usr/share/doc/cups/help/spec*.html
337
338 %files libs
339 %defattr(-,root,root)
340 /usr/lib*/*.so.*
341
342 %files lpd
343 %defattr(-,root,root)
344 /etc/xinetd.d/cups-lpd
345 %dir /usr/lib/cups
346 %dir /usr/lib/cups/daemon
347 /usr/lib/cups/daemon/cups-lpd
348 %dir /usr/share/man/man8
349 /usr/share/man/man8/cups-lpd.8.gz
350
351 %if %{?_with_php:1}%{!?_with_php:0}
352 %files php
353 # PHP
354 /usr/lib*/php*
355 %endif
356
357
358 #
359 # End of "$Id: cups.spec.in 6889 2007-08-29 22:23:35Z mike $".
360 #