wok annotate sudo-pam/receipt @ rev 10790
Move rocrail to undigest
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu Jun 02 00:48:24 2011 +0200 (2011-06-02) |
parents | 772609e25b8c |
children | 3de4fa9c110a |
rev | line source |
---|---|
pascal@2191 | 1 # SliTaz package receipt. |
pascal@2191 | 2 |
pascal@2191 | 3 PACKAGE="sudo-pam" |
slaxemulator@10081 | 4 VERSION="1.8.1p2" |
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 SOURCE="sudo" |
pascal@2191 | 9 TARBALL="$SOURCE-$VERSION.tar.gz" |
pascal@2191 | 10 WEB_SITE="http://www.gratisoft.us/sudo/" |
pascal@2191 | 11 WGET_URL="http://www.gratisoft.us/sudo/dist/$TARBALL" |
pascal@2191 | 12 PROVIDE="sudo:pam" |
pascal@2191 | 13 |
pankso@10004 | 14 DEPENDS="pam" |
pankso@10004 | 15 BUILD_DEPENDS="pam-dev" |
pankso@10004 | 16 |
pascal@2191 | 17 # Rules to configure and make the package. |
pascal@2191 | 18 compile_rules() |
pascal@2191 | 19 { |
pascal@2191 | 20 cd $src |
pankso@10004 | 21 ./configure \ |
pankso@10004 | 22 --sysconfdir=/etc \ |
pankso@10004 | 23 --with-pam \ |
pankso@10004 | 24 --with-editor=/bin/vi \ |
slaxemulator@10081 | 25 --libexecdir=/usr/lib \ |
slaxemulator@10081 | 26 $CONFIGURE_ARGS && |
pankso@10004 | 27 make && 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 |
pankso@10005 | 38 cp -a $WOK/sudo/stuff/sudoers $fs/etc |
pascal@2191 | 39 } |
pascal@2191 | 40 |
pascal@2191 | 41 pre_install() |
pascal@2191 | 42 { |
slaxemulator@8963 | 43 local root |
slaxemulator@8963 | 44 root=$1 |
pascal@2191 | 45 echo "Processing pre-install commands..." |
pascal@2191 | 46 if [ -f $root/etc/sudoers.bak ]; then |
pascal@2191 | 47 cp $root/etc/sudoers $root/etc/sudoers.bak |
pascal@2191 | 48 fi |
pascal@2191 | 49 } |
pascal@2191 | 50 |
pascal@2191 | 51 post_install() |
pascal@2191 | 52 { |
pascal@2191 | 53 local root |
pascal@2191 | 54 root=$1 |
pascal@2191 | 55 echo "Processing post-install commands..." |
pascal@2191 | 56 if [ -f $root/etc/sudoers.bak ]; then |
pascal@2191 | 57 rm -f $root/etc/sudoers |
pascal@2191 | 58 mv $root/etc/sudoers.bak $root/etc/sudoers |
pascal@2191 | 59 else |
pascal@2191 | 60 chown root.root $root/etc/sudoers |
pascal@2191 | 61 chmod 0440 $root/etc/sudoers |
pascal@2191 | 62 fi |
pascal@2191 | 63 } |
pascal@7632 | 64 |
pascal@7632 | 65 pre_remove() |
pascal@7632 | 66 { |
pascal@7632 | 67 tazpkg get-install ${PACKAGE%-pam} |
pascal@7632 | 68 } |