aboutsummaryrefslogtreecommitdiffstats
path: root/main/bubblewrap/APKBUILD
blob: ef0cb0df5e8b6f566d88716d5e6c06689b8e656a (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
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=bubblewrap
pkgver=0.3.0
pkgrel=0
pkgdesc="Unprivileged sandboxing tool"
url="https://github.com/projectatomic/bubblewrap"
arch="all"
license="LGPL-2.0-or-later"
options="!check suid"
makedepends="autoconf automake libcap-dev docbook-xsl"
subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch"
source="bubblewrap-$pkgver.tar.gz::https://github.com/projectatomic/bubblewrap/archive/v$pkgver.tar.gz
	realpath-workaround.patch
	musl-fixes.patch"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$builddir"
	NOCONFIGURE=1 ./autogen.sh
	default_prepare
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--with-priv-mode=setuid
	make
}

package() {
	cd "$builddir"
	make install DESTDIR="$pkgdir"
}

bashcomp() {
	pkgdesc="Bash completions for $pkgname"
	depends=""
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"

	mkdir -p "$subpkgdir"/usr/share/
	mv "$pkgdir"/usr/share/bash-completion/ "$subpkgdir"/usr/share/
}

sha512sums="0dc033f83547112cedc706e4ef80e39ba0ee63f3750f93454a7b1a38aeb922ee660b3491a5a5d060fce9a7c4b326798a66814ad94f53f1e666c27a557fec17a4  bubblewrap-0.3.0.tar.gz
7e8395aa7801263056b0c072194240f0ae1ee1a3b0acd874baf112a7b7b5e53ac5f688ece9099067bfc1e28e52e81f107964a3288a615cc1eedb1af5f82bbd8e  realpath-workaround.patch
f59cda3b09dd99db9ca6d97099a15bb2523e054063d677502317ae3165ba2e32105a0ae8f877afc3827bd28d093c9d9d413270f4c87d9fe5f26f3eee670d916e  musl-fixes.patch"