wok-6.x view sudo/receipt @ rev 6117

fbida: fix genpkg_rules
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Sep 05 10:08:04 2010 +0200 (2010-09-05)
parents c6d42e89c645
children 847293c7b896
line source
1 # SliTaz package receipt.
3 PACKAGE="sudo"
4 VERSION="1.7.2p7"
5 CATEGORY="security"
6 SHORT_DESC="Sudo (su \"do\") allows a system administrator to delegate authority."
7 MAINTAINER="erjo@slitaz.org"
8 DEPENDS=""
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://www.gratisoft.us/sudo/"
11 WGET_URL="http://www.gratisoft.us/sudo/dist/$TARBALL"
12 CONFIG_FILES="/etc/sudoers"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 cd $src
19 ./configure --prefix=/usr \
20 --sysconfdir=/etc \
21 --without-pam \
22 --with-editor=/bin/vi \
23 --libexecdir=/usr/lib \
24 $CONFIGURE_ARGS &&
26 # Build everything
27 make &&
28 # Install everything
29 make DESTDIR=$PWD/_pkg install
30 }
32 # Rules to gen a SliTaz package suitable for Tazpkg.
33 genpkg_rules()
34 {
35 mkdir -p $fs/usr/lib
36 mkdir -p $fs/etc
37 cp -a $_pkg/usr/bin $fs/usr
38 cp -a $_pkg/usr/sbin $fs/usr
39 cp -a $_pkg/usr/lib/*.so $fs/usr/lib
40 cp -a stuff/sudoers $fs/etc
41 strip -s $fs/usr/bin/*
42 strip -s $fs/usr/sbin/*
43 strip -s $fs/usr/lib/sudo_noexec.so
44 }
46 pre_install()
47 {
48 echo "Processing pre-install commands..."
49 if [ -f $root/etc/sudoers.bak ]; then
50 cp $root/etc/sudoers $root/etc/sudoers.bak
51 fi
52 }
54 post_install()
55 {
56 local root
57 root=$1
58 echo "Processing post-install commands..."
59 if [ -f $root/etc/sudoers.bak ]; then
60 rm -f $root/etc/sudoers
61 mv $root/etc/sudoers.bak $root/etc/sudoers
62 else
63 chown root.root $root/etc/sudoers
64 chmod 0440 $root/etc/sudoers
65 fi
66 }