wok-stable view sudo-pam/receipt @ rev 10071
startup-notification: Add $CONFIGURE_ARGS.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Fri May 20 05:25:01 2011 +0000 (2011-05-20) |
parents | 0def29f679d6 |
children | 680191d09a83 |
line source
1 # SliTaz package receipt.
3 PACKAGE="sudo-pam"
4 VERSION="1.8.1"
5 CATEGORY="security"
6 SHORT_DESC="Sudo (su \"do\") allows a system administrator to delegate authority using PAM."
7 MAINTAINER="erjo@slitaz.org"
8 SOURCE="sudo"
9 TARBALL="$SOURCE-$VERSION.tar.gz"
10 WEB_SITE="http://www.gratisoft.us/sudo/"
11 WGET_URL="http://www.gratisoft.us/sudo/dist/$TARBALL"
12 PROVIDE="sudo:pam"
14 DEPENDS="pam"
15 BUILD_DEPENDS="pam-dev"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
21 ./configure \
22 --sysconfdir=/etc \
23 --with-pam \
24 --with-editor=/bin/vi \
25 --libexecdir=/usr/lib &&
26 make && make install
27 }
29 # Rules to gen a SliTaz package suitable for Tazpkg.
30 genpkg_rules()
31 {
32 mkdir -p $fs/usr/lib
33 mkdir -p $fs/etc
34 cp -a $_pkg/usr/bin $fs/usr
35 cp -a $_pkg/usr/sbin $fs/usr
36 cp -a $_pkg/usr/lib/*.so $fs/usr/lib
37 cp -a $WOK/sudo/stuff/sudoers $fs/etc
38 }
40 pre_install()
41 {
42 local root
43 root=$1
44 echo "Processing pre-install commands..."
45 if [ -f $root/etc/sudoers.bak ]; then
46 cp $root/etc/sudoers $root/etc/sudoers.bak
47 fi
48 }
50 post_install()
51 {
52 local root
53 root=$1
54 echo "Processing post-install commands..."
55 if [ -f $root/etc/sudoers.bak ]; then
56 rm -f $root/etc/sudoers
57 mv $root/etc/sudoers.bak $root/etc/sudoers
58 else
59 chown root.root $root/etc/sudoers
60 chmod 0440 $root/etc/sudoers
61 fi
62 }
64 pre_remove()
65 {
66 tazpkg get-install ${PACKAGE%-pam}
67 }