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

Last change on this file since 1036 was 760, checked in by Silvan Scherrer, 9 years ago

spec: cups: fix absent timestamps in webinterface

File size: 14.7 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 1564
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: 7%{?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# Make sure we have some filters for converting to raster format
80Requires: cups-filters
81
82%if %{?_with_dbus:1}%{!?_with_dbus:0}
83BuildRequires: dbus-devel
84%endif
85
86%if %{?_with_dnssd:1}%{!?_with_dnssd:0}
87BuildRequires: avahi-devel
88%endif
89
90%if %{?_with_libusb1:1}%{!?_with_libusb1:0}
91BuildRequires: libusb1-devel >= 1.0
92%endif
93
94%if %{?_with_systemd:1}%{!?_with_systemd:0}
95BuildRequires: systemd-devel
96%endif
97
98BuildRequires: libpng-devel, libjpeg-devel, libtiff-devel
99BuildRequires: openssl-devel, zlib-devel
100BuildRequires: libpoll-devel
101
102# Use buildroot so as not to disturb the version already installed
103BuildRoot: %{_tmppath}/%{name}-root
104
105%package devel
106Summary: CUPS printing system - development environment
107Group: Development/Libraries
108Requires: %{name}-libs = %{epoch}:%{version}-%{release}
109Provides: cupsddk-devel
110
111%package libs
112Summary: CUPS printing system - shared libraries
113Group: System Environment/Libraries
114
115%package filesystem
116Summary: CUPS printing system - directory layout
117BuildArch: noarch
118
119%package lpd
120Summary: CUPS printing system - lpd emulation
121Group: System Environment/Daemons
122Requires: %{name} = %{epoch}:%{version}-%{release}
123Requires: %{name}-libs = %{epoch}:%{version}-%{release}
124Provides: lpd
125
126%package ipptool
127Summary: CUPS printing system - tool for performing IPP requests
128Requires: %{name} = %{epoch}:%{version}-%{release}
129
130%package client
131Summary: CUPS printing system - client programs
132Requires: %{name}-libs = %{epoch}:%{version}-%{release}
133Provides: lpr
134
135%description
136CUPS printing system provides a portable printing layer for
137UNIX© operating systems. It has been developed by Apple Inc.
138to promote a standard printing solution for all UNIX vendors and users.
139CUPS provides the System V and Berkeley command-line interfaces.
140CUPS was ported to OS/2 to have the same benefit as UNIX has.
141
142%description client
143CUPS printing system provides a portable printing layer for
144UNIX© operating systems. This package contains command-line client
145programs.
146
147%description devel
148CUPS printing system provides a portable printing layer for
149UNIX© operating systems. This is the development package for creating
150additional printer drivers, and other CUPS services.
151
152%description libs
153CUPS printing system provides a portable printing layer for
154UNIX© operating systems. It has been developed by Apple Inc.
155to promote a standard printing solution for all UNIX vendors and users.
156CUPS provides the System V and Berkeley command-line interfaces.
157CUPS was ported to OS/2 to have the same benefit as UNIX has.
158The cups-libs package provides libraries used by applications to use CUPS
159natively, without needing the lpp/lpr commands.
160
161%description filesystem
162CUPS printing system provides a portable printing layer for
163UNIX© operating systems. This package provides some directories which are
164required by other packages that add CUPS drivers (i.e. filters, backends etc.)
165
166%description lpd
167CUPS printing system provides a portable printing layer for
168UNIX© operating systems. This is the package that provides standard
169lpd emulation.
170
171%description ipptool
172Sends IPP requests to the specified URI and tests and/or displays the result.
173
174%debug_package
175
176%prep
177%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}
178%setup -q
179%else
180%setup -n "%{name}-%{version}" -Tc
181svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
182rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
183(cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
184%endif
185
186autoconf --force
187
188%build
189export LDFLAGS=" -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
190export LIBS="-lurpo -lpoll"
191# --with-rcdir=no - don't install SysV init script
192# --with-system_groups=admin - add a value to SystemGroups parameter
193CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$LDFLAGS $RPM_OPT_FLAGS" \
194 %configure %{_dbus} %{_dnssd} %{_libusb1} %{_static} \
195 --with-rcdir=no \
196 --with-system_groups=admin \
197 --with-cupsd_file_perm=755
198
199# If we got this far, all prerequisite libraries must be here.
200make
201
202%install
203# Make sure the RPM_BUILD_ROOT directory exists.
204rm -rf $RPM_BUILD_ROOT
205
206make BUILDROOT=$RPM_BUILD_ROOT install
207
208# rename some files
209mv %{buildroot}%{_mandir}/man1/cancel.1 %{buildroot}%{_mandir}/man1/cancel-cups.1
210mv %{buildroot}%{_mandir}/man1/lp.1 %{buildroot}%{_mandir}/man1/lp-cups.1
211mv %{buildroot}%{_mandir}/man1/lpq.1 %{buildroot}%{_mandir}/man1/lpq-cups.1
212mv %{buildroot}%{_mandir}/man1/lprm.1 %{buildroot}%{_mandir}/man1/lprm-cups.1
213mv %{buildroot}%{_mandir}/man1/lpstat.1 %{buildroot}%{_mandir}/man1/lpstat-cups.1
214mv %{buildroot}%{_mandir}/man8/lpc.8 %{buildroot}%{_mandir}/man8/lpc-cups.8
215
216# Ship an rpm macro for where to put driver executables
217mkdir -p %{buildroot}/%{_rpmconfigdir}/macros.d
218install -m 0644 %{_builddir}/%{buildsubdir}/macros.cups %{buildroot}%{_rpmconfigdir}/macros.d
219
220%clean
221rm -rf $RPM_BUILD_ROOT
222
223%files
224%doc README.txt CREDITS.txt CHANGES.txt
225%docdir %{_datadir}/doc/cups
226%defattr(-,root,root)
227%dir %{_sysconfdir}/cups
228%config(noreplace) %{_sysconfdir}/cups/*.conf
229%{_sysconfdir}/cups/cups-files.conf.default
230%{_sysconfdir}/cups/cupsd.conf.default
231%{_sysconfdir}/cups/snmp.conf.default
232%dir %{_sysconfdir}/cups/interfaces
233%dir %{_sysconfdir}/cups/ppd
234%attr(0700,root,root) %dir %{_sysconfdir}/cups/ssl
235
236%if %{?_with_dbus:1}%{!?_with_dbus:0}
237# DBUS
238%{_sysconfdir}/dbus-1/system.d/*
239%endif
240
241%{_bindir}/cupstestdsc.exe
242%{_bindir}/cupstestppd.exe
243%dir %{_libdir}/cups
244%dir %{_libdir}/cups/backend
245%if %{?_with_dnssd:1}%{!?_with_dnssd:0}
246# DNS-SD
247%{_libdir}/cups/backend/dnssd
248%endif
249%{_libdir}/cups/backend/http
250#{_libdir}/cups/backend/https
251%attr(0700,root,root) %{_libdir}/cups/backend/ipp.exe
252#{_libdir}/cups/backend/ipps
253%attr(0700,root,root) %{_libdir}/cups/backend/lpd.exe
254%{_libdir}/cups/backend/snmp.exe
255%{_libdir}/cups/backend/socket.exe
256%{_libdir}/cups/backend/usb.exe
257%dir %{_libdir}/cups/cgi-bin
258%{_libdir}/cups/cgi-bin/*.cgi
259%dir %{_libdir}/cups/daemon
260%{_libdir}/cups/daemon/cups-deviced.exe
261%{_libdir}/cups/daemon/cups-driverd.exe
262%{_libdir}/cups/daemon/cups-exec.exe
263%dir %{_libdir}/cups/driver
264%dir %{_libdir}/cups/filter
265%{_libdir}/cups/filter/*.exe
266%dir %{_libdir}/cups/monitor
267%{_libdir}/cups/monitor/*.exe
268%dir %{_libdir}/cups/notifier
269%{_libdir}/cups/notifier/*.exe
270
271%{_sbindir}/cups*.exe
272%{_sbindir}/lpadmin.exe
273%{_sbindir}/lpinfo.exe
274%{_sbindir}/lpmove.exe
275%{_sbindir}/accept.exe
276%{_sbindir}/reject.exe
277%{_datadir}/cups/drv/*
278%{_datadir}/cups/mime/*
279%{_datadir}/cups/ppdc/*
280%dir %{_datadir}/cups/templates
281%{_datadir}/cups/templates/*
282%if %{?_with_libusb1:1}%{!?_with_libusb1:0}
283# LIBUSB quirks files
284%dir %{_datadir}/cups/usb
285%{_datadir}/cups/usb/*
286%endif
287
288%dir %{_datadir}/doc/cups
289%{_datadir}/doc/cups/*.*
290%dir %{_datadir}/doc/cups/help
291%{_datadir}/doc/cups/help/accounting.html
292%{_datadir}/doc/cups/help/cgi.html
293%{_datadir}/doc/cups/help/glossary.html
294%{_datadir}/doc/cups/help/kerberos.html
295%{_datadir}/doc/cups/help/license.html
296%{_datadir}/doc/cups/help/man-*.html
297%{_datadir}/doc/cups/help/network.html
298%{_datadir}/doc/cups/help/options.html
299%{_datadir}/doc/cups/help/overview.html
300%{_datadir}/doc/cups/help/policies.html
301%{_datadir}/doc/cups/help/ref-*.html
302%{_datadir}/doc/cups/help/security.html
303%{_datadir}/doc/cups/help/sharing.html
304%{_datadir}/doc/cups/help/translation.html
305%dir %{_datadir}/doc/cups/images
306%{_datadir}/doc/cups/images/*
307
308%dir %{_datadir}/doc/cups/de
309%{_datadir}/doc/cups/de/*
310%dir %{_datadir}/doc/cups/es
311%{_datadir}/doc/cups/es/*
312%dir %{_datadir}/doc/cups/ja
313%{_datadir}/doc/cups/ja/*
314%dir %{_datadir}/doc/cups/ru
315%{_datadir}/doc/cups/ru/*
316
317%{_datadir}/locale/*
318
319%dir %{_datadir}/man
320%dir %{_datadir}/man/man1
321%{_datadir}/man/man1/*.1
322%exclude %{_datadir}/man/man1/ppd*.1
323%exclude %{_datadir}/man/man1/cups-config.1
324%exclude %{_datadir}/man/man1/ipptool*.1
325%exclude %{_datadir}/man/man1/cancel-cups*.1
326%exclude %{_datadir}/man/man1/lp*.1
327%dir %{_datadir}/man/man5
328%{_datadir}/man/man5/*.5
329%exclude %{_datadir}/man/man5/ppdcfile.5
330%exclude %{_datadir}/man/man5/ipptool*.5
331%dir %{_datadir}/man/man8
332%{_datadir}/man/man8/*.8
333%exclude %{_datadir}/man/man8/cups-lpd.8
334%exclude %{_datadir}/man/man8/lpc-cups.8
335
336%dir %{_var}/cache/cups
337%attr(0775,root,root) %dir %{_var}/cache/cups/rss
338%dir %{_var}/log/cups
339%dir %{_var}/run/cups
340#attr(0711,root,root) %dir %{_var}/run/cups/certs
341%attr(0710,root,root) %dir %{_var}/spool/cups
342%attr(1770,root,root) %dir %{_var}/spool/cups/tmp
343
344%files client
345%{_sbindir}/lpc.exe
346%{_bindir}/cancel.exe
347%{_bindir}/lp*.exe
348%dir %{_datadir}/man/man1
349%{_datadir}/man/man1/lp*.1
350%{_datadir}/man/man1/cancel-cups*.1
351%dir %{_datadir}/man/man8
352%{_datadir}/man/man8/lpc-cups.8
353
354%files libs
355%doc LICENSE.txt
356%defattr(-,root,root)
357%{_libdir}/*.dll
358
359%files filesystem
360%dir %{_libdir}/cups
361%dir %{_libdir}/cups/backend
362%dir %{_libdir}/cups/driver
363%dir %{_libdir}/cups/filter
364%dir %{_datadir}/cups
365%dir %{_datadir}/cups/data
366%dir %{_datadir}/cups/drv
367%dir %{_datadir}/cups/mime
368%dir %{_datadir}/cups/model
369%dir %{_datadir}/cups/ppdc
370#dir %{_datadir}/ppd
371
372%files devel
373%defattr(-,root,root)
374%{_bindir}/cups-config
375%{_bindir}/ppd*.exe
376%{_libdir}/*.a
377%dir %{_includedir}/cups
378%{_includedir}/cups/*
379%{_rpmconfigdir}/macros.d/macros.cups
380
381%dir %{_datadir}/cups/examples
382%{_datadir}/cups/examples/*
383%dir %{_datadir}/man
384%dir %{_datadir}/man/man1
385%{_datadir}/man/man1/cups-config.1
386%{_datadir}/man/man1/ppd*.1
387%dir %{_datadir}/man/man5
388%{_datadir}/man/man5/ppdcfile.5
389%dir %{_datadir}/man/man7
390%{_datadir}/man/man7/backend.7
391%{_datadir}/man/man7/filter.7
392%{_datadir}/man/man7/notifier.7
393
394%if %{?_with_static:1}%{!?_with_static:0}
395%{_libdir}/*_s.a
396%endif
397
398%dir %{_datadir}/doc/cups/help
399%{_datadir}/doc/cups/help/api*.html
400%{_datadir}/doc/cups/help/postscript-driver.html
401%{_datadir}/doc/cups/help/ppd-compiler.html
402%{_datadir}/doc/cups/help/raster-driver.html
403%{_datadir}/doc/cups/help/spec*.html
404
405%files lpd
406%defattr(-,root,root)
407%if %{?_with_systemd:1}%{!?_with_systemd:0}
408# SystemD
409%{_libdir}/systemd/system/org.cups.cups-lpd*
410%else
411# Legacy xinetd
412#{_sysconfdir}/xinetd.d/cups-lpd
413%endif
414
415%dir %{_libdir}/cups
416%dir %{_libdir}/cups/daemon
417%{_libdir}/cups/daemon/cups-lpd.exe
418%dir %{_datadir}/man/man8
419%{_datadir}/man/man8/cups-lpd.8
420
421%files ipptool
422%defattr(-,root,root)
423%if %{?_with_dnssd:1}%{!?_with_dnssd:0}
424%{_bindir}/ippfind.exe
425%endif
426%{_bindir}/ipptool.exe
427%dir %{_datadir}/cups/ipptool
428%{_datadir}/cups/ipptool/*
429%dir %{_datadir}/man/man1
430%{_datadir}/man/man1/ipptool*.1
431%dir %{_datadir}/man/man5
432%{_datadir}/man/man5/ipptool*.5
433
434%changelog
435* Thu May 12 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 2.1.3-7
436- fix timestamps absence in the jobs part of the webinterface
437
438* Wed May 11 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 2.1.3-6
439- disable the use of poll completely (fixes printing of large pdf)
440
441* Fri Apr 29 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 2.1.3-5
442- fix version info in german indeex.html (upstream bug)
443- workaround for the webinterface issues (select() hack)
444- remove .exe in httpSeperateURI
445- don't deliver readonly cupsd
446
447* Tue Apr 19 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 2.1.3-4
448- add req for cups-filters
449- don't use posix_spawn
450
451* Wed Mar 16 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 2.1.3-3
452- ship a rpm macro for cups_serverbin
453- removed dbg packages from sbin dir in normal installation
454
455* Fri Mar 11 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 2.1.3-2
456- removed dbg packages from normal installation
457- added SystemGroups value
458- fixed some pipe() problems
459
460* Mon Mar 07 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 2.1.3-1
461- updated to version 2.1.3
462
463* Fri Mar 04 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 1.4.8-5
464- fixed lpd
465- added more socketpair vs pipe changes
466- also compress and strip debug info from cgi files
467
468* Tue Jan 26 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 1.4.8-4
469- poppler-utils needs to be at least 0.38.0-2
470- remove wrong req for cups-lpr
471- install all .a files for the dll
472
473* Mon Jan 11 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 1.4.8-3
474- rebuild with latest libraries
475- adjusted debug package creation to latest rpm macros
476- add poppler-utils as a requirement
477
478* Sun Feb 15 2015 yd <yd@os2power.com> 1.4.8-1 1.4.8-2
479- rebuild for new libpng release.
480
481* Thu Dec 18 2014 yd
482- r944, initial unixroot build.
Note: See TracBrowser for help on using the repository browser.