wok annotate sudo/receipt @ rev 24940

f2c: add libf2c (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Apr 15 16:39:27 2022 +0000 (2022-04-15)
parents ff210fc49547
children 1a6eb3793a9e
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"
Hans-G?nter@21982 12 WGET_URL="${WEB_SITE}sudo/dist/$TARBALL"
Hans-G?nter@21982 13
erjo@2631 14 CONFIG_FILES="/etc/sudoers"
erjo@2631 15
pascal@24006 16 current_version()
pascal@24006 17 {
pascal@24006 18 wget -O - $WEB_SITE 2>/dev/null | \
pascal@24006 19 grep -A 1 'The current' | sed '/>sudo/!d;s|.*>sudo *||;s|<.*||;q'
pascal@24006 20 }
pascal@24006 21
erjo@151 22 # Rules to configure and make the package.
erjo@151 23 compile_rules()
erjo@151 24 {
Hans-G?nter@21982 25 ./configure \
Hans-G?nter@21982 26 --sysconfdir=/etc \
Hans-G?nter@21982 27 --without-pam \
Hans-G?nter@21982 28 --with-editor=/bin/vi \
Hans-G?nter@21982 29 --libexecdir=/usr/lib \
Hans-G?nter@21982 30 $CONFIGURE_ARGS &&
Hans-G?nter@21982 31
erjo@151 32 # Build everything
pascal@1476 33 make &&
Hans-G?nter@21982 34
erjo@151 35 # Install everything
slaxemulator@8963 36 make install
erjo@151 37 }
erjo@151 38
erjo@151 39 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@151 40 genpkg_rules()
erjo@151 41 {
erjo@151 42 mkdir -p $fs/usr/lib
Hans-G?nter@21982 43
Hans-G?nter@21982 44 cp -a $install/usr/bin $fs/usr
Hans-G?nter@21982 45 cp -a $install/usr/sbin $fs/usr
Hans-G?nter@21982 46 cp -a $install/usr/lib/ $fs/usr
Hans-G?nter@21982 47 cp -a $install/etc $fs/
erjo@151 48 }
erjo@151 49
erjo@1852 50 pre_install()
erjo@1852 51 {
Hans-G?nter@21982 52 if [ -f "$1/etc/sudoers" ]
Hans-G?nter@21982 53 then
pascal@18730 54 cp "$1/etc/sudoers" "$1/etc/sudoers.bak"
erjo@1852 55 fi
erjo@1852 56 }
erjo@151 57
erjo@151 58 post_install()
erjo@151 59 {
Hans-G?nter@21982 60 if [ -f "$1/etc/sudoers.bak" ]
Hans-G?nter@21982 61 then
Hans-G?nter@21982 62 mv "$1/etc/sudoers" "$1/etc/sudoers-dist"
Hans-G?nter@21982 63 mv "$1/etc/sudoers.bak" "$1/etc/sudoers"
Hans-G?nter@21982 64 else
Hans-G?nter@23678 65 chown root.root "$1/etc/sudoers"
Hans-G?nter@23678 66 chmod 0440 "$1/etc/sudoers"
erjo@1852 67 fi
al@18734 68 }