wok-current annotate sudo-pam/receipt @ rev 21982
updated sudo and sudo-pam (1.8.20p2 -> 1.8.27)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Oct 12 10:45:05 2019 +0100 (2019-10-12) |
parents | 6135577f4d08 |
children | 624fa0648f2e |
rev | line source |
---|---|
pascal@2191 | 1 # SliTaz package receipt. |
pascal@2191 | 2 |
pascal@2191 | 3 PACKAGE="sudo-pam" |
Hans-G?nter@21982 | 4 VERSION="1.8.27" |
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@2191 | 19 # Rules to configure and make the package. |
pascal@2191 | 20 compile_rules() |
pascal@2191 | 21 { |
Hans-G?nter@21982 | 22 ./configure \ |
Hans-G?nter@21982 | 23 --sysconfdir=/etc \ |
Hans-G?nter@21982 | 24 --with-pam \ |
Hans-G?nter@21982 | 25 --with-editor=/bin/vi \ |
Hans-G?nter@21982 | 26 --libexecdir=/usr/lib \ |
slaxemulator@10081 | 27 $CONFIGURE_ARGS && |
Hans-G?nter@21982 | 28 make && |
Hans-G?nter@21982 | 29 make install |
pascal@2191 | 30 } |
pascal@2191 | 31 |
pascal@2191 | 32 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@2191 | 33 genpkg_rules() |
pascal@2191 | 34 { |
pascal@2191 | 35 mkdir -p $fs/usr/lib |
al@13542 | 36 mkdir -p $fs/etc/pam.d |
Hans-G?nter@21982 | 37 |
Hans-G?nter@21982 | 38 cp -a $install/usr/bin $fs/usr |
Hans-G?nter@21982 | 39 cp -a $install/usr/sbin $fs/usr |
Hans-G?nter@21982 | 40 cp -a $install/etc/sudoers $fs/etc/ |
Hans-G?nter@21982 | 41 cp -a $stuff/sudo $fs/etc/pam.d/ |
Hans-G?nter@21982 | 42 cp -a $install/usr/lib $fs/usr |
pascal@2191 | 43 } |
pascal@2191 | 44 |
pascal@2191 | 45 pre_install() |
pascal@2191 | 46 { |
Hans-G?nter@21982 | 47 if [ -f "$1/etc/sudoers" ] |
Hans-G?nter@21982 | 48 then |
pascal@18730 | 49 cp "$1/etc/sudoers" "$1/etc/sudoers.bak" |
pascal@2191 | 50 fi |
pascal@2191 | 51 } |
pascal@2191 | 52 |
pascal@2191 | 53 post_install() |
pascal@2191 | 54 { |
Hans-G?nter@21982 | 55 if [ -f "$1/etc/sudoers.bak" ] |
Hans-G?nter@21982 | 56 then |
pascal@18730 | 57 rm -f "$1/etc/sudoers" |
pascal@18730 | 58 mv "$1/etc/sudoers.bak" "$1/etc/sudoers" |
Hans-G?nter@21982 | 59 else |
pascal@18730 | 60 chown root.root "$1/etc/sudoers" |
pascal@18730 | 61 chmod 0440 "$1/etc/sudoers" |
pascal@2191 | 62 fi |
al@18741 | 63 } |
pascal@7632 | 64 |
pascal@7632 | 65 pre_remove() |
pascal@7632 | 66 { |
al@18741 | 67 tazpkg get-install ${PACKAGE%-pam} |
pascal@7632 | 68 } |