Browse Source

new package: cups 1.1.19 (Common Unix Printing System) Package _not_ usable yet, needs lot of improvements!

master
Christoph Schug 23 years ago committed by Ralf S. Engelschall
parent
commit
fbd19332ea
  1. 158
      cups/cups.spec

158
cups/cups.spec

@ -0,0 +1,158 @@
##
## cups.spec -- OpenPKG RPM Specification
## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
##
## 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
URL: http://www.cups.org/
Vendor: Easy Software Products
Packager: The OpenPKG Project
Distribution: OpenPKG [JUNK]
Group: Print
License: GPL/LGPL with exceptions
Version: 1.1.19
Release: 20030606
# package options
%option with_openssl no
# list of sources
Source0: ftp://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 >= 20030103, make, gcc, zlib, jpeg, png, tiff
PreReq: OpenPKG, openpkg >= 20030103
%if "%{with_openssl}" == "yes"
BuildPreReq: openssl
%endif
AutoReq: no
AutoReqProv: no
%description
CUPS provides a portable printing layer for Unix-based operating
systems. It has been developed by Easy Software Products 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.
%prep
%setup -q
%patch -p0
%{l_shtool} subst \
-e 's;^.SILENT:.*$;;' \
Makedefs.in
%{l_shtool} subst \
-e 's;$libdir/cups;$exec_prefix/libexec/cups;g' \
-e 's;/spool/cups;/spool;g' \
config-scripts/cups-directories.m4 \
configure
%{l_shtool} subst \
-e 's;^\( $(LN)\) ../sbin/\(accept $(BINDIR)/.*\)$;\1 \2;' \
systemv/Makefile
%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\"'" \
./configure \
--prefix=%{l_prefix} \
--bindir=%{l_prefix}/libexec/cups \
--sbindir=%{l_prefix}/libexec/cups \
--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-slp \
%if "%{with_openssl}" == "yes"
--enable-ssl \
--with-openssl-includes=%{l_prefix}/include/openssl \
--with-openssl-libs=%{l_prefix}/lib \
%else
--disable-ssl \
%endif
--disable-pam \
--disable-shared
%{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 \
-e 's;@l_prefix@;%{l_prefix};g' \
-e 's;@l_susr@;%{l_susr};g' \
-e 's;@l_sgrp@;%{l_sgrp};g' \
%{SOURCE rc.cups} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
# provide default configuration
%{l_shtool} install -c -m 644 \
-e 's;@l_prefix@;%{l_prefix};g' \
-e 's;@l_sgrp@;%{l_sgrp};g' \
-e 's;@l_musr@;%{l_musr};g' \
-e 's;@l_mgrp@;%{l_mgrp};g' \
%{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
Loading…
Cancel
Save