aboutsummaryrefslogtreecommitdiffstats
path: root/main/sudo/APKBUILD
blob: b1dda153a073759bc0e43f2703781b1b2c8245e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sudo
pkgver=1.8.7
if [ "${pkgver%_*}" != "$pkgver" ]; then
	_realver=${pkgver%_*}${pkgver#*_}
else
	_realver=$pkgver
fi
pkgrel=0
pkgdesc="Give certain users the ability to run some commands as root"
url="http://www.sudo.ws/sudo/"
arch="all"
license='custom ISC'
makedepends="zlib-dev"
depends=
subpackages="$pkgname-doc $pkgname-dev"
source="ftp://ftp.sudo.ws/pub/sudo/$pkgname-$_realver.tar.gz
	libcrypt.patch"

_builddir="$srcdir"/$pkgname-$_realver
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--with-env-editor \
		--without-pam \
		--without-skey \
		--with-passprompt="[sudo] password for %p: " \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	# the sudo's mkinstalldir script miscreates the leading
	# path components with bad permissions. fix this.
	install -d -m0755 "$pkgdir"/var "$pkgdir"/var/db || return 1
	make -j1 DESTDIR="$pkgdir" install || return 1
}

md5sums="a02367090e1dac8d0c1747de1127b6bf  sudo-1.8.7.tar.gz
429d9613091f1f3f19ce8def5b3032b3  libcrypt.patch"
sha256sums="39626cf3d48c4fd5a9139a2627d42bfefac7ce47f470bdba3aeb4e3d7c49566a  sudo-1.8.7.tar.gz
80d16a0b4ee7b97eed6806c4cf2c1b04c9d2ae3ec550bc97ed44ff6db8c8d556  libcrypt.patch"
sha512sums="c8058794d0f0e6390de69cb8e84dede0971ce9c05114e22bdbd79ebc1b47cd563b5081a275e4abf2a2cca8d8db5bfe2c47ad384734849c92e515eefff67c7ec8  sudo-1.8.7.tar.gz
e4b236c2ee47e01222eed98c401861336d49a0c74a28219972c68763a4c9233a010b315850f9f2f4396205dc21c4ce4eeb5c95101464f4f3040b70d25bd2116c  libcrypt.patch"