wok annotate cups-pam/receipt @ rev 13740

Move from undigest: kivy gmerlin glances phproxy zonecheck ledger
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Dec 26 15:50:31 2012 +0100 (2012-12-26)
parents e32ef0d4b84f
children 69557c05e267
rev   line source
pascal@2219 1 # SliTaz package receipt.
pascal@2219 2
pascal@2219 3 PACKAGE="cups-pam"
erjo@13049 4 VERSION="1.5.3"
pascal@2219 5 CATEGORY="system-tools"
pascal@2219 6 SHORT_DESC="Common UNIX Printing System with pam support."
pascal@2219 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@2433 8 DEPENDS="openssl slitaz-base-files gnutls ghostscript dbus jpeg libpng tiff \
pascal@4999 9 zlib pam libcomerr libkrb5 acl libcomerr3"
slaxemulator@5477 10 BUILD_DEPENDS="openssl-dev gnutls-dev ghostscript dbus-dev pam pam-dev acl-dev"
pascal@2219 11 SOURCE="cups"
pascal@2219 12 TARBALL="$SOURCE-$VERSION-source.tar.bz2"
pascal@2219 13 WEB_SITE="http://www.cups.org/"
pascal@12429 14 WGET_URL="ftp://ftp.easysw.com/pub/cups/$VERSION/$TARBALL"
pascal@2219 15 PROVIDE="cups:pam"
pascal@2219 16
pascal@2219 17 # Rules to configure and make the package.
pascal@2219 18 compile_rules()
pascal@2219 19 {
pascal@2219 20 cd $src
erjo@13050 21 patch -p1 < $stuff/install-sh.u
pascal@2219 22 ./configure \
pascal@2219 23 --prefix=/usr \
pascal@2219 24 --sysconfdir=/etc \
pascal@2219 25 --localstatedir=/var \
pascal@2219 26 --mandir=/usr/share/man \
pascal@2219 27 --enable-static \
pascal@2219 28 --enable-pam \
pascal@2219 29 --disable-ldap \
pascal@2219 30 --with-cups-user=nobody \
pascal@2219 31 --with-cups-group=nogroup \
pascal@2219 32 --with-languages="de es fr" \
pascal@2219 33 $CONFIGURE_ARGS &&
pascal@2219 34 make &&
pascal@2219 35 make BUILDROOT=$PWD/_pkg install
pascal@2219 36 }
pascal@2219 37
pascal@2219 38 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@2219 39 genpkg_rules()
pascal@2219 40 {
pascal@2619 41 mkdir -p $fs/etc $fs/usr/lib $fs/usr/share/pixmaps
pascal@2219 42
pascal@2219 43 cp -a $_pkg/etc/cups $fs/etc
pascal@2219 44 cp -a $_pkg/etc/dbus* $fs/etc
pascal@2219 45 cp -a $_pkg/usr/bin $fs/usr
pascal@2219 46 cp -a $_pkg/usr/sbin $fs/usr
pascal@2219 47 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
pascal@2219 48 cp -a $_pkg/usr/lib/cups $fs/usr/lib
pascal@2219 49 cp -a $_pkg/usr/share/cups $fs/usr/share
pascal@2619 50 cp -a $_pkg/usr/share/icons/hicolor/32x32/apps/cups.png \
pascal@2619 51 $fs/usr/share/pixmaps
pascal@2219 52 cp -a $_pkg/var $fs
pascal@2219 53
pascal@2219 54 # We need the doc for CSS, images and help in the web interface.
pascal@2219 55 cp -a $_pkg/usr/share/doc $fs/usr/share
pascal@2219 56
pascal@2774 57 # tazwok does not strip files other than .so in usr/lib
pascal@2774 58
pascal@2774 59 for dir in $fs/usr/lib/cups
pascal@2774 60 do
pascal@2774 61 if [ -d "$dir" ]; then
pascal@2774 62 find $dir -type f -exec strip -s '{}' 2>/dev/null \;
pascal@2774 63 fi
pascal@2774 64 done
pascal@2774 65
pascal@2238 66 # PAM conf
pankso@9697 67 cp -a $stuff/* $fs
pascal@2238 68
pascal@2219 69 # Daemon script
slaxemulator@9698 70 cp -a $WOK/cups/stuff/etc $fs
pascal@2219 71 }
pascal@2219 72
pascal@2219 73 # Start cups daemon and edit daemons.conf.
pascal@2219 74 post_install()
pascal@2219 75 {
pascal@2219 76 local root
pascal@2219 77 root=$1
pascal@2219 78 if [ -z "$root" ]; then
pascal@2219 79 /etc/init.d/cupsd start || continue
pascal@2219 80 fi
pascal@2219 81 if ! grep -q ^CUPSD_OPTIONS $root/etc/daemons.conf; then
pascal@2219 82 echo '# Cups printing daemon options.' >> $root/etc/daemons.conf
pascal@2219 83 echo 'CUPSD_OPTIONS=""' >> $root/etc/daemons.conf
pascal@2219 84 echo '' >> $root/etc/daemons.conf
pascal@2219 85 fi
pascal@2219 86 }
pascal@2219 87
pascal@2219 88 # Stop cups daemon before rm.
pascal@2219 89 pre_remove()
pascal@2219 90 {
pascal@13619 91 [ -z "$1" ] && /etc/init.d/cupsd stop
pascal@2219 92 }
pascal@8875 93
pascal@8875 94 # Overlap busybox
pascal@8875 95 pre_install()
pascal@8875 96 {
pascal@8875 97 rm -f $1/usr/bin/lpr
pascal@8875 98 }
pascal@8875 99
pascal@8875 100 post_remove()
pascal@8875 101 {
pascal@8875 102 ln -s /bin/busybox /usr/bin/lpr
pascal@8875 103 }