wok rev 2219

Add cups-pam
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Feb 12 09:21:00 2009 +0000 (2009-02-12)
parents a24865656800
children e0f83290a5a4
files cups-pam/receipt cups/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/cups-pam/receipt	Thu Feb 12 09:21:00 2009 +0000
     1.3 @@ -0,0 +1,76 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="cups-pam"
     1.7 +VERSION="1.3.9"
     1.8 +CATEGORY="system-tools"
     1.9 +SHORT_DESC="Common UNIX Printing System with pam support."
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +DEPENDS="openssl slitaz-base-files gnutls ghostscript dbus pam"
    1.12 +BUILD_DEPENDS="openssl-dev gnutls-dev ghostscript dbus-dev pam pam-dev"
    1.13 +SOURCE="cups"
    1.14 +TARBALL="$SOURCE-$VERSION-source.tar.bz2"
    1.15 +WEB_SITE="http://www.cups.org/"
    1.16 +WGET_URL="http://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/cups/$VERSION/$TARBALL"
    1.17 +PROVIDE="cups:pam"
    1.18 +
    1.19 +# Rules to configure and make the package.
    1.20 +compile_rules()
    1.21 +{
    1.22 +	cd $src
    1.23 +	./configure \
    1.24 +		--prefix=/usr \
    1.25 +		--sysconfdir=/etc \
    1.26 +		--localstatedir=/var \
    1.27 +		--mandir=/usr/share/man \
    1.28 +		--enable-static \
    1.29 +		--enable-pam \
    1.30 +		--disable-ldap \
    1.31 +		--with-cups-user=nobody \
    1.32 +		--with-cups-group=nogroup \
    1.33 +		--with-languages="de es fr" \
    1.34 +		$CONFIGURE_ARGS &&
    1.35 +	make &&
    1.36 +	make BUILDROOT=$PWD/_pkg install
    1.37 +}
    1.38 +
    1.39 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.40 +genpkg_rules()
    1.41 +{
    1.42 +	mkdir -p $fs/etc $fs/usr/lib $fs/usr/share
    1.43 +	
    1.44 +	cp -a $_pkg/etc/cups $fs/etc
    1.45 +	cp -a $_pkg/etc/dbus* $fs/etc
    1.46 +	cp -a $_pkg/usr/bin $fs/usr
    1.47 +	cp -a $_pkg/usr/sbin $fs/usr
    1.48 +	cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
    1.49 +	cp -a $_pkg/usr/lib/cups $fs/usr/lib
    1.50 +	cp -a $_pkg/usr/share/cups $fs/usr/share
    1.51 +	cp -a $_pkg/var $fs
    1.52 +	
    1.53 +	# We need the doc for CSS, images and help in the web interface.
    1.54 +	cp -a $_pkg/usr/share/doc $fs/usr/share
    1.55 +
    1.56 +	# Daemon script
    1.57 +	cp -a stuff/etc $fs
    1.58 +}
    1.59 +
    1.60 +# Start cups daemon and edit daemons.conf.
    1.61 +post_install()
    1.62 +{
    1.63 +	local root
    1.64 +	root=$1
    1.65 +	if [ -z "$root" ]; then
    1.66 +		/etc/init.d/cupsd start || continue
    1.67 +	fi
    1.68 +	if ! grep -q ^CUPSD_OPTIONS $root/etc/daemons.conf; then
    1.69 +		echo '# Cups printing daemon options.' >> $root/etc/daemons.conf
    1.70 +		echo 'CUPSD_OPTIONS=""' >> $root/etc/daemons.conf
    1.71 +		echo '' >> $root/etc/daemons.conf
    1.72 +	fi
    1.73 +}
    1.74 +
    1.75 +# Stop cups daemon before rm.
    1.76 +pre_remove()
    1.77 +{
    1.78 +	/etc/init.d/cupsd stop
    1.79 +}
     2.1 --- a/cups/receipt	Thu Feb 12 08:58:48 2009 +0000
     2.2 +++ b/cups/receipt	Thu Feb 12 09:21:00 2009 +0000
     2.3 @@ -54,10 +54,11 @@
     2.4  # Start cups daemon and edit daemons.conf.
     2.5  post_install()
     2.6  {
     2.7 -	/etc/init.d/cupsd start || continue
     2.8 -	
     2.9  	local root
    2.10  	root=$1
    2.11 +	if [ -z "$root" ]; then
    2.12 +		/etc/init.d/cupsd start || continue
    2.13 +	fi
    2.14  	if ! grep -q ^CUPSD_OPTIONS $root/etc/daemons.conf; then
    2.15  		echo '# Cups printing daemon options.' >> $root/etc/daemons.conf
    2.16  		echo 'CUPSD_OPTIONS=""' >> $root/etc/daemons.conf