wok-6.x view sudo-pam/receipt @ rev 11362

compat: grub4dos-linux, allow the use of various host triplet
author Antoine Bodin <gokhlayeh@slitaz.org>
date Thu Dec 08 11:39:38 2011 +0100 (2011-12-08)
parents 680191d09a83
children 7bff78b35374
line source
1 # SliTaz package receipt.
3 PACKAGE="sudo-pam"
4 VERSION="1.8.2"
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 $CONFIGURE_ARGS &&
27 make && 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 $WOK/sudo/stuff/sudoers $fs/etc
39 }
41 pre_install()
42 {
43 local root
44 root=$1
45 echo "Processing pre-install commands..."
46 if [ -f $root/etc/sudoers.bak ]; then
47 cp $root/etc/sudoers $root/etc/sudoers.bak
48 fi
49 }
51 post_install()
52 {
53 local root
54 root=$1
55 echo "Processing post-install commands..."
56 if [ -f $root/etc/sudoers.bak ]; then
57 rm -f $root/etc/sudoers
58 mv $root/etc/sudoers.bak $root/etc/sudoers
59 else
60 chown root.root $root/etc/sudoers
61 chmod 0440 $root/etc/sudoers
62 fi
63 }
65 pre_remove()
66 {
67 tazpkg get-install ${PACKAGE%-pam}
68 }