aboutsummaryrefslogtreecommitdiffstats
path: root/community/libcgroup/APKBUILD
blob: 7906bb498448d073d33fca9001bd8e5d92cfea9f (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.1
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="
035a21a4d4c389e143af60c3d8574281356477889cbe42e64fffb0f5d8cac2c00c9716bc01a922cc706d78542cf07e05bfbcea6ce62c15aa0d92768377d4ab7b  libcgroup-2.0.1.tar.gz
"