aboutsummaryrefslogtreecommitdiffstats
path: root/community/libcgroup/APKBUILD
blob: d395317958584a98b508661026a45622f006134f (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Contributor: psykose <alice@ayaya.dev>
# Maintainer: psykose <alice@ayaya.dev>
pkgname=libcgroup
pkgver=2.0.2
pkgrel=0
pkgdesc="cgroup library"
url="https://github.com/libcgroup/libcgroup"
arch="all"
license="LGPL-2.1-only"
makedepends="
	bsd-compat-headers
	byacc
	flex
	fts-dev
	libtool
	linux-headers
	linux-pam-dev
	"
subpackages="$pkgname-doc $pkgname-static $pkgname-pam $pkgname-dev cgroup-tools:_tools"
source="https://github.com/libcgroup/libcgroup/releases/download/v$pkgver/libcgroup-$pkgver.tar.gz"
# tests seem to fail for no reason and prompt sudo
# cgexec suid
options="!check suid"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-pam-module-dir=/lib/security
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	# the .so is the one that is used
	rm "$pkgdir"/lib/security/pam_cgroup.a
}

pam() {
	pkgdesc="$pkgdesc (pam module)"
	amove lib/security
}

_tools() {
	pkgdesc="$pkgdesc (tools)"
	amove usr/bin usr/sbin
}

sha512sums="
824d4408bcd1e2848358c57ed02cdf5ccf1e20a3963dac26e15140985da3d88ced7d583e0c6108ad1b11729ee608f0018e3726fb59211f2e04417fd3e4fd1c9f  libcgroup-2.0.2.tar.gz
"