source: spec/trunk/SPECS/cups.spec@ 689

Last change on this file since 689 was 689, checked in by Silvan Scherrer, 10 years ago

cups: update to version 2.1.3

File size: 12.4 KB
Line 
1# this spec file is a combination from the fedora cups.spec and the
2# cups.spec as included in cups
3
4%define svn_url e:/trees/cups/trunk
5#define svn_url http://svn.netlabs.org/repos/ports/cups/trunk
6#define svn_rev 1357
7%define _strip_opts --compress -i "*.cgi" --debuginfo -i "*.cgi"
8
9%define _without_dbus 1
10%define _without_dnssd 1
11%define _without_systemd 1
12
13#
14# "$Id: cups.spec.in 9359 2010-11-11 19:09:24Z mike $"
15#
16# RPM "spec" file for CUPS.
17#
18# Original version by Jason McMullan <jmcc@ontv.com>.
19#
20# Copyright 2007-2015 by Apple Inc.
21# Copyright 1999-2007 by Easy Software Products, all rights reserved.
22#
23# These coded instructions, statements, and computer programs are the
24# property of Apple Inc. and are protected by Federal copyright
25# law. Distribution and use rights are outlined in the file "LICENSE.txt"
26# which should have been included with this file. If this file is
27# file is missing or damaged, see the license at "http://www.cups.org/".
28#
29
30# Conditional build options (--with name/--without name):
31#
32# dbus - Enable/disable DBUS support (default = enable)
33# dnssd - Enable/disable DNS-SD support (default = enable)
34# libusb1 - Enable/disable LIBUSB 1.0 support (default = enable)
35# static - Enable/disable static libraries (default = enable)
36# systemd - Enable/disable systemd support (default = enable)
37
38%{!?_with_dbus: %{!?_without_dbus: %define _with_dbus --with-dbus}}
39%{?_with_dbus: %define _dbus --enable-dbus}
40%{!?_with_dbus: %define _dbus --disable-dbus}
41
42%{!?_with_dnssd: %{!?_without_dnssd: %define _with_dnssd --with-dnssd}}
43%{?_with_dnssd: %define _dnssd --enable-dnssd}
44%{!?_with_dnssd: %define _dnssd --disable-dnssd}
45
46%{!?_with_libusb1: %{!?_without_libusb1: %define _with_libusb1 --with-libusb1}}
47%{?_with_libusb1: %define _libusb1 --enable-libusb}
48%{!?_with_libusb1: %define _libusb1 --disable-libusb}
49
50%{!?_with_static: %{!?_without_static: %define _without_static --without-static}}
51%{?_with_static: %define _static --enable-static}
52%{!?_with_static: %define _static --disable-static}
53
54%{!?_with_systemd: %{!?_without_systemd: %define _with_systemd --with-systemd}}
55%{?_with_systemd: %define _systemd --enable-systemd}
56%{!?_with_systemd: %define _systemd --disable-systemd}
57
58Summary: CUPS
59Name: cups
60Version: 2.1.3
61Release: 1%{?dist}
62Epoch: 1
63
64License: GPL
65Group: System Environment/Daemons
66
67Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
68
69Url: http://www.cups.org
70Vendor: bww bitwise works GmbH
71
72# Dependencies...
73Requires: %{name}-filesystem = %{epoch}:%{version}-%{release}
74Requires: %{name}-libs = %{epoch}:%{version}-%{release}
75Requires: %{name}-client = %{epoch}:%{version}-%{release}
76
77Provides: cupsddk, cupsddk-drivers
78
79%if %{?_with_dbus:1}%{!?_with_dbus:0}
80BuildRequires: dbus-devel
81%endif
82
83%if %{?_with_dnssd:1}%{!?_with_dnssd:0}
84BuildRequires: avahi-devel
85%endif
86
87%if %{?_with_libusb1:1}%{!?_with_libusb1:0}
88BuildRequires: libusb1-devel >= 1.0
89%endif
90
91%if %{?_with_systemd:1}%{!?_with_systemd:0}
92BuildRequires: systemd-devel
93%endif
94
95BuildRequires: libpng-devel, libjpeg-devel, libtiff-devel
96BuildRequires: openssl-devel, zlib-devel
97BuildRequires: libpoll-devel
98
99# Use buildroot so as not to disturb the version already installed
100BuildRoot: %{_tmppath}/%{name}-root
101
102%package client
103Summary: CUPS printing system - client programs
104Requires: %{name}-libs = %{epoch}:%{version}-%{release}
105Provides: lpr
106
107%package devel
108Summary: CUPS printing system - development environment
109Group: Development/Libraries
110Requires: %{name}-libs = %{epoch}:%{version}-%{release}
111Provides: cupsddk-devel
112
113%package libs
114Summary: CUPS printing system - shared libraries
115Group: System Environment/Libraries
116
117%package filesystem
118Summary: CUPS printing system - directory layout
119BuildArch: noarch
120
121%package lpd
122Summary: CUPS printing system - lpd emulation
123Group: System Environment/Daemons
124Requires: %{name} = %{epoch}:%{version}-%{release}
125Requires: %{name}-libs = %{epoch}:%{version}-%{release}
126Provides: lpd
127
128%package ipptool
129Summary: CUPS printing system - tool for performing IPP requests
130Requires: %{name} = %{epoch}:%{version}-%{release}
131
132%description
133CUPS printing system provides a portable printing layer for
134UNIX© operating systems. It has been developed by Apple Inc.
135to promote a standard printing solution for all UNIX vendors and users.
136CUPS provides the System V and Berkeley command-line interfaces.
137CUPS was ported to OS/2 to have the same benefit as UNIX has.
138
139%description client
140CUPS printing system provides a portable printing layer for
141UNIX© operating systems. This package contains command-line client
142programs.
143
144%description devel
145CUPS printing system provides a portable printing layer for
146UNIX© operating systems. This is the development package for creating
147additional printer drivers, and other CUPS services.
148
149%description libs
150CUPS printing system provides a portable printing layer for
151UNIX© operating systems. It has been developed by Apple Inc.
152to promote a standard printing solution for all UNIX vendors and users.
153CUPS provides the System V and Berkeley command-line interfaces.
154CUPS was ported to OS/2 to have the same benefit as UNIX has.
155The cups-libs package provides libraries used by applications to use CUPS
156natively, without needing the lpp/lpr commands.
157
158%description filesystem
159CUPS printing system provides a portable printing layer for
160UNIX© operating systems. This package provides some directories which are
161required by other packages that add CUPS drivers (i.e. filters, backends etc.)
162
163%description lpd
164CUPS printing system provides a portable printing layer for
165UNIX© operating systems. This is the package that provides standard
166lpd emulation.
167
168%description ipptool
169Sends IPP requests to the specified URI and tests and/or displays the result.
170
171%debug_package
172
173%prep
174%if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
175%setup -q
176%else
177%setup -n "%{name}-%{version}" -Tc
178svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
179rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
180(cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
181%endif
182
183autoconf --force
184
185%build
186export LDFLAGS=" -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp";
187export LIBS="-lurpo -lpoll";
188CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$LDFLAGS $RPM_OPT_FLAGS" \
189 %configure %{_dbus} %{_dnssd} %{_libusb1} %{_static}
190
191# If we got this far, all prerequisite libraries must be here.
192make
193
194%install
195# Make sure the RPM_BUILD_ROOT directory exists.
196rm -rf $RPM_BUILD_ROOT
197
198make BUILDROOT=$RPM_BUILD_ROOT install
199
200# remove not shipped files
201rm -rf %{buildroot}%{_initddir} \
202 %{buildroot}%{_sysconfdir}/init.d \
203 %{buildroot}%{_sysconfdir}/rc.d
204
205# rename some files
206for i in %{buildroot}%{_mandir}/man1/cancel \
207 %{buildroot}%{_mandir}/man1/lp \
208 %{buildroot}%{_mandir}/man1/lpq \
209 %{buildroot}%{_mandir}/man1/lprm \
210 %{buildroot}%{_mandir}/man1/lpstat; do
211 mv $i.1 $i-cups.1
212done
213
214mv %{buildroot}%{_mandir}/man8/lpc.8 %{buildroot}%{_mandir}/man8/lpc-cups.8
215
216%clean
217rm -rf $RPM_BUILD_ROOT
218
219%files
220%doc README.txt CREDITS.txt CHANGES.txt
221%docdir %{_datadir}/doc/cups
222%defattr(-,root,root)
223%dir %{_sysconfdir}/cups
224%config(noreplace) %{_sysconfdir}/cups/*.conf
225%{_sysconfdir}/cups/cups-files.conf.default
226%{_sysconfdir}/cups/cupsd.conf.default
227%{_sysconfdir}/cups/snmp.conf.default
228%dir %{_sysconfdir}/cups/interfaces
229%dir %{_sysconfdir}/cups/ppd
230%attr(0700,root,root) %dir %{_sysconfdir}/cups/ssl
231
232%if %{?_with_dbus:1}%{!?_with_dbus:0}
233# DBUS
234%{_sysconfdir}/dbus-1/system.d/*
235%endif
236
237%{_bindir}/cupstestdsc.exe
238%{_bindir}/cupstestppd.exe
239%dir %{_libdir}/cups
240%dir %{_libdir}/cups/backend
241%if %{?_with_dnssd:1}%{!?_with_dnssd:0}
242# DNS-SD
243%{_libdir}/cups/backend/dnssd
244%endif
245%{_libdir}/cups/backend/http
246#{_libdir}/cups/backend/https
247%attr(0700,root,root) %{_libdir}/cups/backend/ipp.exe
248#{_libdir}/cups/backend/ipps
249%attr(0700,root,root) %{_libdir}/cups/backend/lpd.exe
250%{_libdir}/cups/backend/snmp.exe
251%{_libdir}/cups/backend/socket.exe
252%{_libdir}/cups/backend/usb.exe
253%dir %{_libdir}/cups/cgi-bin
254%{_libdir}/cups/cgi-bin/*
255%dir %{_libdir}/cups/daemon
256%{_libdir}/cups/daemon/cups-deviced.exe
257%{_libdir}/cups/daemon/cups-driverd.exe
258%{_libdir}/cups/daemon/cups-exec.exe
259%dir %{_libdir}/cups/driver
260%dir %{_libdir}/cups/filter
261%{_libdir}/cups/filter/*
262%dir %{_libdir}/cups/monitor
263%{_libdir}/cups/monitor/*
264%dir %{_libdir}/cups/notifier
265%{_libdir}/cups/notifier/*
266
267%{_sbindir}/*
268%dir %{_datadir}/cups
269%dir %{_datadir}/cups/drv
270%{_datadir}/cups/drv/*
271%dir %{_datadir}/cups/mime
272%{_datadir}/cups/mime/*
273%dir %{_datadir}/cups/model
274%dir %{_datadir}/cups/ppdc
275%{_datadir}/cups/ppdc/*
276%dir %{_datadir}/cups/templates
277%{_datadir}/cups/templates/*
278%if %{?_with_libusb1:1}%{!?_with_libusb1:0}
279# LIBUSB quirks files
280%dir %{_datadir}/cups/usb
281%{_datadir}/cups/usb/*
282%endif
283
284%dir %{_datadir}/doc/cups
285%{_datadir}/doc/cups/*.*
286%dir %{_datadir}/doc/cups/help
287%{_datadir}/doc/cups/help/accounting.html
288%{_datadir}/doc/cups/help/cgi.html
289%{_datadir}/doc/cups/help/glossary.html
290%{_datadir}/doc/cups/help/kerberos.html
291%{_datadir}/doc/cups/help/license.html
292%{_datadir}/doc/cups/help/man-*.html
293%{_datadir}/doc/cups/help/network.html
294%{_datadir}/doc/cups/help/options.html
295%{_datadir}/doc/cups/help/overview.html
296%{_datadir}/doc/cups/help/policies.html
297%{_datadir}/doc/cups/help/ref-*.html
298%{_datadir}/doc/cups/help/security.html
299%{_datadir}/doc/cups/help/sharing.html
300%{_datadir}/doc/cups/help/translation.html
301%dir %{_datadir}/doc/cups/images
302%{_datadir}/doc/cups/images/*
303
304%dir %{_datadir}/doc/cups/de
305%{_datadir}/doc/cups/de/*
306%dir %{_datadir}/doc/cups/es
307%{_datadir}/doc/cups/es/*
308%dir %{_datadir}/doc/cups/ja
309%{_datadir}/doc/cups/ja/*
310%dir %{_datadir}/doc/cups/ru
311%{_datadir}/doc/cups/ru/*
312
313%{_datadir}/locale/*
314
315%dir %{_datadir}/man
316%dir %{_datadir}/man/man1
317%{_datadir}/man/man1/*.1
318%dir %{_datadir}/man/man5
319%{_datadir}/man/man5/*.5
320%dir %{_datadir}/man/man8
321%{_datadir}/man/man8/*.8
322
323%dir /%{_var}/cache/cups
324%attr(0775,root,sys) %dir /%{_var}/cache/cups/rss
325%dir /%{_var}/log/cups
326%dir /%{_var}/run/cups
327#%attr(0711,lp,sys) %dir /%{_var}/run/cups/certs
328%attr(0710,lp,sys) %dir /%{_var}/spool/cups
329%attr(1770,lp,sys) %dir /%{_var}/spool/cups/tmp
330
331%files client
332%{_sbindir}/lpc.exe
333%{_bindir}/cancel.exe
334%{_bindir}/lp*.exe
335%dir %{_datadir}/man/man1
336%{_datadir}/man/man1/lp*.1
337%{_datadir}/man/man1/cancel-cups*.1
338%dir %{_datadir}/man/man8
339%{_datadir}/man/man8/lpc-cups.8
340
341%files libs
342%doc LICENSE.txt
343%defattr(-,root,root)
344%{_libdir}/*.dll
345
346%files filesystem
347%dir %{_libdir}/cups
348%dir %{_libdir}/cups/backend
349%dir %{_libdir}/cups/driver
350%dir %{_libdir}/cups/filter
351%dir %{_datadir}/cups
352%dir %{_datadir}/cups/data
353%dir %{_datadir}/cups/drv
354%dir %{_datadir}/cups/mime
355%dir %{_datadir}/cups/model
356%dir %{_datadir}/cups/ppdc
357%dir %{_datadir}/ppd
358
359%files devel
360%defattr(-,root,root)
361%{_bindir}/cups-config
362%{_libdir}/*.a
363%dir %{_includedir}/cups
364%{_includedir}/cups/*
365%dir %{_datadir}/man
366%dir %{_datadir}/man/man1
367%{_datadir}/man/man1/cups-config.1
368
369%if %{?_with_static:1}%{!?_with_static:0}
370%{_libdir}/*_s.a
371%endif
372
373%files lpd
374%defattr(-,root,root)
375%if %{?_with_systemd:1}%{!?_with_systemd:0}
376# SystemD
377%{_libdir}/systemd/system/org.cups.cups-lpd*
378%else
379# Legacy xinetd
380#%{_sysconfdir}/xinetd.d/cups-lpd
381%endif
382
383%dir %{_libdir}/cups
384%dir %{_libdir}/cups/daemon
385%{_libdir}/cups/daemon/cups-lpd.exe
386%dir %{_datadir}/man/man8
387%{_datadir}/man/man8/cups-lpd.8
388
389%files ipptool
390%defattr(-,root,root)
391%if %{?_with_dnssd:1}%{!?_with_dnssd:0}
392%{_bindir}/ippfind.exe
393%endif
394%{_bindir}/ipptool.exe
395%dir %{_datadir}/cups/ipptool
396%{_datadir}/cups/ipptool/*
397%dir %{_datadir}/man/man1
398%{_datadir}/man/man1/ipptool*.1
399%dir %{_datadir}/man/man5
400%{_datadir}/man/man5/ipptool*.5
401
402%changelog
403* Mon Mar 07 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 2.1.3-1
404- updated to version 2.1.3
405
406* Fri Mar 04 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 1.4.8-5
407- fixed lpd
408- added more socketpair vs pipe changes
409- also compress and strip debug info from cgi files
410
411* Thu Jan 26 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 1.4.8-4
412- poppler-utils needs to be at least 0.38.0-2
413- remove wrong req for cups-lpr
414- install all .a files for the dll
415
416* Mon Jan 11 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 1.4.8-3
417- rebuild with latest libraries
418- adjusted debug package creation to latest rpm macros
419- add poppler-utils as a requirement
420
421* Sun Feb 15 2015 yd <yd@os2power.com> 1.4.8-1 1.4.8-2
422- rebuild for new libpng release.
423
424* Tue Dec 18 2014 yd
425- r944, initial unixroot build.
Note: See TracBrowser for help on using the repository browser.