wok diff cups/receipt @ rev 632

Add: cups (Common UNIX Printing System)
author Christophe Lincoln <pankso@slitaz.org>
date Mon Apr 21 15:45:27 2008 +0200 (2008-04-21)
parents
children 2f416a878f2e
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/cups/receipt	Mon Apr 21 15:45:27 2008 +0200
     1.3 @@ -0,0 +1,63 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="cups"
     1.7 +VERSION="1.3.7"
     1.8 +CATEGORY="system-tools"
     1.9 +SHORT_DESC="Common UNIX Printing System."
    1.10 +MAINTAINER="pankso@slitaz.org"
    1.11 +DEPENDS="openssl"
    1.12 +BUILD_DEPENDS="openssl-dev"
    1.13 +TARBALL="$PACKAGE-$VERSION-source.tar.bz2"
    1.14 +WEB_SITE="http://www.cups.org/"
    1.15 +WGET_URL="http://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/cups/$VERSION/$TARBALL"
    1.16 +
    1.17 +# Rules to configure and make the package.
    1.18 +compile_rules()
    1.19 +{
    1.20 +	cd $src
    1.21 +	./configure \
    1.22 +		--prefix=$PWD/_pkg/usr \
    1.23 +		--sysconfdir=$PWD/_pkg/etc \
    1.24 +		--localstatedir=$PWD/_pkg/var \
    1.25 +		--mandir=$PWD/_pkg/usr/share/man \
    1.26 +		$CONFIGURE_ARGS
    1.27 +	make
    1.28 +	make install
    1.29 +}
    1.30 +
    1.31 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.32 +genpkg_rules()
    1.33 +{
    1.34 +	mkdir -p $fs/etc $fs/usr/lib $fs/usr/share
    1.35 +	
    1.36 +	cp -a $_pkg/etc/cups $fs/etc
    1.37 +	cp -a $_pkg/usr/bin $fs/usr
    1.38 +	cp -a $_pkg/usr/sbin $fs/usr
    1.39 +	cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
    1.40 +	cp -a $_pkg/usr/lib/cups $fs/usr/lib
    1.41 +	cp -a $_pkg/usr/share/cups $fs/usr/share
    1.42 +	cp -a $_pkg/var $fs
    1.43 +
    1.44 +	# Daemon script
    1.45 +	cp -a stuff/etc $fs
    1.46 +}
    1.47 +
    1.48 +# Start cups daemon and edit daemons.conf.
    1.49 +post_install()
    1.50 +{
    1.51 +	/etc/init.d/cupsd start || continue
    1.52 +	
    1.53 +	local root
    1.54 +	root=$1
    1.55 +	if ! grep -q ^CUPSD_OPTIONS $root/etc/daemons.conf; then
    1.56 +		echo '# Cups printing daemon options.' >> $root/etc/daemons.conf
    1.57 +		echo 'CUPSD_OPTIONS=""' >> $root/etc/daemons.conf
    1.58 +		echo '' >> $root/etc/daemons.conf
    1.59 +	fi
    1.60 +}
    1.61 +
    1.62 +# Stop cups daemon before rm.
    1.63 +pre_remove()
    1.64 +{
    1.65 +	/etc/init.d/cupsd stop
    1.66 +}