wok-6.x view sudo-pam/receipt @ rev 19692
ntfs-3g: update genpkg-rules
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Feb 13 12:26:10 2017 +0100 (2017-02-13) |
parents | 6fab3264ba87 |
children | dfeebf7e6265 |
line source
1 # SliTaz package receipt.
3 PACKAGE="sudo-pam"
4 VERSION="1.8.10p2"
5 CATEGORY="security"
6 SHORT_DESC="Sudo (su \"do\") allows a system administrator to delegate authority using PAM."
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="ISC"
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"
15 DEPENDS="pam"
16 BUILD_DEPENDS="pam-dev"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
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 $install/usr/bin $fs/usr
36 cp -a $install/usr/sbin $fs/usr
37 cp -a $install/etc/sudoers $fs/etc/
38 cp -a $stuff/sudo $fs/etc/pam.d/
39 cp -a $install/usr/lib $fs/usr
40 }
42 pre_install()
43 {
44 if [ -f "$1/etc/sudoers" ]; then
45 cp "$1/etc/sudoers" "$1/etc/sudoers.bak"
46 fi
47 }
49 post_install()
50 {
51 if [ -f "$1/etc/sudoers.bak" ]; then
52 rm -f "$1/etc/sudoers"
53 mv "$1/etc/sudoers.bak" "$1/etc/sudoers"
54 else
55 chown root.root "$1/etc/sudoers"
56 chmod 0440 "$1/etc/sudoers"
57 fi
58 }
60 pre_remove()
61 {
62 tazpkg get-install ${PACKAGE%-pam}
63 }