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

libtdb: no more tdb.mk
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Aug 14 21:01:32 2013 +0000 (2013-08-14)
parents a002d7ee3fd9
children 3b4e4318134e
line source
1 # SliTaz package receipt.
3 PACKAGE="sudo-pam"
4 VERSION="1.8.6p3"
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/pam.d
35 cp -a $_pkg/usr/bin $fs/usr
36 cp -a $_pkg/usr/sbin $fs/usr
37 cp -a $_pkg/etc/sudoers $fs/etc/
38 cp -a $stuff/sudo $fs/etc/pam.d/
39 cp -a $_pkg/usr/lib/*.so $fs/usr/lib
40 }
42 pre_install()
43 {
44 local root
45 root=$1
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 }
66 pre_remove()
67 {
68 tazpkg get-install ${PACKAGE%-pam}
69 }