summaryrefslogtreecommitdiffstats
path: root/main/sudo/APKBUILD
blob: c79cdda9ffcb3a4ebcc765198ef457a282520ffe (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sudo
pkgver=1.8.8
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
	fix-cross-compile.patch
	libcrypt.patch"

_builddir="$srcdir"/$pkgname-$_realver
prepare() {
	cd "$_builddir"
	update_config_sub || return 1
	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="fc4f074090afd56d9ff4ff4e97321971  sudo-1.8.8.tar.gz
44a4afb9ac22947ad6a05777ce66c5fc  fix-cross-compile.patch
429d9613091f1f3f19ce8def5b3032b3  libcrypt.patch"
sha256sums="9f911c1e9297fb8006deb52fa81197a8d06b9d54e70672f723c467ecae992fc9  sudo-1.8.8.tar.gz
d40eaf27f9bcc4d2151c3133fe12efcf29fe496a4d72dabe22661cf311943f59  fix-cross-compile.patch
80d16a0b4ee7b97eed6806c4cf2c1b04c9d2ae3ec550bc97ed44ff6db8c8d556  libcrypt.patch"
sha512sums="e56ea849c2e6470a3d97fc76bde6af145938cf2df4d17f3faef00368262d8e2dd5bcc7e3adf490e853e23466b15638000a527156bd694ce4980003d751c896d5  sudo-1.8.8.tar.gz
f9257262b32365f1ee8914781f917fc425229f88d3d8df0f33ebb2cfbf0ad8d41a6ea83b15b2c74b1f5728b380bcd1e92ca58e138717e5104a35c2fc8a376ea1  fix-cross-compile.patch
e4b236c2ee47e01222eed98c401861336d49a0c74a28219972c68763a4c9233a010b315850f9f2f4396205dc21c4ce4eeb5c95101464f4f3040b70d25bd2116c  libcrypt.patch"