aboutsummaryrefslogtreecommitdiffstats
path: root/community/firejail/APKBUILD
blob: 8a261ada224d924701e85ba3ce92d97ed0438c9b (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
54
55
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=firejail
pkgver=0.9.42
pkgrel=0
pkgdesc="Linux namespaces and seccomp-bpf sandbox"
url="https://firejail.wordpress.com/"
arch="all"
license="GPL2"
depends="bash"
makedepends="linux-headers"
options="suid"
subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp"
source="$pkgname-$pkgver.tar.gz::https://github.com/netblue30/$pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare || return 1

	find "$builddir" -name Makefile.in -exec sed -i -r \
		-e '/CFLAGS/s: (-O2|-ggdb) : :g' \
		-e '1iCC=@CC@' {} +
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		|| return 1
	make || return 1
}

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

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

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

md5sums="b6d2e6d5fcecabee92cc3957d5b8cb4f  firejail-0.9.42.tar.gz"
sha256sums="5a604f6189e80d4ad35de9497e9623c8e6c8f624c5edd02844bc9f9acace5217  firejail-0.9.42.tar.gz"
sha512sums="9103825c04f0fc6e730e30e723caa49a9c7cd9402809ec3962019b831f61dc604c1ee4ad9f831138d8386fb442a78c01355872bbab08ed21172731e3271b3c9f  firejail-0.9.42.tar.gz"