aboutsummaryrefslogtreecommitdiffstats
path: root/community/doas/APKBUILD
blob: 714271ae09fbd3540ba860595417d9f89e9dfbda (plain) (blame)
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
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=doas
pkgver=6.6.1
pkgrel=0
pkgdesc="OpenBSD's temporary privilege escalation tool"
url="https://github.com/Duncaen/OpenDoas"
arch="all"
license="BSD"
makedepends="bison"
subpackages="$pkgname-doc"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/Duncaen/OpenDoas/archive/v$pkgver.tar.gz
	reset-path.patch
"
builddir="$srcdir/OpenDoas-$pkgver"
options="$options suid"

# secfixes:
#   6.6.1-r0:
#     - CVE-2019-25016

build() {
	./configure \
		--prefix=/usr \
		--without-pam \
		--with-timestamp
	make
}

check() {
	# doas -v returns 1
	./doas -v || test $? = 1
}

package() {
	make install DESTDIR="$pkgdir"
	install -d "$pkgdir"/etc
	cat > "$pkgdir"/etc/doas.conf <<-EOF
	# see doas.conf(5) for configuration details

	# Uncomment to allow group "wheel" to become root
	# permit persist :wheel
	EOF
	chmod 440 "$pkgdir"/etc/doas.conf
}

sha512sums="390e0e139a2641be22c4493c3ed755d9cb4091f4ab8d590123b7c8c4f2f116cea3b3500926ff191fb98d92192ca9e92118cbcbeb463a7833763e00c65603e678  doas-6.6.1.tar.gz
cb3a0e3767ec22fbab6e0535ee8f31ec525a3debf6c9dfdecd78668a6a3ea3d4a3e6a8d4717fe0f5e07f0a3c9d099a6be8e880c0b8f00588482409465cda86f8  reset-path.patch"