wok-next annotate sudo/receipt @ rev 19668
sudo: add patch
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Mar 17 16:21:35 2017 +0200 (2017-03-17) |
parents | 0baf19fb14de |
children | 58556ca016f4 |
rev | line source |
---|---|
erjo@151 | 1 # SliTaz package receipt. |
erjo@151 | 2 |
erjo@151 | 3 PACKAGE="sudo" |
devl547@16228 | 4 VERSION="1.8.10p2" |
pankso@209 | 5 CATEGORY="security" |
pascal@1137 | 6 SHORT_DESC="Sudo (su \"do\") allows a system administrator to delegate authority." |
erjo@784 | 7 MAINTAINER="erjo@slitaz.org" |
pascal@15593 | 8 LICENSE="ISC" |
erjo@151 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
erjo@151 | 10 WEB_SITE="http://www.gratisoft.us/sudo/" |
erjo@151 | 11 WGET_URL="http://www.gratisoft.us/sudo/dist/$TARBALL" |
erjo@2631 | 12 CONFIG_FILES="/etc/sudoers" |
erjo@2631 | 13 |
al@19668 | 14 BUILD_DEPENDS="gettext" |
al@19668 | 15 |
erjo@151 | 16 # Rules to configure and make the package. |
erjo@151 | 17 compile_rules() |
erjo@151 | 18 { |
al@19668 | 19 # Fix error and rebuild .mo |
al@19668 | 20 patch -p1 -i $stuff/sr.po.patch |
al@19668 | 21 msgfmt $src/plugins/sudoers/po/sr.po -o $src/plugins/sudoers/po/sr.mo |
al@19668 | 22 |
slaxemulator@8963 | 23 ./configure --sysconfdir=/etc \ |
erjo@151 | 24 --without-pam \ |
erjo@151 | 25 --with-editor=/bin/vi \ |
pankso@156 | 26 --libexecdir=/usr/lib \ |
slaxemulator@10081 | 27 $CONFIGURE_ARGS && |
erjo@151 | 28 # Build everything |
pascal@1476 | 29 make && |
erjo@151 | 30 # Install everything |
slaxemulator@8963 | 31 make install |
erjo@151 | 32 } |
erjo@151 | 33 |
erjo@151 | 34 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@151 | 35 genpkg_rules() |
erjo@151 | 36 { |
erjo@151 | 37 mkdir -p $fs/usr/lib |
erjo@13462 | 38 cp -a $install/usr/bin $fs/usr |
erjo@13462 | 39 cp -a $install/usr/sbin $fs/usr |
devl547@16228 | 40 cp -a $install/usr/lib/ $fs/usr |
erjo@13462 | 41 cp -a $install/etc $fs/ |
erjo@151 | 42 } |
erjo@151 | 43 |
erjo@1852 | 44 pre_install() |
erjo@1852 | 45 { |
llevrel@18782 | 46 if [ -f "$1/etc/sudoers" ]; then |
pascal@18730 | 47 cp "$1/etc/sudoers" "$1/etc/sudoers.bak" |
erjo@1852 | 48 fi |
erjo@1852 | 49 } |
erjo@151 | 50 |
erjo@151 | 51 post_install() |
erjo@151 | 52 { |
pascal@18730 | 53 if [ -f "$1/etc/sudoers.bak" ]; then |
pascal@18730 | 54 mv "$1/etc/sudoers" "$1/etc/sudoers-dist" |
pascal@18730 | 55 mv "$1/etc/sudoers.bak" "$1/etc/sudoers" |
erjo@1852 | 56 else |
pascal@18730 | 57 chown root.root "$1/etc/sudoers" |
pascal@18730 | 58 chmod 0440 "$1/etc/sudoers" |
erjo@1852 | 59 fi |
al@18734 | 60 } |