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

# secfixes:
#   6.8-r1:
#     - CVE-2019-25016

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

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

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

	# Uncomment to allow group "wheel" to become root
	# permit persist :wheel
	EOF
}

sha512sums="
d96fe1cdd70e9211de9996ad05bcf7a127facd02af48f7ab2561869d9d16708f1b61722c6e6b9fe15a62e9ef501e09b1ba444b7b43a066f1895e543ebc9402e7  doas-6.8.1.tar.gz
79218c2798e67e6345818c357e651e09ef558d6cbcc5566e9e4816e8f4e73e4f737710caf617c211e89902ae7ef21cd520d3fc4d829550d40e1bd3b13befd0dc  configuration-directory.patch
60efd196595bda2c4f036cd0080a8825a85fedcc7524c917304b342373863213b3c557b4336f1dab760f167fd8cc2a59b2e744d8a47ff8a8acebbe74b1328f4f  manpage-example-path.patch
"