wok-4.x view lxc/receipt @ rev 12466
New toolchain GCC 4.9.2, Glibc 2.19, Binutils 2.23.1
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Wed Nov 09 15:12:00 2022 +0000 (2022-11-09) |
parents | a949dd818ac6 |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="lxc"
4 VERSION="0.7.4.1"
5 CATEGORY="system-tools"
6 SHORT_DESC="Userspace control package for Linux Containers."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="http://lxc.sourceforge.net/"
10 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
12 DEPENDS="libcap perl util-linux-ng-getopt"
13 BUILD_DEPENDS="libcap-dev util-linux-ng-getopt"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 cd $src
19 ./configure --prefix=/usr --mandir=/usr/share/man \
20 --localstatedir=/var \
21 $CONFIGURE_ARGS &&
22 make &&
23 make DESTDIR=$DESTDIR install
24 }
26 # Rules to gen a SliTaz package suitable for Tazpkg.
27 genpkg_rules()
28 {
29 mkdir -p $fs/usr $fs/var/lib/lxc
30 cp -a $_pkg/usr/bin $fs/usr
31 cp -a $_pkg/usr/lib $fs/usr
32 sed -i 's|/usr/var/lib/lxc|/var/lib/lxc|;s|/bin/bash|/bin/ash|' \
33 $fs/usr/bin/lxc-version $fs/usr/bin/lxc-netstat \
34 $fs/usr/bin/lxc-destroy $fs/usr/bin/lxc-create \
35 $fs/usr/bin/lxc-setcaps $fs/usr/bin/lxc-setuid \
36 $fs/usr/bin/lxc-ls $fs/usr/lib/lxc/templates/lxc*
37 sed -i -e 's/^is_set(/zgrep() { zcat | grep "$@"; }\n\n&/' \
38 -e 's/\(.*\$GREP .*\)\(\$CONFIG.*\)/\1< \2/' \
39 -e 's/ < 3/ -lt 3/;s/ > 3/ -gt 3/' -e 's|/bin/bash|/bin/ash|' \
40 $fs/usr/bin/lxc-checkconfig
41 sed -i "s/--preserve-root//" $fs/usr/bin/lxc-destroy $fs/usr/lib/lxc/templates/lxc-*
42 sed -i "s/(arch)/(uname -m)/" $fs/usr/lib/lxc/templates/lxc-*
43 chmod +x $fs/usr/bin/lxc-*
44 }
46 post_install()
47 {
48 [ -n "$1" ] && return
49 lxc-checkconfig | tee /dev/stderr | grep -q required && cat <<EOT
51 You have to fix your kernel configuration first to use lxc !
53 EOT
54 }