aboutsummaryrefslogtreecommitdiffstats
path: root/main/sudo/APKBUILD
blob: 54abd91b9635f987686edb9e03ba86990ec2ab89 (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
55
56
57
58
59
60
61
62
63
64
65
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sudo
pkgver=1.8.9_p4
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 bash"
depends=
subpackages="$pkgname-doc $pkgname-dev"
source="ftp://ftp.sudo.ws/pub/sudo/$pkgname-$_realver.tar.gz
	fix-cross-compile.patch
	libcrypt.patch
	domain.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 \
		--build=$CBUILD \
		--host=$CHOST \
		--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="a46f6de8645e6c5b6668d30657439d1c  sudo-1.8.9p4.tar.gz
44a4afb9ac22947ad6a05777ce66c5fc  fix-cross-compile.patch
e6384e3c40ebbf7cb92722acb8b9e467  libcrypt.patch
2cfe0d309d42e7278bea325059b48eb5  domain.patch"
sha256sums="1943f9e9409c6542935d2e2d862c48d0d69dcf27288b294b8b537c02f52ac7a7  sudo-1.8.9p4.tar.gz
d40eaf27f9bcc4d2151c3133fe12efcf29fe496a4d72dabe22661cf311943f59  fix-cross-compile.patch
e26a4e01b275a306b13fb7a5253c342d975892b3b3d136290e28a63a1b1f418b  libcrypt.patch
1f455dc37a88089017d580a66e805c3e2ad144f16a304ee457b6cfa8668d18dd  domain.patch"
sha512sums="755a7843cd94d55b841514034fff63e5a83b58d3d44e25588b657f87f7018908a6c27b00c5ca5393f2896266f4c4baf86ef71a582bc890a6253180f386cbc522  sudo-1.8.9p4.tar.gz
f9257262b32365f1ee8914781f917fc425229f88d3d8df0f33ebb2cfbf0ad8d41a6ea83b15b2c74b1f5728b380bcd1e92ca58e138717e5104a35c2fc8a376ea1  fix-cross-compile.patch
5444e9c6c01d42c8e1ed701f67a9394f42bbe435c0d6c82ffbfbaa661f0e19ed1d6cb31d3c57db3559707d64a68445845673be547cd3586c73c03ddb408108de  libcrypt.patch
66c724d8e062745be669625dfdf08ee78e04b8b1f28ae61f49d38a952e52045229bbe3d9e0ecfe8e00d1a53db082488198054d23377bf11706bfbefd59068d3d  domain.patch"