wok-6.x view sudo/receipt @ rev 2053

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