summaryrefslogtreecommitdiff
path: root/repo/lxc/lxc.xibuild
blob: c5595a468c9294b1687b7b8a4d6e35646b928f97 (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
#!/bin/sh

NAME="lxc"
DESC="Userspace interface for the Linux kernel containment features"

MAKEDEPS="libcap libseccomp pam linux-headers musl-legacy-compat docbook2x automake autoconf libtool perl-xml-namespacesupport perl-xml-sax perl-xml-sax-base libcap"

PKG_VER=5.0.1
SOURCE="https://linuxcontainers.org/downloads/lxc/lxc-$PKG_VER.tar.gz"

ADDITIONAL="
lxc.confd
lxc.initd
sysconfdir.patch
"

prepare () {
    apply_patches
    for line in 319 942; do
        sed -i "${line}s/check: true/check: false/g" meson.build
    done
    sed -i "140d" src/lxc/process_utils.h
}

build() {
    mkdir build &&
    cd build    &&
    meson --prefix=/usr \
            -Db_lto=false \
            -Dpam-cgroup=true \
            -Dtests=true \
            -Dinit-script="[]" \
            -Dcapabilities=false \
            .. &&
    ninja
}

package() {
    DESTDIR=$PKG_DEST ninja install

	install -Dm755 "$BUILD_ROOT"/lxc.initd "$PKG_DEST"/etc/init.d/lxc
	install -Dm644 "$BUILD_ROOT"/lxc.confd "$PKG_DEST"/etc/conf.d/lxc
	install -d "$PKG_DEST"/var/lib/lxc

	# Remove useless config for SysVinit.
	rm -r "$PKG_DEST"/etc/default
}