]> git.ipfire.org Git - thirdparty/cups.git/blob - packaging/cups.spec.in
Load cups into easysw/current.
[thirdparty/cups.git] / packaging / cups.spec.in
1 #
2 # "$Id: cups.spec.in 5310 2006-03-19 03:23:34Z 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 1999-2006 by Easy Software Products, all rights reserved.
9 #
10 # These coded instructions, statements, and computer programs are the
11 # property of Easy Software Products and are protected by Federal
12 # copyright law. Distribution and use rights are outlined in the file
13 # "LICENSE.txt" which should have been included with this file. If this
14 # file is missing or damaged please contact Easy Software Products
15 # at:
16 #
17 # Attn: CUPS Licensing Information
18 # Easy Software Products
19 # 44141 Airport View Drive, Suite 204
20 # Hollywood, Maryland 20636 USA
21 #
22 # Voice: (301) 373-9600
23 # EMail: cups-info@cups.org
24 # WWW: http://www.cups.org
25 #
26
27 # Conditional build options (--with name/--without name):
28 #
29 # dbus - Enable/disable DBUS support (default = enable)
30 # php - Enable/disable PHP support (default = enable)
31
32 %{!?_with_dbus: %{!?_without_dbus: %define _with_dbus --with-dbus}}
33 %{?_with_dbus: %define _dbus --enable-dbus}
34 %{!?_with_dbus: %define _dbus --disable-dbus}
35
36 %{!?_with_php: %{!?_without_php: %define _with_php --with-php}}
37 %{?_with_php: %define _php --with-php}
38 %{!?_with_php: %define _php --without-php}
39
40 Summary: Common UNIX Printing System
41 Name: cups
42 Version: @CUPS_VERSION@
43 Release: 0
44 Epoch: 1
45 License: GPL
46 Group: System Environment/Daemons
47 Source: ftp://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.gz
48 Url: http://www.cups.org
49 Packager: Anonymous <anonymous@foo.com>
50 Vendor: Easy Software Products
51
52 # Use buildroot so as not to disturb the version already installed
53 BuildRoot: /tmp/%{name}-root
54
55 # Dependencies...
56 Requires: %{name}-libs = %{epoch}:%{version}
57 Obsoletes: lpd, lpr, LPRng
58 Provides: lpd, lpr, LPRng
59
60 %package devel
61 Summary: Common UNIX Printing System - development environment
62 Group: Development/Libraries
63 Requires: %{name}-libs = %{epoch}:%{version}
64
65 %package libs
66 Summary: Common UNIX Printing System - shared libraries
67 Group: System Environment/Libraries
68 Provides: libcups1
69
70 %package lpd
71 Summary: Common UNIX Printing System - LPD support
72 Group: System Environment/Daemons
73 Requires: %{name} = %{epoch}:%{version} xinetd
74
75 %package es
76 Summary: Common UNIX Printing System - Spanish support
77 Group: System Environment/Daemons
78 Requires: %{name} = %{epoch}:%{version}
79
80 %package ja
81 Summary: Common UNIX Printing System - Japanese support
82 Group: System Environment/Daemons
83 Requires: %{name} = %{epoch}:%{version}
84
85 %if %{?_with_php:1}%{!?_with_php:0}
86 %package php
87 Summary: Common UNIX Printing System - PHP support
88 Group: Development/Languages
89 Requires: %{name}-libs = %{epoch}:%{version}
90 %endif
91
92 %description
93 The Common UNIX Printing System provides a portable printing layer for
94 UNIX® operating systems. It has been developed by Easy Software Products
95 to promote a standard printing solution for all UNIX vendors and users.
96 CUPS provides the System V and Berkeley command-line interfaces.
97
98 %description devel
99 The Common UNIX Printing System provides a portable printing layer for
100 UNIX® operating systems. This is the development package for creating
101 additional printer drivers and other CUPS services.
102
103 %description libs
104 The Common UNIX Printing System provides a portable printing layer for
105 UNIX® operating systems. This package contains the CUPS shared libraries.
106
107 %description lpd
108 The Common UNIX Printing System provides a portable printing layer for
109 UNIX® operating systems. This package provides LPD client support.
110
111 %description es
112 The Common UNIX Printing System provides a portable printing layer for
113 UNIX® operating systems. This package provides Spanish support.
114
115 %description ja
116 The Common UNIX Printing System provides a portable printing layer for
117 UNIX® operating systems. This package provides Japanese support.
118
119 %if %{?_with_php:1}%{!?_with_php:0}
120 %description php
121 The Common UNIX Printing System provides a portable printing layer for
122 UNIX® operating systems. This package provides PHP support.
123 %endif
124
125 %prep
126 %setup
127
128 %build
129 %ifarch x86_64
130 ./configure --enable-32bit %{_dbus} %{_php}
131 %else
132 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_OPT_FLAGS" \
133 ./configure %{_dbus} %{_php}
134 %endif
135 # If we got this far, all prerequisite libraries must be here.
136 make
137
138 %install
139 # Make sure the RPM_BUILD_ROOT directory exists.
140 rm -rf $RPM_BUILD_ROOT
141
142 make BUILDROOT=$RPM_BUILD_ROOT install
143
144 %post
145 /sbin/chkconfig --add cups
146 /sbin/chkconfig cups on
147
148 # Restart cupsd if we are upgrading...
149 if test $1 -gt 1; then
150 /sbin/service cups stop
151 /sbin/service cups start
152 fi
153
154 %post libs
155 /sbin/ldconfig
156
157 %preun
158 if test $1 = 0; then
159 /sbin/service cups stop
160 /sbin/chkconfig --del cups
161 fi
162
163 %postun
164 if test $1 -ge 1; then
165 /sbin/service cups stop
166 /sbin/service cups start
167 fi
168
169 %postun libs
170 /sbin/ldconfig
171
172 %clean
173 rm -rf $RPM_BUILD_ROOT
174
175 %files
176 %docdir /usr/share/doc/cups
177 %defattr(-,root,root)
178 %dir /etc/cups
179 %config(noreplace) /etc/cups/*.conf
180 /etc/cups/cupsd.conf.default
181 %dir /etc/cups/interfaces
182 /etc/cups/mime.types
183 /etc/cups/mime.convs
184 %dir /etc/cups/ppd
185
186 %if %{?_with_dbus:1}%{!?_with_dbus:0}
187 # DBUS
188 /etc/dbus-1/system.d/*
189 %endif
190
191 # PAM
192 %dir /etc/pam.d
193 /etc/pam.d/*
194
195 # RC dirs are a pain under Linux... Uncomment the appropriate ones if you
196 # don't use Red Hat or Mandrake...
197
198 /etc/init.d/*
199 /etc/rc0.d/*
200 /etc/rc2.d/*
201 /etc/rc3.d/*
202 /etc/rc5.d/*
203
204 # OLD RedHat/Mandrake
205 #/etc/rc.d/init.d/*
206 #/etc/rc.d/rc0.d/*
207 #/etc/rc.d/rc2.d/*
208 #/etc/rc.d/rc3.d/*
209 #/etc/rc.d/rc5.d/*
210
211 #/sbin/rc.d/*
212 #/sbin/rc.d/rc0.d/*
213 #/sbin/rc.d/rc2.d/*
214 #/sbin/rc.d/rc3.d/*
215 #/sbin/rc.d/rc5.d/*
216
217 /usr/bin/cancel
218 /usr/bin/cupstestppd
219 /usr/bin/lp*
220 %dir /usr/lib/cups
221 %dir /usr/lib/cups/backend
222 /usr/lib/cups/backend/http
223 /usr/lib/cups/backend/ipp
224 %attr(0700,root,root) /usr/lib/cups/backend/lpd
225 /usr/lib/cups/backend/parallel
226 /usr/lib/cups/backend/scsi
227 /usr/lib/cups/backend/serial
228 /usr/lib/cups/backend/socket
229 /usr/lib/cups/backend/usb
230 %dir /usr/lib/cups/cgi-bin
231 /usr/lib/cups/cgi-bin/*
232 %dir /usr/lib/cups/daemon
233 /usr/lib/cups/daemon/cups-deviced
234 /usr/lib/cups/daemon/cups-driverd
235 /usr/lib/cups/daemon/cups-polld
236 %dir /usr/lib/cups/driver
237 %dir /usr/lib/cups/filter
238 /usr/lib/cups/filter/*
239 %dir /usr/lib/cups/monitor
240 /usr/lib/cups/monitor/*
241 %dir /usr/lib/cups/notifier
242 /usr/lib/cups/notifier/*
243
244 /usr/sbin/*
245 %dir /usr/share/cups
246 /usr/share/cups/*
247 %dir /usr/share/doc/cups
248 /usr/share/doc/cups/*.*
249 %dir /usr/share/doc/cups/help
250 /usr/share/doc/cups/help/cgi.html
251 /usr/share/doc/cups/help/glossary.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/ref-*.html
258 /usr/share/doc/cups/help/security.html
259 /usr/share/doc/cups/help/standard.html
260 /usr/share/doc/cups/help/translation.html
261 /usr/share/doc/cups/help/whatsnew.html
262 %dir /usr/share/doc/cups/images
263 /usr/share/doc/cups/images/*
264
265 %dir /usr/share/man/man1
266 /usr/share/man/man1/cancel.1.gz
267 /usr/share/man/man1/cupstestppd.1.gz
268 /usr/share/man/man1/lp.1.gz
269 /usr/share/man/man1/lpoptions.1.gz
270 /usr/share/man/man1/lppasswd.1.gz
271 /usr/share/man/man1/lpq.1.gz
272 /usr/share/man/man1/lpr.1.gz
273 /usr/share/man/man1/lprm.1.gz
274 /usr/share/man/man1/lpstat.1.gz
275 %dir /usr/share/man/man5
276 /usr/share/man/man5/*
277 %dir /usr/share/man/man8
278 /usr/share/man/man8/accept.8.gz
279 /usr/share/man/man8/cupsaddsmb.8.gz
280 /usr/share/man/man8/cupsd.8.gz
281 /usr/share/man/man8/cupsdisable.8.gz
282 /usr/share/man/man8/cupsenable.8.gz
283 /usr/share/man/man8/cups-deviced.8.gz
284 /usr/share/man/man8/cups-driverd.8.gz
285 /usr/share/man/man8/cups-polld.8.gz
286 /usr/share/man/man8/lpadmin.8.gz
287 /usr/share/man/man8/lpc.8.gz
288 /usr/share/man/man8/lpinfo.8.gz
289 /usr/share/man/man8/lpmove.8.gz
290 /usr/share/man/man8/reject.8.gz
291
292 %dir /var/cache/cups
293 %dir /var/log/cups
294 %dir /var/run/cups
295 %attr(0711,lp,sys) %dir /var/run/cups/certs
296 %attr(0710,lp,sys) %dir /var/spool/cups
297 %attr(1770,lp,sys) %dir /var/spool/cups/tmp
298
299 # Desktop files
300 /usr/share/applications/*
301 /usr/share/icons/*
302
303 %files devel
304 %defattr(-,root,root)
305 %dir /usr/share/man/man1
306 /usr/share/man/man1/cups-config.1.gz
307 %dir /usr/share/man/man7
308 /usr/share/man/man7/*
309
310 /usr/bin/cups-config
311 %dir /usr/include/cups
312 /usr/include/cups/*
313 #/usr/lib/*.a
314 /usr/lib*/*.so
315
316 %dir /usr/share/doc/cups/help
317 /usr/share/doc/cups/help/api*.html
318 /usr/share/doc/cups/help/spec*.html
319
320 %files libs
321 %defattr(-,root,root)
322 /usr/lib*/*.so.*
323
324 %files lpd
325 %defattr(-,root,root)
326 /etc/xinetd.d/cups-lpd
327 %dir /usr/lib/cups
328 %dir /usr/lib/cups/daemon
329 /usr/lib/cups/daemon/cups-lpd
330 %dir /usr/share/man/man8
331 /usr/share/man/man8/cups-lpd.8.gz
332
333 %files es
334 %defattr(-,root,root)
335 %dir /usr/share/doc/cups/es
336 /usr/share/doc/cups/es/index.html
337 %dir /usr/share/doc/cups/es/images
338 /usr/share/doc/cups/es/images/*
339 %dir /usr/share/cups/templates/es
340 /usr/share/cups/templates/es/*
341 /usr/share/locale/es/cups_es.po
342
343 %files ja
344 %defattr(-,root,root)
345 %dir /usr/share/doc/cups/ja
346 /usr/share/doc/cups/ja/index.html
347 %dir /usr/share/doc/cups/ja/images
348 /usr/share/doc/cups/ja/images/*
349 %dir /usr/share/cups/templates/ja
350 /usr/share/cups/templates/ja/*
351 /usr/share/locale/ja/cups_ja.po
352
353 %if %{?_with_php:1}%{!?_with_php:0}
354 %files php
355 # PHP
356 /usr/lib*/php*
357 %endif
358
359
360 #
361 # End of "$Id: cups.spec.in 5310 2006-03-19 03:23:34Z mike $".
362 #