summaryrefslogtreecommitdiff
path: root/system/libcap/APKBUILD
blob: def2eba126a166d0ae1330648f7b8ba3c21a50b5 (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
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: 
pkgname=libcap
pkgver=2.44
pkgrel=0
pkgdesc="POSIX 1003.1e capabilities"
arch="all"
options="!check"
license="BSD-3-Clause OR GPL-2.0-only"
url="https://www.friedhoff.org/posixfilecaps.html"
depends=""
depends_dev="linux-headers"
makedepends_build="linux-headers perl !gperf"
makedepends_host="$depends_dev attr-dev"
makedepends="$makedepends_build $makedepends_host"
subpackages="$pkgname-static:_static $pkgname-doc $pkgname-dev"
source="https://kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-$pkgver.tar.xz"

build () {
	make \
		BUILD_CC=gcc \
		CC="${CC:-gcc}" \
		lib=lib 
}

_static() {
	pkgdesc="libcap static library"
	depends=""
	install -d "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib
}

package() {
	make \
		lib=/lib \
		prefix=/usr \
		RAISE_SETFCAP=no \
		DESTDIR="$pkgdir" install
}

sha512sums="1bb323ca362923bd6bd0e2e4639cf8726975165a620a243b31e797056439eb7efb2bfbc8e5521636783a86c7415b2037b1638c98747b79183ca7d3d42a04ff20  libcap-2.44.tar.xz"