aboutsummaryrefslogtreecommitdiffstats
path: root/main/sudo/APKBUILD
blob: 781bca91ded8404cc971cf61d06b54ac3a6f6ca3 (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.10_p2
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="5e5eab1036a7cc2c088ab0d9b6b6a42e  sudo-1.8.10p2.tar.gz
44a4afb9ac22947ad6a05777ce66c5fc  fix-cross-compile.patch
e6384e3c40ebbf7cb92722acb8b9e467  libcrypt.patch
2cfe0d309d42e7278bea325059b48eb5  domain.patch"
sha256sums="ba6cb8db6dccdb92a96e8ae63ca65c410f8b61270b603ab9af4b1154fef379f1  sudo-1.8.10p2.tar.gz
d40eaf27f9bcc4d2151c3133fe12efcf29fe496a4d72dabe22661cf311943f59  fix-cross-compile.patch
e26a4e01b275a306b13fb7a5253c342d975892b3b3d136290e28a63a1b1f418b  libcrypt.patch
1f455dc37a88089017d580a66e805c3e2ad144f16a304ee457b6cfa8668d18dd  domain.patch"
sha512sums="c746489dbe57804d05261d784a949b2231e5b96a7c8caf51cf9021a092aebd04ebf31a0e89390a64197f684b2e63405b6715eff20b71b1f5772f183bcd47cce1  sudo-1.8.10p2.tar.gz
f9257262b32365f1ee8914781f917fc425229f88d3d8df0f33ebb2cfbf0ad8d41a6ea83b15b2c74b1f5728b380bcd1e92ca58e138717e5104a35c2fc8a376ea1  fix-cross-compile.patch
5444e9c6c01d42c8e1ed701f67a9394f42bbe435c0d6c82ffbfbaa661f0e19ed1d6cb31d3c57db3559707d64a68445845673be547cd3586c73c03ddb408108de  libcrypt.patch
66c724d8e062745be669625dfdf08ee78e04b8b1f28ae61f49d38a952e52045229bbe3d9e0ecfe8e00d1a53db082488198054d23377bf11706bfbefd59068d3d  domain.patch"