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

updated makeself again (2.4.0 -> 2.4.5)
author Hans-G?nter Theisgen
date Thu Mar 31 14:03:13 2022 +0100 (2022-03-31)
parents ff210fc49547
children 0be8f2748172
line source
1 # SliTaz package receipt.
3 PACKAGE="sudo-pam"
4 VERSION="1.9.5p2"
5 CATEGORY="security"
6 SHORT_DESC="Allows command execution as root for specified users using PAM."
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="ISC"
9 WEB_SITE="https://www.sudo.ws/"
11 SOURCE="sudo"
12 TARBALL="$SOURCE-$VERSION.tar.gz"
13 WGET_URL="${WEB_SITE}sudo/dist/$TARBALL"
15 PROVIDE="sudo:pam"
16 DEPENDS="pam"
17 BUILD_DEPENDS="pam-dev"
19 current_version()
20 {
21 wget -O - $WEB_SITE 2>/dev/null | \
22 grep -A 1 'The current' | sed '/>sudo/!d;s|.*>sudo *||;s|<.*||;q'
23 }
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 ./configure \
29 --sysconfdir=/etc \
30 --with-pam \
31 --with-editor=/bin/vi \
32 --libexecdir=/usr/lib \
33 $CONFIGURE_ARGS &&
34 make &&
35 make install
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 mkdir -p $fs/usr/lib
42 mkdir -p $fs/etc/pam.d
44 cp -a $install/usr/bin $fs/usr
45 cp -a $install/usr/sbin $fs/usr
46 cp -a $install/etc/sudoers $fs/etc/
47 cp -a $stuff/sudo $fs/etc/pam.d/
48 cp -a $install/usr/lib $fs/usr
49 }
51 pre_install()
52 {
53 if [ -f "$1/etc/sudoers" ]
54 then
55 cp "$1/etc/sudoers" "$1/etc/sudoers.bak"
56 fi
57 }
59 post_install()
60 {
61 if [ -f "$1/etc/sudoers.bak" ]
62 then
63 rm -f "$1/etc/sudoers"
64 mv "$1/etc/sudoers.bak" "$1/etc/sudoers"
65 else
66 chown root.root "$1/etc/sudoers"
67 chmod 0440 "$1/etc/sudoers"
68 fi
69 }
71 pre_remove()
72 {
73 tazpkg get-install ${PACKAGE%-pam}
74 }