wok annotate cups-pam/receipt @ rev 14844

tightvnc-viewer: improve receipt
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Thu Jul 18 01:30:55 2013 +0200 (2013-07-18)
parents a2bab5234954
children 223b265f40fd
rev   line source
pascal@2219 1 # SliTaz package receipt.
pascal@2219 2
pascal@2219 3 PACKAGE="cups-pam"
slaxemulator@14626 4 VERSION="1.6.2"
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"
slaxemulator@14622 8 DEPENDS="libssl libgcrypt cups-doc slitaz-base-files gnutls dbus jpeg libpng tiff \
pascal@4999 9 zlib pam libcomerr libkrb5 acl libcomerr3"
slaxemulator@14622 10 BUILD_DEPENDS="openssl-dev gnutls-dev dbus-dev jpeg-dev libpng-dev tiff-dev \
slaxemulator@14622 11 pam libcomerr-dev pam-dev acl-dev libgcrypt-dev"
pascal@2219 12 SOURCE="cups"
pascal@2219 13 TARBALL="$SOURCE-$VERSION-source.tar.bz2"
pascal@2219 14 WEB_SITE="http://www.cups.org/"
slaxemulator@14626 15 WGET_URL="http://www.cups.org/software/$VERSION/$TARBALL"
pascal@2219 16 PROVIDE="cups:pam"
pascal@2219 17
pascal@2219 18 # Rules to configure and make the package.
pascal@2219 19 compile_rules()
pascal@2219 20 {
pascal@2219 21 cd $src
slaxemulator@14622 22 patch -Np1 -i $WOK/$SOURCE/stuff/install-sh.u
pascal@2219 23 ./configure \
pascal@2219 24 --prefix=/usr \
pascal@2219 25 --sysconfdir=/etc \
pascal@2219 26 --localstatedir=/var \
pascal@2219 27 --mandir=/usr/share/man \
pascal@2219 28 --enable-static \
pascal@2219 29 --enable-pam \
pascal@2219 30 --disable-ldap \
pascal@2219 31 --with-cups-user=nobody \
pascal@2219 32 --with-cups-group=nogroup \
pascal@2219 33 --with-languages="de es fr" \
pascal@2219 34 $CONFIGURE_ARGS &&
pascal@2219 35 make &&
slaxemulator@14622 36 make BUILDROOT=$DESTDIR install
pascal@2219 37 }
pascal@2219 38
pascal@2219 39 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@2219 40 genpkg_rules()
pascal@2219 41 {
pascal@2619 42 mkdir -p $fs/etc $fs/usr/lib $fs/usr/share/pixmaps
pascal@2219 43
slaxemulator@14622 44 cp -a $install/etc/cups $fs/etc
slaxemulator@14622 45 cp -a $install/etc/dbus* $fs/etc
slaxemulator@14622 46 cp -a $install/usr/bin $fs/usr
slaxemulator@14622 47 cp -a $install/usr/sbin $fs/usr
slaxemulator@14622 48 cp -a $install/usr/lib/*.so* $fs/usr/lib
slaxemulator@14622 49 cp -a $install/usr/lib/cups $fs/usr/lib
slaxemulator@14622 50 cp -a $install/usr/share/cups $fs/usr/share
slaxemulator@14622 51 cp -a $install/usr/share/icons/hicolor/32x32/apps/cups.png \
pascal@2619 52 $fs/usr/share/pixmaps
slaxemulator@14622 53 cp -a $install/var $fs
pascal@2219 54
pascal@2774 55 # tazwok does not strip files other than .so in usr/lib
pascal@2774 56
pascal@2774 57 for dir in $fs/usr/lib/cups
pascal@2774 58 do
pascal@2774 59 if [ -d "$dir" ]; then
pascal@2774 60 find $dir -type f -exec strip -s '{}' 2>/dev/null \;
pascal@2774 61 fi
pascal@2774 62 done
pascal@2774 63
pascal@2238 64 # PAM conf
pankso@9697 65 cp -a $stuff/* $fs
pascal@2238 66
pascal@2219 67 # Daemon script
slaxemulator@9698 68 cp -a $WOK/cups/stuff/etc $fs
pascal@2219 69 }
pascal@2219 70
pascal@2219 71 # Start cups daemon and edit daemons.conf.
pascal@2219 72 post_install()
pascal@2219 73 {
pascal@2219 74 local root
pascal@2219 75 root=$1
pascal@2219 76 if [ -z "$root" ]; then
pascal@2219 77 /etc/init.d/cupsd start || continue
pascal@2219 78 fi
pascal@2219 79 if ! grep -q ^CUPSD_OPTIONS $root/etc/daemons.conf; then
pascal@2219 80 echo '# Cups printing daemon options.' >> $root/etc/daemons.conf
pascal@2219 81 echo 'CUPSD_OPTIONS=""' >> $root/etc/daemons.conf
pascal@2219 82 echo '' >> $root/etc/daemons.conf
pascal@2219 83 fi
pascal@2219 84 }
pascal@2219 85
pascal@2219 86 # Stop cups daemon before rm.
pascal@2219 87 pre_remove()
pascal@2219 88 {
slaxemulator@14622 89 local root
slaxemulator@14622 90 root=$1
slaxemulator@14622 91 if [ -z "$root" ]; then
slaxemulator@14622 92 /etc/init.d/cupsd stop
slaxemulator@14622 93 fi
pascal@2219 94 }
pascal@8875 95
pascal@8875 96 # Overlap busybox
pascal@8875 97 pre_install()
pascal@8875 98 {
pascal@8875 99 rm -f $1/usr/bin/lpr
pascal@8875 100 }
pascal@8875 101
pascal@8875 102 post_remove()
pascal@8875 103 {
pascal@13937 104 ln -s /bin/busybox $1/usr/bin/lpr
pascal@8875 105 }