wok-next view sudo-pam/receipt @ rev 19715

Fix building: pciutils, pcmanfm-legacy, arj
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat May 13 17:25:31 2017 +0300 (2017-05-13)
parents 0baf19fb14de
children 9278a60d6895
line source
1 # SliTaz package receipt.
3 PACKAGE="sudo-pam"
4 VERSION="1.8.10p2"
5 CATEGORY="security"
6 SHORT_DESC="Sudo (su \"do\") allows a system administrator to delegate authority using PAM."
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="ISC"
9 WEB_SITE="http://www.gratisoft.us/sudo/"
10 CONFIG_FILES="/etc/sudoers"
11 PROVIDE="sudo:pam"
13 TARBALL="sudo-$VERSION.tar.gz"
14 WGET_URL="http://www.gratisoft.us/sudo/dist/$TARBALL"
16 DEPENDS="pam"
17 BUILD_DEPENDS="gettext pam-dev"
18 SIBLINGS="sudo"
20 # Rules to configure and make the package.
21 compile_rules()
22 {
23 # Fix error and rebuild .mo
24 patch -p1 -i $stuff/sr.po.patch
25 msgfmt $src/plugins/sudoers/po/sr.po -o $src/plugins/sudoers/po/sr.mo
27 ./configure \
28 --sysconfdir=/etc \
29 --with-pam \
30 --with-editor=/bin/vi \
31 --libexecdir=/usr/lib \
32 $CONFIGURE_ARGS &&
33 make &&
34 make install
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 mkdir -p $fs/usr/lib
41 mkdir -p $fs/etc/pam.d
42 cp -a $install/usr/bin $fs/usr
43 cp -a $install/usr/sbin $fs/usr
44 cp -a $install/etc/sudoers $fs/etc/
45 cp -a $stuff/sudo $fs/etc/pam.d/
46 cp -a $install/usr/lib $fs/usr
47 }
49 pre_install()
50 {
51 if [ -f "$1/etc/sudoers" ]; then
52 cp "$1/etc/sudoers" "$1/etc/sudoers.bak"
53 fi
54 }
56 post_install()
57 {
58 if [ -f "$1/etc/sudoers.bak" ]; then
59 rm -f "$1/etc/sudoers"
60 mv "$1/etc/sudoers.bak" "$1/etc/sudoers"
61 else
62 chown root.root "$1/etc/sudoers"
63 chmod 0440 "$1/etc/sudoers"
64 fi
65 }
67 pre_remove()
68 {
69 tazpkg get-install sudo
70 }