wok-4.x view sudo-pam/receipt @ rev 8963
Up: sudo to 1.8.0.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Tue Mar 01 23:59:45 2011 +0000 (2011-03-01) |
parents | 3cc677a6aa66 |
children | 129bb5b11a7e |
line source
1 # SliTaz package receipt.
3 PACKAGE="sudo-pam"
4 VERSION="1.8.0"
5 CATEGORY="security"
6 SHORT_DESC="Sudo (su \"do\") allows a system administrator to delegate authority using PAM."
7 MAINTAINER="erjo@slitaz.org"
8 DEPENDS="pam"
9 SOURCE="sudo"
10 TARBALL="$SOURCE-$VERSION.tar.gz"
11 WEB_SITE="http://www.gratisoft.us/sudo/"
12 WGET_URL="http://www.gratisoft.us/sudo/dist/$TARBALL"
13 PROVIDE="sudo:pam"
14 SRC_WANTED="$SOURCE"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 cd $src
20 ./configure --sysconfdir=/etc \
21 --with-pam \
22 --with-editor=/bin/vi \
23 --libexecdir=/usr/lib &&
24 # Build everything
25 make &&
26 # Install everything
27 make 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 ../$SOURCE/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 local root
47 root=$1
48 echo "Processing pre-install commands..."
49 if [ -f $root/etc/sudoers.bak ]; then
50 cp $root/etc/sudoers $root/etc/sudoers.bak
51 fi
52 }
54 post_install()
55 {
56 local root
57 root=$1
58 echo "Processing post-install commands..."
59 if [ -f $root/etc/sudoers.bak ]; then
60 rm -f $root/etc/sudoers
61 mv $root/etc/sudoers.bak $root/etc/sudoers
62 else
63 chown root.root $root/etc/sudoers
64 chmod 0440 $root/etc/sudoers
65 fi
66 }
68 pre_remove()
69 {
70 tazpkg get-install ${PACKAGE%-pam}
71 }