blob: 94e30a42b4bc59d85f9207b3034154703bed8d64 (
plain)
1 # Description: container namespace cgroup virtualisation for linux guests
2 # URL: https://linuxcontainers.org/lxc
3 # Maintainer: Tim Biermann, tbier at posteo dot de
4 # Packager: ryuo, James Buren
5 # Depends: libseccomp meson ninja
6 # Optional: dnsmasq gnupg lua
7
8 name=lxc
9 version=5.0.1
10 release=1
11 source=(https://linuxcontainers.org/downloads/$name/$name-$version.tar.gz
12 default.conf lxc-usernet lxc-users-setup lxc-users lxc-cgroups lxc-net
13 02-distrosysconfdir.patch)
14
15 build() {
16 patch -Np1 -d $name-$version -i $SRC/02-distrosysconfdir.patch
17
18 # fix pam_libdir
19 sed "/pam_security/s/libdir/'\/', 'lib'/" -i $name-$version/meson.build
20
21 prt-get isinst docbook2x && PKGMK_LXC+=' -D man=true' || PKGMK_LXC+=' -D man=false'
22
23 meson setup $name-$version build $PKGMK_LXC \
24 --prefix=/usr \
25 --sysconfdir=/etc \
26 --libexecdir=lib \
27 --localstatedir=/var \
28 -D distrosysconfdir=/etc/default \
29 -D data-path=/var/lib/lxc \
30 -D log-path=/var/log/lxc \
31 -D rootfs-mount-path=/usr/lib/lxc/rootfs \
32 -D runtime-path=/run \
33 --buildtype=plain \
34 --wrap-mode nodownload \
35 -D b_lto=true \
36 -D b_pie=true \
37 -D init-script=sysvinit \
38 -D pam-cgroup=true \
39 -D apparmor=false
40
41 meson compile -C build
42 DESTDIR=$PKG meson install -C build
43
44 install -d $PKG/etc/{default,rc.d}
45 install -d $PKG/var/lib/misc
46
47 install -m 0755 $SRC/lxc-users-setup $PKG/usr/sbin/
48
49 rm -rf $PKG/usr/lib/lxc/rootfs/README \
50 $PKG/usr/lib/lxc/lxc-apparmor-load \
51 $PKG/usr/share/doc \
52 $PKG/usr/share/lxc/config/common.conf.d/README
53
54 mv $PKG/etc/init.d/* $PKG/etc/rc.d/
55 install -m755 $SRC/lxc-cgroups $PKG/etc/rc.d/
56 install -m755 $SRC/lxc-users $PKG/etc/rc.d/
57 rmdir $PKG/etc/init.d/
58 install -m644 $SRC/lxc-net $PKG/etc/default/
59 rm $PKG/etc/lxc/default.conf
60 install -m644 $SRC/default.conf $PKG/etc/lxc/
61 install -m644 $SRC/lxc-usernet $PKG/etc/lxc/
62
63 prt-get isinst bash-completion || rm -fr $PKG/etc/bash_completion.d \
64 $PKG/usr/share/bash-completion
65 }
|