blob: 4a252f74f084eae29ad18c4a6abc50c4cceaa2d1 (
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
56
57
58
59
60
61
62
63
64
|
# Maintainer: Pierre Carru <aur@carru.fr>
# Contributor: Christian Hesse <mail@eworm.de>
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
pkgname=libcgroup-git
_pkgname=libcgroup
pkgver=2.0.r828.g16fdb8c
pkgrel=1
pkgdesc='Library that abstracts the control group file system in Linux'
arch=('i686' 'x86_64')
makedepends=('cmake' 'make' 'python')
url='https://github.com/libcgroup/libcgroup'
license=(LGPL)
backup=('etc/cgconfig.conf'
'etc/cgrules.conf'
'etc/cgsnapshot_blacklist.conf')
options=('!emptydirs' '!libtool')
install=libcgroup.install
provides=('libcgroup')
conflicts=('libcgroup')
source=("$_pkgname"::'git+https://github.com/libcgroup/libcgroup#branch=main'
'cgrules.service')
sha256sums=('SKIP'
'6b1340ff6717f55e5e57dacc72accc0bfaed7e50ef31439271b6ddc893cbf671')
pkgver() {
cd "$_pkgname"
git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd "$_pkgname"
./bootstrap.sh
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--sbindir=/usr/bin \
--enable-opaque-hierarchy=name=systemd
make
}
package() {
cd "$_pkgname"
make DESTDIR="${pkgdir}" pkgconfigdir="/usr/lib/pkgconfig" install
install -D -m0644 samples/config/cgconfig.conf "${pkgdir}/etc/cgconfig.conf"
install -D -m0644 samples/config/cgrules.conf "${pkgdir}/etc/cgrules.conf"
install -D -m0644 samples/config/cgsnapshot_denylist.conf "${pkgdir}/etc/cgsnapshot_denylist.conf"
install -D -m0644 samples/config/cgsnapshot_allowlist.conf "${pkgdir}/etc/cgsnapshot_allowlist.conf"
install -D -m0644 dist/cgconfig.service "${pkgdir}/usr/lib/systemd/system/cgconfig.service"
install -D -m0644 ${srcdir}/cgrules.service "${pkgdir}/usr/lib/systemd/system/cgrules.service"
rm -f ${pkgdir}/usr/lib/security/pam_cgroup.{a,la}
# Make cgexec setgid cgred
chown root:160 ${pkgdir}/usr/bin/cgexec
chmod 2755 ${pkgdir}/usr/bin/cgexec
}
|