aboutsummaryrefslogtreecommitdiffstats
path: root/community/bubblewrap/APKBUILD
blob: bbb99583b61beb5a7b2221a6a1b1ff6c1b2ebddd (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
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=bubblewrap
pkgver=0.1.8
pkgrel=0
pkgdesc="Unprivileged sandboxing tool"
url="https://github.com/projectatomic/bubblewrap"
arch="all"
license="LGPL2+"
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"
builddir="$srcdir/$pkgname-$pkgver"

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

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

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/ || return 1
}

sha512sums="b8dd214165fd486f0bc16d6aabc0159154f23744f09f3b6b3b3f2b7a028d732651fdec8ca7ab38d9be302d4e6b3c82adcb0c4865893b1df893ca6ac4d9ca9070  bubblewrap-0.1.8.tar.gz
400a0446670ebf80f16739f1a7a2878aadc3099424f957ba09ec3df780506c23a11368f0578c9e352d7ca6473fa713df826fad7a20c50338aa5f9fa9ac6b84a4  realpath-workaround.patch"