| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- ##
- ## cups.spec -- OpenPKG RPM Package Specification
- ## Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
- ## the above copyright notice and this permission notice appear in all
- ## copies.
- ##
- ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
- ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- ## SUCH DAMAGE.
- ##
- # package information
- Name: cups
- Summary: Common Unix Printing System (CUPS)
- URL: http://www.cups.org/
- Vendor: Apple Inc.
- Packager: OpenPKG Foundation e.V.
- Distribution: OpenPKG Community
- Class: EVAL
- Group: Print
- License: GPL/LGPL (with exceptions)
- Version: 1.4.0
- Release: 20090829
- # package options
- %option with_ssl no
- # list of sources
- Source0: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2
- Source1: rc.cups
- Source2: cupsd.conf
- Patch0: cups.patch
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc, gcc::with_cxx = yes
- PreReq: OpenPKG, openpkg >= 20060823
- BuildPreReq: zlib, jpeg, png, tiff
- PreReq: zlib, jpeg, png, tiff
- %if "%{with_ssl}" == "yes"
- BuildPreReq: openssl
- PreReq: openssl
- %endif
- AutoReq: no
- AutoReqProv: no
- %description
- CUPS provides a portable printing layer for Unix-based operating
- systems. It has been developed to promote a standard printing
- solution for all Unix vendors and users. CUPS provides the System V
- and Berkeley command-line interfaces and uses the Internet Printing
- Protocol (IPP) as the basis for managing print jobs and queues.
- %track
- prog cups = {
- version = %{version}
- url = http://www.cups.org/software.php
- regex = cups-(\d+(\.\d+)+)-source\.tar\.bz2
- }
- %prep
- %setup -q
- %patch -p0
- %build
- CC="%{l_cc}" \
- CFLAGS="%{l_cflags -O} %{l_cppflags} -DPID_FILE='\"%{l_prefix}/var/cups/cupsd.pid\"'" \
- CPPFLAGS="%{l_cppflags} -DPID_FILE='\"%{l_prefix}/var/cups/cupsd.pid\"'" \
- LDFLAGS="%{l_ldflags}" \
- LIBS="-lz" \
- ./configure \
- --prefix=%{l_prefix} \
- --bindir=%{l_prefix}/libexec/cups \
- --sbindir=%{l_prefix}/libexec/cups \
- --mandir=%{l_prefix}/man \
- --with-docdir=%{l_prefix}/share/doc/cups \
- --localstatedir=%{l_prefix}/var/cups \
- --with-logdir=%{l_prefix}/var/cups/log \
- --with-rcdir='' \
- --sysconfdir=%{l_prefix}/etc \
- --with-cups-user=%{l_musr} \
- --with-cups-group=%{l_mgrp} \
- --disable-gssapi \
- --disable-slp \
- %if "%{with_ssl}" == "yes"
- --enable-ssl \
- --with-openssl-includes=%{l_prefix}/include/openssl \
- --with-openssl-libs=%{l_prefix}/lib \
- %else
- --disable-ssl \
- %endif
- --disable-pam \
- --disable-shared \
- --without-java \
- --without-perl \
- --without-php \
- --without-python
- %{l_make} %{l_mflags -O}
- %install
- rm -rf $RPM_BUILD_ROOT
- # install CUPS
- DSTROOT="$RPM_BUILD_ROOT" %{l_make} %{l_mflags} install
- # make binaries accessable (they have been relocated since most of
- # them are likely to cause name space conflicts)
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/bin
- for i in cups-config lp lpadmin lpc lpinfo lpmove lpoptions lpq lpr lprm \
- lpstat; do
- ln -s ../libexec/cups/$i $RPM_BUILD_ROOT%{l_prefix}/bin/$i
- done
- # create run-command script
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
- %{l_shtool} install -c -m 755 %{l_value -s -a} \
- %{SOURCE rc.cups} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
- # provide default configuration
- %{l_shtool} install -c -m 644 %{l_value -s -a} \
- %{SOURCE cupsd.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/cups/
- # strip installation
- rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/cat*
- rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
- for lang in de fr; do
- rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/$lang || true
- rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc/cups/$lang || true
- rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/cups/templates/$lang || true
- done
- # generate file list
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
- '%config %{l_prefix}/etc/cups/*'
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
- %post
- # after upgrade, restart service
- [ $1 -eq 2 ] || exit 0
- eval `%{l_rc} cups status 2>/dev/null`
- [ ".$cups_active" = .yes ] && %{l_rc} cups restart
- exit 0
- %preun
- # before erase, stop service and remove log files
- [ $1 -eq 0 ] || exit 0
- %{l_rc} cups stop 2>/dev/null
- rm -f $RPM_INSTALL_PREFIX/var/cups/log/* >/dev/null 2>&1 || true
- exit 0
|