# HG changeset patch # User Pascal Bellard # Date 1234430460 0 # Node ID 06e49b6e442027252723319c788e172350e4becc # Parent a24865656800d041c7e5c1f4b1c57a4ac61b2b11 Add cups-pam diff -r a24865656800 -r 06e49b6e4420 cups-pam/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cups-pam/receipt Thu Feb 12 09:21:00 2009 +0000 @@ -0,0 +1,76 @@ +# SliTaz package receipt. + +PACKAGE="cups-pam" +VERSION="1.3.9" +CATEGORY="system-tools" +SHORT_DESC="Common UNIX Printing System with pam support." +MAINTAINER="pascal.bellard@slitaz.org" +DEPENDS="openssl slitaz-base-files gnutls ghostscript dbus pam" +BUILD_DEPENDS="openssl-dev gnutls-dev ghostscript dbus-dev pam pam-dev" +SOURCE="cups" +TARBALL="$SOURCE-$VERSION-source.tar.bz2" +WEB_SITE="http://www.cups.org/" +WGET_URL="http://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/cups/$VERSION/$TARBALL" +PROVIDE="cups:pam" + +# Rules to configure and make the package. +compile_rules() +{ + cd $src + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/share/man \ + --enable-static \ + --enable-pam \ + --disable-ldap \ + --with-cups-user=nobody \ + --with-cups-group=nogroup \ + --with-languages="de es fr" \ + $CONFIGURE_ARGS && + make && + make BUILDROOT=$PWD/_pkg install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/etc $fs/usr/lib $fs/usr/share + + cp -a $_pkg/etc/cups $fs/etc + cp -a $_pkg/etc/dbus* $fs/etc + cp -a $_pkg/usr/bin $fs/usr + cp -a $_pkg/usr/sbin $fs/usr + cp -a $_pkg/usr/lib/*.so* $fs/usr/lib + cp -a $_pkg/usr/lib/cups $fs/usr/lib + cp -a $_pkg/usr/share/cups $fs/usr/share + cp -a $_pkg/var $fs + + # We need the doc for CSS, images and help in the web interface. + cp -a $_pkg/usr/share/doc $fs/usr/share + + # Daemon script + cp -a stuff/etc $fs +} + +# Start cups daemon and edit daemons.conf. +post_install() +{ + local root + root=$1 + if [ -z "$root" ]; then + /etc/init.d/cupsd start || continue + fi + if ! grep -q ^CUPSD_OPTIONS $root/etc/daemons.conf; then + echo '# Cups printing daemon options.' >> $root/etc/daemons.conf + echo 'CUPSD_OPTIONS=""' >> $root/etc/daemons.conf + echo '' >> $root/etc/daemons.conf + fi +} + +# Stop cups daemon before rm. +pre_remove() +{ + /etc/init.d/cupsd stop +} diff -r a24865656800 -r 06e49b6e4420 cups/receipt --- a/cups/receipt Thu Feb 12 08:58:48 2009 +0000 +++ b/cups/receipt Thu Feb 12 09:21:00 2009 +0000 @@ -54,10 +54,11 @@ # Start cups daemon and edit daemons.conf. post_install() { - /etc/init.d/cupsd start || continue - local root root=$1 + if [ -z "$root" ]; then + /etc/init.d/cupsd start || continue + fi if ! grep -q ^CUPSD_OPTIONS $root/etc/daemons.conf; then echo '# Cups printing daemon options.' >> $root/etc/daemons.conf echo 'CUPSD_OPTIONS=""' >> $root/etc/daemons.conf