wok-6.x annotate sudo-pam/receipt @ rev 25107

Up open-iscsi (2.0.873)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jun 22 17:23:49 2022 +0000 (2022-06-22)
parents ff210fc49547
children 0be8f2748172
rev   line source
pascal@2191 1 # SliTaz package receipt.
pascal@2191 2
pascal@2191 3 PACKAGE="sudo-pam"
pascal@24006 4 VERSION="1.9.5p2"
pascal@2191 5 CATEGORY="security"
Hans-G?nter@21982 6 SHORT_DESC="Allows command execution as root for specified users using PAM."
pascal@2191 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
pascal@2191 11 SOURCE="sudo"
pascal@2191 12 TARBALL="$SOURCE-$VERSION.tar.gz"
Hans-G?nter@21982 13 WGET_URL="${WEB_SITE}sudo/dist/$TARBALL"
Hans-G?nter@21982 14
pascal@2191 15 PROVIDE="sudo:pam"
pankso@10004 16 DEPENDS="pam"
pankso@10004 17 BUILD_DEPENDS="pam-dev"
pankso@10004 18
pascal@24006 19 current_version()
pascal@24006 20 {
pascal@24006 21 wget -O - $WEB_SITE 2>/dev/null | \
pascal@24006 22 grep -A 1 'The current' | sed '/>sudo/!d;s|.*>sudo *||;s|<.*||;q'
pascal@24006 23 }
pascal@24006 24
pascal@2191 25 # Rules to configure and make the package.
pascal@2191 26 compile_rules()
pascal@2191 27 {
Hans-G?nter@21982 28 ./configure \
Hans-G?nter@21982 29 --sysconfdir=/etc \
Hans-G?nter@21982 30 --with-pam \
Hans-G?nter@21982 31 --with-editor=/bin/vi \
Hans-G?nter@21982 32 --libexecdir=/usr/lib \
slaxemulator@10081 33 $CONFIGURE_ARGS &&
Hans-G?nter@21982 34 make &&
Hans-G?nter@21982 35 make install
pascal@2191 36 }
pascal@2191 37
pascal@2191 38 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@2191 39 genpkg_rules()
pascal@2191 40 {
pascal@2191 41 mkdir -p $fs/usr/lib
al@13542 42 mkdir -p $fs/etc/pam.d
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/etc/sudoers $fs/etc/
Hans-G?nter@21982 47 cp -a $stuff/sudo $fs/etc/pam.d/
Hans-G?nter@21982 48 cp -a $install/usr/lib $fs/usr
pascal@2191 49 }
pascal@2191 50
pascal@2191 51 pre_install()
pascal@2191 52 {
Hans-G?nter@21982 53 if [ -f "$1/etc/sudoers" ]
Hans-G?nter@21982 54 then
Hans-G?nter@23678 55 cp "$1/etc/sudoers" "$1/etc/sudoers.bak"
pascal@2191 56 fi
pascal@2191 57 }
pascal@2191 58
pascal@2191 59 post_install()
pascal@2191 60 {
Hans-G?nter@21982 61 if [ -f "$1/etc/sudoers.bak" ]
Hans-G?nter@21982 62 then
Hans-G?nter@23678 63 rm -f "$1/etc/sudoers"
Hans-G?nter@23678 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"
pascal@2191 68 fi
al@18741 69 }
pascal@7632 70
pascal@7632 71 pre_remove()
pascal@7632 72 {
al@18741 73 tazpkg get-install ${PACKAGE%-pam}
pascal@7632 74 }