wok-6.x annotate lxc/receipt @ rev 15208

Add gentorrent
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Sep 10 12:58:20 2013 +0000 (2013-09-10)
parents 8dc86d3cfac7
children c95f2bc361ec
rev   line source
pascal@10905 1 # SliTaz package receipt.
pascal@10905 2
pascal@10905 3 PACKAGE="lxc"
pascal@10905 4 VERSION="0.7.4.1"
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@10905 10 WEB_SITE="http://lxc.sourceforge.net/"
pascal@10905 11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
pascal@10905 12
pascal@10905 13 DEPENDS="libcap perl"
pascal@10905 14 BUILD_DEPENDS="libcap-dev"
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 }