wok-6.x annotate sudo-pam/receipt @ rev 22595
updated childsplay (3.3 -> 3.4)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Jan 07 17:19:08 2020 +0100 (2020-01-07) |
parents | 95bad7889d0e |
children | ff210fc49547 |
rev | line source |
---|---|
pascal@2191 | 1 # SliTaz package receipt. |
pascal@2191 | 2 |
pascal@2191 | 3 PACKAGE="sudo-pam" |
pascal@21988 | 4 VERSION="1.8.28" |
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 } |