contrib/lxc/Pkgfile

63 lines
1.8 KiB
Plaintext
Raw Normal View History

2013-04-13 14:26:39 +02:00
# Description: container namespace cgroup virtualisation for linux guests
2019-10-05 07:42:07 +02:00
# URL: https://linuxcontainers.org/lxc
2020-06-01 15:17:14 +02:00
# Maintainer: Tim Biermann, tbier at posteo dot de
2022-08-25 21:37:47 +02:00
# Depends: libseccomp meson ninja
# Optional: dnsmasq gnupg lua
2013-04-13 14:26:39 +02:00
name=lxc
2023-07-28 14:07:00 +02:00
version=5.0.3
2023-01-17 20:11:13 +01:00
release=1
2019-10-05 07:42:07 +02:00
source=(https://linuxcontainers.org/downloads/$name/$name-$version.tar.gz
2023-01-17 20:11:13 +01:00
default.conf lxc-usernet lxc-users-setup lxc-users lxc-cgroups lxc-net)
2013-04-13 14:26:39 +02:00
build() {
2022-08-25 21:37:47 +02:00
# fix pam_libdir
sed "/pam_security/s/libdir/'\/', 'lib'/" -i $name-$version/meson.build
prt-get isinst docbook2x && PKGMK_LXC+=' -D man=true' || PKGMK_LXC+=' -D man=false'
meson setup $name-$version build $PKGMK_LXC \
--prefix=/usr \
2019-10-05 07:42:07 +02:00
--sysconfdir=/etc \
2022-08-25 21:37:47 +02:00
--libexecdir=lib \
--localstatedir=/var \
-D distrosysconfdir=/etc/default \
-D data-path=/var/lib/lxc \
-D log-path=/var/log/lxc \
-D rootfs-mount-path=/usr/lib/lxc/rootfs \
-D runtime-path=/run \
--buildtype=plain \
--wrap-mode nodownload \
-D b_lto=true \
-D b_pie=true \
-D init-script=sysvinit \
-D pam-cgroup=true \
-D apparmor=false
2013-04-13 14:26:39 +02:00
2022-08-25 21:37:47 +02:00
meson compile -C build
DESTDIR=$PKG meson install -C build
2014-02-24 18:03:07 +01:00
2022-08-25 21:37:47 +02:00
install -d $PKG/etc/{default,rc.d}
2019-10-05 07:42:07 +02:00
install -d $PKG/var/lib/misc
install -m 0755 $SRC/lxc-users-setup $PKG/usr/sbin/
2022-08-25 21:37:47 +02:00
rm -rf $PKG/usr/lib/lxc/rootfs/README \
$PKG/usr/lib/lxc/lxc-apparmor-load \
$PKG/usr/share/doc \
$PKG/usr/share/lxc/config/common.conf.d/README
mv $PKG/etc/init.d/* $PKG/etc/rc.d/
2019-10-05 07:42:07 +02:00
install -m755 $SRC/lxc-cgroups $PKG/etc/rc.d/
install -m755 $SRC/lxc-users $PKG/etc/rc.d/
2022-08-25 21:37:47 +02:00
rmdir $PKG/etc/init.d/
2019-10-05 07:42:07 +02:00
install -m644 $SRC/lxc-net $PKG/etc/default/
rm $PKG/etc/lxc/default.conf
install -m644 $SRC/default.conf $PKG/etc/lxc/
install -m644 $SRC/lxc-usernet $PKG/etc/lxc/
2022-08-25 21:37:47 +02:00
prt-get isinst bash-completion || rm -fr $PKG/etc/bash_completion.d \
$PKG/usr/share/bash-completion
2013-04-13 14:26:39 +02:00
}