wok view sudo-pam/receipt @ rev 25680

updated gnu-efi (3.0.14 -> 3.0.17)
author Hans-G?nter Theisgen
date Mon Mar 18 18:46:02 2024 +0100 (4 months ago)
parents 0be8f2748172
children
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}dist/$TARBALL"
15 PROVIDE="sudo:pam"
16 DEPENDS="pam"
17 BUILD_DEPENDS="pam-dev"
19 # What is the latest version available today?
20 current_version()
21 {
22 wget -O - $WEB_SITE 2>/dev/null | \
23 grep -C 9 'The current' | sed '/>sudo/!d;s|.*>sudo *||;s|<.*||;q'
24 }
26 # Rules to configure and make the package.
27 compile_rules()
28 {
29 ./configure \
30 --sysconfdir=/etc \
31 --with-pam \
32 --with-editor=/bin/vi \
33 --libexecdir=/usr/lib \
34 $CONFIGURE_ARGS &&
35 make &&
36 make install
37 }
39 # Rules to gen a SliTaz package suitable for Tazpkg.
40 genpkg_rules()
41 {
42 mkdir -p $fs/usr/lib
43 mkdir -p $fs/etc/pam.d
45 cp -a $install/usr/bin $fs/usr
46 cp -a $install/usr/sbin $fs/usr
47 cp -a $install/etc/sudoers $fs/etc/
48 cp -a $stuff/sudo $fs/etc/pam.d/
49 cp -a $install/usr/lib $fs/usr
50 }
52 pre_install()
53 {
54 if [ -f "$1/etc/sudoers" ]
55 then
56 cp "$1/etc/sudoers" "$1/etc/sudoers.bak"
57 fi
58 }
60 post_install()
61 {
62 if [ -f "$1/etc/sudoers.bak" ]
63 then
64 rm -f "$1/etc/sudoers"
65 mv "$1/etc/sudoers.bak" "$1/etc/sudoers"
66 else
67 chown root.root "$1/etc/sudoers"
68 chmod 0440 "$1/etc/sudoers"
69 fi
70 }
72 pre_remove()
73 {
74 tazpkg get-install ${PACKAGE%-pam}
75 }