wok-current view sudo-pam/receipt @ rev 8582

imported patch get/v4l-dvb
author Antoine Bodin <gokhlayeh@slitaz.org>
date Sun Feb 13 22:57:57 2011 +0100 (2011-02-13)
parents 1e86a55e5f67
children 4ed538cf3c13
line source
1 # SliTaz package receipt.
3 PACKAGE="sudo-pam"
4 VERSION="1.7.4p6"
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 BUILD_DEPENDS="pam pam-dev"
10 SOURCE="sudo"
11 TARBALL="$SOURCE-$VERSION.tar.gz"
12 WEB_SITE="http://www.gratisoft.us/sudo/"
13 WGET_URL="http://www.gratisoft.us/sudo/dist/$TARBALL"
14 PROVIDE="sudo:pam"
15 SRC_WANTED="$SOURCE"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
21 ./configure --prefix=/usr \
22 --sysconfdir=/etc \
23 --with-pam \
24 --with-editor=/bin/vi \
25 --libexecdir=/usr/lib \
26 $CONFIGURE_ARGS &&
28 # Build everything
29 make &&
30 # Install everything
31 make DESTDIR=$PWD/_pkg install
32 }
34 # Rules to gen a SliTaz package suitable for Tazpkg.
35 genpkg_rules()
36 {
37 mkdir -p $fs/usr/lib
38 mkdir -p $fs/etc
39 cp -a $_pkg/usr/bin $fs/usr
40 cp -a $_pkg/usr/sbin $fs/usr
41 cp -a $_pkg/usr/lib/*.so $fs/usr/lib
42 cp -a ../$SOURCE/stuff/sudoers $fs/etc
43 strip -s $fs/usr/bin/*
44 strip -s $fs/usr/sbin/*
45 strip -s $fs/usr/lib/sudo_noexec.so
46 }
48 pre_install()
49 {
50 echo "Processing pre-install commands..."
51 if [ -f $root/etc/sudoers.bak ]; then
52 cp $root/etc/sudoers $root/etc/sudoers.bak
53 fi
54 }
56 post_install()
57 {
58 local root
59 root=$1
60 echo "Processing post-install commands..."
61 if [ -f $root/etc/sudoers.bak ]; then
62 rm -f $root/etc/sudoers
63 mv $root/etc/sudoers.bak $root/etc/sudoers
64 else
65 chown root.root $root/etc/sudoers
66 chmod 0440 $root/etc/sudoers
67 fi
68 }
70 pre_remove()
71 {
72 tazpkg get-install ${PACKAGE%-pam}
73 }