wok view sudo/receipt @ rev 24894
Update some web_site
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Apr 08 10:34:41 2022 +0000 (2022-04-08) |
parents | ff210fc49547 |
children | 1a6eb3793a9e |
line source
1 # SliTaz package receipt.
3 PACKAGE="sudo"
4 VERSION="1.9.5p2"
5 CATEGORY="security"
6 SHORT_DESC="Allows command execution as root for specified users."
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="ISC"
9 WEB_SITE="https://www.sudo.ws/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="${WEB_SITE}sudo/dist/$TARBALL"
14 CONFIG_FILES="/etc/sudoers"
16 current_version()
17 {
18 wget -O - $WEB_SITE 2>/dev/null | \
19 grep -A 1 'The current' | sed '/>sudo/!d;s|.*>sudo *||;s|<.*||;q'
20 }
22 # Rules to configure and make the package.
23 compile_rules()
24 {
25 ./configure \
26 --sysconfdir=/etc \
27 --without-pam \
28 --with-editor=/bin/vi \
29 --libexecdir=/usr/lib \
30 $CONFIGURE_ARGS &&
32 # Build everything
33 make &&
35 # Install everything
36 make install
37 }
39 # Rules to gen a SliTaz package suitable for Tazpkg.
40 genpkg_rules()
41 {
42 mkdir -p $fs/usr/lib
44 cp -a $install/usr/bin $fs/usr
45 cp -a $install/usr/sbin $fs/usr
46 cp -a $install/usr/lib/ $fs/usr
47 cp -a $install/etc $fs/
48 }
50 pre_install()
51 {
52 if [ -f "$1/etc/sudoers" ]
53 then
54 cp "$1/etc/sudoers" "$1/etc/sudoers.bak"
55 fi
56 }
58 post_install()
59 {
60 if [ -f "$1/etc/sudoers.bak" ]
61 then
62 mv "$1/etc/sudoers" "$1/etc/sudoers-dist"
63 mv "$1/etc/sudoers.bak" "$1/etc/sudoers"
64 else
65 chown root.root "$1/etc/sudoers"
66 chmod 0440 "$1/etc/sudoers"
67 fi
68 }