wok annotate sudo/receipt @ rev 1995
Up: isomaster (1.3.5)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu Jan 08 19:12:39 2009 +0100 (2009-01-08) |
parents | 59a23b491383 |
children | 18af88b9fa23 |
rev | line source |
---|---|
erjo@151 | 1 # SliTaz package receipt. |
erjo@151 | 2 |
erjo@151 | 3 PACKAGE="sudo" |
pascal@1476 | 4 VERSION="1.6.9p17" |
pankso@209 | 5 CATEGORY="security" |
pascal@1137 | 6 SHORT_DESC="Sudo (su \"do\") allows a system administrator to delegate authority." |
erjo@784 | 7 MAINTAINER="erjo@slitaz.org" |
erjo@151 | 8 DEPENDS="" |
erjo@151 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
erjo@151 | 10 WEB_SITE="http://www.gratisoft.us/sudo/" |
erjo@151 | 11 WGET_URL="http://www.gratisoft.us/sudo/dist/$TARBALL" |
erjo@151 | 12 |
erjo@151 | 13 # Rules to configure and make the package. |
erjo@151 | 14 compile_rules() |
erjo@151 | 15 { |
erjo@151 | 16 cd $src |
erjo@151 | 17 ./configure --prefix=/usr \ |
erjo@151 | 18 --sysconfdir=/etc \ |
erjo@151 | 19 --without-pam \ |
erjo@151 | 20 --with-editor=/bin/vi \ |
pankso@156 | 21 --libexecdir=/usr/lib \ |
pascal@1476 | 22 $CONFIGURE_ARGS && |
erjo@151 | 23 |
erjo@151 | 24 # Build everything |
pascal@1476 | 25 make && |
erjo@151 | 26 # Install everything |
erjo@151 | 27 make DESTDIR=$PWD/_pkg install |
erjo@151 | 28 } |
erjo@151 | 29 |
erjo@151 | 30 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@151 | 31 genpkg_rules() |
erjo@151 | 32 { |
erjo@151 | 33 mkdir -p $fs/usr/lib |
erjo@151 | 34 mkdir -p $fs/etc |
erjo@151 | 35 cp -a $_pkg/usr/bin $fs/usr |
erjo@151 | 36 cp -a $_pkg/usr/sbin $fs/usr |
pankso@156 | 37 cp -a $_pkg/usr/lib/*.so $fs/usr/lib |
erjo@151 | 38 cp -a stuff/sudoers $fs/etc |
erjo@151 | 39 strip -s $fs/usr/bin/* |
erjo@151 | 40 strip -s $fs/usr/sbin/* |
erjo@151 | 41 strip -s $fs/usr/lib/sudo_noexec.so |
erjo@151 | 42 } |
erjo@151 | 43 |
erjo@1852 | 44 pre_install() |
erjo@1852 | 45 { |
erjo@1852 | 46 echo "Processing pre-install commands..." |
erjo@1852 | 47 if [ -f $root/etc/sudoers.bak ]; then |
erjo@1852 | 48 cp $root/etc/sudoers $root/etc/sudoers.bak |
erjo@1852 | 49 fi |
erjo@1852 | 50 } |
erjo@151 | 51 |
erjo@151 | 52 post_install() |
erjo@151 | 53 { |
pankso@156 | 54 local root |
pankso@156 | 55 root=$1 |
pankso@156 | 56 echo "Processing post-install commands..." |
erjo@1852 | 57 if [ -f $root/etc/sudoers.bak ]; then |
erjo@1852 | 58 rm -f $root/etc/sudoers |
erjo@1852 | 59 mv $root/etc/sudoers.bak $root/etc/sudoers |
erjo@1852 | 60 else |
erjo@1852 | 61 chown root.root $root/etc/sudoers |
erjo@1852 | 62 chmod 0440 $root/etc/sudoers |
erjo@1852 | 63 fi |
erjo@151 | 64 } |