wok-current annotate sudo-pam/receipt @ rev 8963

Up: sudo to 1.8.0.
author Christopher Rogers <slaxemulator@gmail.com>
date Tue Mar 01 23:59:45 2011 +0000 (2011-03-01)
parents 3cc677a6aa66
children 129bb5b11a7e
rev   line source
pascal@2191 1 # SliTaz package receipt.
pascal@2191 2
pascal@2191 3 PACKAGE="sudo-pam"
slaxemulator@8963 4 VERSION="1.8.0"
pascal@2191 5 CATEGORY="security"
pascal@2191 6 SHORT_DESC="Sudo (su \"do\") allows a system administrator to delegate authority using PAM."
pascal@2191 7 MAINTAINER="erjo@slitaz.org"
pascal@2191 8 DEPENDS="pam"
pascal@2191 9 SOURCE="sudo"
pascal@2191 10 TARBALL="$SOURCE-$VERSION.tar.gz"
pascal@2191 11 WEB_SITE="http://www.gratisoft.us/sudo/"
pascal@2191 12 WGET_URL="http://www.gratisoft.us/sudo/dist/$TARBALL"
pascal@2191 13 PROVIDE="sudo:pam"
slaxemulator@8427 14 SRC_WANTED="$SOURCE"
pascal@2191 15
pascal@2191 16 # Rules to configure and make the package.
pascal@2191 17 compile_rules()
pascal@2191 18 {
pascal@2191 19 cd $src
slaxemulator@8963 20 ./configure --sysconfdir=/etc \
pascal@2191 21 --with-pam \
pascal@2191 22 --with-editor=/bin/vi \
slaxemulator@8963 23 --libexecdir=/usr/lib &&
pascal@2191 24 # Build everything
pascal@2191 25 make &&
pascal@2191 26 # Install everything
slaxemulator@8963 27 make install
pascal@2191 28 }
pascal@2191 29
pascal@2191 30 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@2191 31 genpkg_rules()
pascal@2191 32 {
pascal@2191 33 mkdir -p $fs/usr/lib
pascal@2191 34 mkdir -p $fs/etc
pascal@2191 35 cp -a $_pkg/usr/bin $fs/usr
pascal@2191 36 cp -a $_pkg/usr/sbin $fs/usr
pascal@2191 37 cp -a $_pkg/usr/lib/*.so $fs/usr/lib
pascal@2287 38 cp -a ../$SOURCE/stuff/sudoers $fs/etc
pascal@2191 39 strip -s $fs/usr/bin/*
pascal@2191 40 strip -s $fs/usr/sbin/*
pascal@2191 41 strip -s $fs/usr/lib/sudo_noexec.so
pascal@2191 42 }
pascal@2191 43
pascal@2191 44 pre_install()
pascal@2191 45 {
slaxemulator@8963 46 local root
slaxemulator@8963 47 root=$1
pascal@2191 48 echo "Processing pre-install commands..."
pascal@2191 49 if [ -f $root/etc/sudoers.bak ]; then
pascal@2191 50 cp $root/etc/sudoers $root/etc/sudoers.bak
pascal@2191 51 fi
pascal@2191 52 }
pascal@2191 53
pascal@2191 54 post_install()
pascal@2191 55 {
pascal@2191 56 local root
pascal@2191 57 root=$1
pascal@2191 58 echo "Processing post-install commands..."
pascal@2191 59 if [ -f $root/etc/sudoers.bak ]; then
pascal@2191 60 rm -f $root/etc/sudoers
pascal@2191 61 mv $root/etc/sudoers.bak $root/etc/sudoers
pascal@2191 62 else
pascal@2191 63 chown root.root $root/etc/sudoers
pascal@2191 64 chmod 0440 $root/etc/sudoers
pascal@2191 65 fi
pascal@2191 66 }
pascal@7632 67
pascal@7632 68 pre_remove()
pascal@7632 69 {
pascal@7632 70 tazpkg get-install ${PACKAGE%-pam}
pascal@7632 71 }