aboutsummaryrefslogtreecommitdiffstats
path: root/main/doas/APKBUILD
blob: 4afb74d34d50e2f3e66022f3aec89b1ec3902259 (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
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=doas
pkgver=6.8.1
pkgrel=1
pkgdesc="OpenBSD's temporary privilege escalation tool"
url="https://github.com/Duncaen/OpenDoas"
arch="all"
license="ISC"
makedepends="bison"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/Duncaen/OpenDoas/archive/v$pkgver.tar.gz"
builddir="$srcdir/OpenDoas-$pkgver"
options="$options suid"

# secfixes:
#   6.8-r1:
#     - 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="d96fe1cdd70e9211de9996ad05bcf7a127facd02af48f7ab2561869d9d16708f1b61722c6e6b9fe15a62e9ef501e09b1ba444b7b43a066f1895e543ebc9402e7  doas-6.8.1.tar.gz"