wok-current annotate sudo/receipt @ rev 7270
Up: aaphoto to 0.39.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sun Nov 14 23:09:21 2010 +0000 (2010-11-14) |
parents | 1996b45528ae |
children | 3c4b4d332f3c |
rev | line source |
---|---|
erjo@151 | 1 # SliTaz package receipt. |
erjo@151 | 2 |
erjo@151 | 3 PACKAGE="sudo" |
slaxemulator@6156 | 4 VERSION="1.7.4p4" |
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@2631 | 12 CONFIG_FILES="/etc/sudoers" |
erjo@2631 | 13 |
erjo@151 | 14 |
erjo@151 | 15 # Rules to configure and make the package. |
erjo@151 | 16 compile_rules() |
erjo@151 | 17 { |
erjo@151 | 18 cd $src |
erjo@151 | 19 ./configure --prefix=/usr \ |
erjo@151 | 20 --sysconfdir=/etc \ |
erjo@151 | 21 --without-pam \ |
erjo@151 | 22 --with-editor=/bin/vi \ |
pankso@156 | 23 --libexecdir=/usr/lib \ |
pascal@1476 | 24 $CONFIGURE_ARGS && |
erjo@151 | 25 |
erjo@151 | 26 # Build everything |
pascal@1476 | 27 make && |
erjo@151 | 28 # Install everything |
erjo@151 | 29 make DESTDIR=$PWD/_pkg install |
erjo@151 | 30 } |
erjo@151 | 31 |
erjo@151 | 32 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@151 | 33 genpkg_rules() |
erjo@151 | 34 { |
erjo@151 | 35 mkdir -p $fs/usr/lib |
erjo@151 | 36 mkdir -p $fs/etc |
erjo@151 | 37 cp -a $_pkg/usr/bin $fs/usr |
erjo@151 | 38 cp -a $_pkg/usr/sbin $fs/usr |
pankso@156 | 39 cp -a $_pkg/usr/lib/*.so $fs/usr/lib |
erjo@151 | 40 cp -a stuff/sudoers $fs/etc |
erjo@151 | 41 strip -s $fs/usr/bin/* |
erjo@151 | 42 strip -s $fs/usr/sbin/* |
erjo@151 | 43 strip -s $fs/usr/lib/sudo_noexec.so |
erjo@151 | 44 } |
erjo@151 | 45 |
erjo@1852 | 46 pre_install() |
erjo@1852 | 47 { |
erjo@1852 | 48 echo "Processing pre-install commands..." |
erjo@1852 | 49 if [ -f $root/etc/sudoers.bak ]; then |
erjo@1852 | 50 cp $root/etc/sudoers $root/etc/sudoers.bak |
erjo@1852 | 51 fi |
erjo@1852 | 52 } |
erjo@151 | 53 |
erjo@151 | 54 post_install() |
erjo@151 | 55 { |
pankso@156 | 56 local root |
pankso@156 | 57 root=$1 |
pankso@156 | 58 echo "Processing post-install commands..." |
erjo@1852 | 59 if [ -f $root/etc/sudoers.bak ]; then |
erjo@1852 | 60 rm -f $root/etc/sudoers |
erjo@1852 | 61 mv $root/etc/sudoers.bak $root/etc/sudoers |
erjo@1852 | 62 else |
erjo@1852 | 63 chown root.root $root/etc/sudoers |
erjo@1852 | 64 chmod 0440 $root/etc/sudoers |
erjo@1852 | 65 fi |
erjo@151 | 66 } |