wok-6.x annotate sudo/receipt @ rev 17414
busybox: fake GNU cpio for symlinks
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Dec 01 10:38:15 2014 +0100 (2014-12-01) |
parents | 3b4e4318134e |
children | 9e01bc6321ea |
rev | line source |
---|---|
erjo@151 | 1 # SliTaz package receipt. |
erjo@151 | 2 |
erjo@151 | 3 PACKAGE="sudo" |
devl547@16228 | 4 VERSION="1.8.10p2" |
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" |
pascal@15593 | 8 LICENSE="ISC" |
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 # Rules to configure and make the package. |
erjo@151 | 15 compile_rules() |
erjo@151 | 16 { |
erjo@151 | 17 cd $src |
slaxemulator@8963 | 18 ./configure --sysconfdir=/etc \ |
erjo@151 | 19 --without-pam \ |
erjo@151 | 20 --with-editor=/bin/vi \ |
pankso@156 | 21 --libexecdir=/usr/lib \ |
slaxemulator@10081 | 22 $CONFIGURE_ARGS && |
erjo@151 | 23 # Build everything |
pascal@1476 | 24 make && |
erjo@151 | 25 # Install everything |
slaxemulator@8963 | 26 make install |
erjo@151 | 27 } |
erjo@151 | 28 |
erjo@151 | 29 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@151 | 30 genpkg_rules() |
erjo@151 | 31 { |
erjo@151 | 32 mkdir -p $fs/usr/lib |
erjo@13462 | 33 cp -a $install/usr/bin $fs/usr |
erjo@13462 | 34 cp -a $install/usr/sbin $fs/usr |
devl547@16228 | 35 cp -a $install/usr/lib/ $fs/usr |
erjo@13462 | 36 cp -a $install/etc $fs/ |
erjo@151 | 37 } |
erjo@151 | 38 |
erjo@1852 | 39 pre_install() |
erjo@1852 | 40 { |
erjo@1852 | 41 echo "Processing pre-install commands..." |
erjo@1852 | 42 if [ -f $root/etc/sudoers.bak ]; then |
erjo@1852 | 43 cp $root/etc/sudoers $root/etc/sudoers.bak |
erjo@1852 | 44 fi |
erjo@1852 | 45 } |
erjo@151 | 46 |
erjo@151 | 47 post_install() |
erjo@151 | 48 { |
pankso@156 | 49 local root |
pankso@156 | 50 root=$1 |
pankso@156 | 51 echo "Processing post-install commands..." |
erjo@1852 | 52 if [ -f $root/etc/sudoers.bak ]; then |
erjo@13462 | 53 mv $root/etc/sudoers $root/etc/sudoers-dist |
erjo@1852 | 54 mv $root/etc/sudoers.bak $root/etc/sudoers |
erjo@1852 | 55 else |
erjo@1852 | 56 chown root.root $root/etc/sudoers |
erjo@1852 | 57 chmod 0440 $root/etc/sudoers |
erjo@1852 | 58 fi |
erjo@151 | 59 } |