aboutsummaryrefslogtreecommitdiffstats
path: root/main/sudo/APKBUILD
blob: a21f2bd695fa40aa6203bcd20f123f5c5c36c85e (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
66
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sudo
pkgver=1.8.10_p3
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"
options="suid"

_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="fcd8d0d9f9f0397d076ee901e242ed39  sudo-1.8.10p3.tar.gz
44a4afb9ac22947ad6a05777ce66c5fc  fix-cross-compile.patch
e6384e3c40ebbf7cb92722acb8b9e467  libcrypt.patch
2cfe0d309d42e7278bea325059b48eb5  domain.patch"
sha256sums="6eda135fa68163108f1c24de6975de5ddb09d75730bb62d6390bda7b04345400  sudo-1.8.10p3.tar.gz
d40eaf27f9bcc4d2151c3133fe12efcf29fe496a4d72dabe22661cf311943f59  fix-cross-compile.patch
e26a4e01b275a306b13fb7a5253c342d975892b3b3d136290e28a63a1b1f418b  libcrypt.patch
1f455dc37a88089017d580a66e805c3e2ad144f16a304ee457b6cfa8668d18dd  domain.patch"
sha512sums="714e20d7ea0e76b24acfa73818644fdf4094374b2000ef0cb879a92273230fdc2bda4cab041f224f19b57149f2ae289c377c693d3bca5a2d5e1bba79cf97c434  sudo-1.8.10p3.tar.gz
f9257262b32365f1ee8914781f917fc425229f88d3d8df0f33ebb2cfbf0ad8d41a6ea83b15b2c74b1f5728b380bcd1e92ca58e138717e5104a35c2fc8a376ea1  fix-cross-compile.patch
5444e9c6c01d42c8e1ed701f67a9394f42bbe435c0d6c82ffbfbaa661f0e19ed1d6cb31d3c57db3559707d64a68445845673be547cd3586c73c03ddb408108de  libcrypt.patch
66c724d8e062745be669625dfdf08ee78e04b8b1f28ae61f49d38a952e52045229bbe3d9e0ecfe8e00d1a53db082488198054d23377bf11706bfbefd59068d3d  domain.patch"