wok-6.x annotate lxc/receipt @ rev 15569
Up lxc (0.9.0)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Nov 26 07:50:32 2013 +0000 (2013-11-26) |
parents | 5bfb2289a920 |
children | f86dca6efd69 |
rev | line source |
---|---|
pascal@10905 | 1 # SliTaz package receipt. |
pascal@10905 | 2 |
pascal@10905 | 3 PACKAGE="lxc" |
pascal@15569 | 4 VERSION="0.9.0" |
pascal@10905 | 5 CATEGORY="system-tools" |
pascal@10905 | 6 SHORT_DESC="Userspace control package for Linux Containers." |
pascal@10905 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15082 | 8 LICENSE="LGPL2.1" |
pascal@10905 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@15569 | 10 WEB_SITE="http://linuxcontainers.org/" |
pascal@15569 | 11 WGET_URL="${WEB_SITE}downloads/$TARBALL" |
pascal@10905 | 12 |
pascal@10905 | 13 DEPENDS="libcap perl" |
pascal@15569 | 14 BUILD_DEPENDS="libcap-dev util-linux-getopt" |
pascal@10905 | 15 |
pascal@10905 | 16 # Rules to configure and make the package. |
pascal@10905 | 17 compile_rules() |
pascal@10905 | 18 { |
pascal@10905 | 19 cd $src |
pascal@10905 | 20 ./configure --prefix=/usr --mandir=/usr/share/man \ |
pascal@10905 | 21 --localstatedir=/var \ |
pascal@10905 | 22 $CONFIGURE_ARGS && |
pascal@10905 | 23 make && |
pascal@10905 | 24 make DESTDIR=$DESTDIR install |
pascal@10905 | 25 } |
pascal@10905 | 26 |
pascal@10905 | 27 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@10905 | 28 genpkg_rules() |
pascal@10905 | 29 { |
pascal@10905 | 30 mkdir -p $fs/usr $fs/var/lib/lxc |
pascal@15082 | 31 cp -a $install/usr/bin $fs/usr |
pascal@15082 | 32 cp -a $install/usr/lib $fs/usr |
pascal@10905 | 33 sed -i 's|/usr/var/lib/lxc|/var/lib/lxc|;s|/bin/bash|/bin/ash|' \ |
pascal@10905 | 34 $fs/usr/bin/lxc-version $fs/usr/bin/lxc-netstat \ |
pascal@10905 | 35 $fs/usr/bin/lxc-destroy $fs/usr/bin/lxc-create \ |
pascal@15082 | 36 $fs/usr/bin/lxc-setcap $fs/usr/bin/lxc-setuid \ |
pascal@10905 | 37 $fs/usr/bin/lxc-ls |
pascal@10905 | 38 sed -i -e 's/^is_set(/zgrep() { zcat | grep "$@"; }\n\n&/' \ |
pascal@10905 | 39 -e 's/\(.*\$GREP .*\)\(\$CONFIG.*\)/\1< \2/' \ |
pascal@10905 | 40 -e 's/ < 3/ -lt 3/;s/ > 3/ -gt 3/' -e 's|/bin/bash|/bin/ash|' \ |
pascal@10905 | 41 $fs/usr/bin/lxc-checkconfig |
pascal@10905 | 42 chmod +x $fs/usr/bin/lxc-* |
pascal@10905 | 43 } |
pascal@10905 | 44 |
pascal@10905 | 45 post_install() |
pascal@10905 | 46 { |
pascal@10905 | 47 [ -n "$1" ] && return |
pascal@10905 | 48 lxc-checkconfig | tee /dev/stderr | grep -q required && cat <<EOT |
pascal@10905 | 49 |
pascal@10905 | 50 You have to fix your kernel configuration first to use lxc ! |
pascal@10905 | 51 |
pascal@10905 | 52 EOT |
pascal@10905 | 53 } |