wok annotate sudo/receipt @ rev 25705
fusecloop/extract_compressed_fs: can convert to v0.68 or v1.0
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Jun 22 12:48:49 2024 +0000 (4 months ago) |
parents | 1a6eb3793a9e |
children |
rev | line source |
---|---|
erjo@151 | 1 # SliTaz package receipt. |
erjo@151 | 2 |
erjo@151 | 3 PACKAGE="sudo" |
pascal@24006 | 4 VERSION="1.9.5p2" |
pankso@209 | 5 CATEGORY="security" |
Hans-G?nter@21982 | 6 SHORT_DESC="Allows command execution as root for specified users." |
erjo@784 | 7 MAINTAINER="erjo@slitaz.org" |
pascal@15593 | 8 LICENSE="ISC" |
Hans-G?nter@21982 | 9 WEB_SITE="https://www.sudo.ws/" |
Hans-G?nter@21982 | 10 |
erjo@151 | 11 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@25417 | 12 WGET_URL="${WEB_SITE}dist/$TARBALL" |
Hans-G?nter@21982 | 13 |
erjo@2631 | 14 CONFIG_FILES="/etc/sudoers" |
erjo@2631 | 15 |
pascal@25417 | 16 # What is the latest version available today? |
pascal@24006 | 17 current_version() |
pascal@24006 | 18 { |
pascal@24006 | 19 wget -O - $WEB_SITE 2>/dev/null | \ |
pascal@25608 | 20 grep -C 9 'The current' | sed '/>sudo/!d;s|.*>sudo *||;s|<.*||;q' |
pascal@24006 | 21 } |
pascal@24006 | 22 |
erjo@151 | 23 # Rules to configure and make the package. |
erjo@151 | 24 compile_rules() |
erjo@151 | 25 { |
Hans-G?nter@21982 | 26 ./configure \ |
Hans-G?nter@21982 | 27 --sysconfdir=/etc \ |
Hans-G?nter@21982 | 28 --without-pam \ |
Hans-G?nter@21982 | 29 --with-editor=/bin/vi \ |
Hans-G?nter@21982 | 30 --libexecdir=/usr/lib \ |
Hans-G?nter@21982 | 31 $CONFIGURE_ARGS && |
Hans-G?nter@21982 | 32 |
erjo@151 | 33 # Build everything |
pascal@1476 | 34 make && |
Hans-G?nter@21982 | 35 |
erjo@151 | 36 # Install everything |
slaxemulator@8963 | 37 make install |
erjo@151 | 38 } |
erjo@151 | 39 |
erjo@151 | 40 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@151 | 41 genpkg_rules() |
erjo@151 | 42 { |
erjo@151 | 43 mkdir -p $fs/usr/lib |
Hans-G?nter@21982 | 44 |
Hans-G?nter@21982 | 45 cp -a $install/usr/bin $fs/usr |
Hans-G?nter@21982 | 46 cp -a $install/usr/sbin $fs/usr |
Hans-G?nter@21982 | 47 cp -a $install/usr/lib/ $fs/usr |
Hans-G?nter@21982 | 48 cp -a $install/etc $fs/ |
erjo@151 | 49 } |
erjo@151 | 50 |
erjo@1852 | 51 pre_install() |
erjo@1852 | 52 { |
Hans-G?nter@21982 | 53 if [ -f "$1/etc/sudoers" ] |
Hans-G?nter@21982 | 54 then |
pascal@18730 | 55 cp "$1/etc/sudoers" "$1/etc/sudoers.bak" |
erjo@1852 | 56 fi |
erjo@1852 | 57 } |
erjo@151 | 58 |
erjo@151 | 59 post_install() |
erjo@151 | 60 { |
Hans-G?nter@21982 | 61 if [ -f "$1/etc/sudoers.bak" ] |
Hans-G?nter@21982 | 62 then |
Hans-G?nter@21982 | 63 mv "$1/etc/sudoers" "$1/etc/sudoers-dist" |
Hans-G?nter@21982 | 64 mv "$1/etc/sudoers.bak" "$1/etc/sudoers" |
Hans-G?nter@21982 | 65 else |
Hans-G?nter@23678 | 66 chown root.root "$1/etc/sudoers" |
Hans-G?nter@23678 | 67 chmod 0440 "$1/etc/sudoers" |
erjo@1852 | 68 fi |
al@18734 | 69 } |