wok-next diff lxc/receipt @ rev 12249

vte: save space on core and split python bindings in python-vte
author Christophe Lincoln <pankso@slitaz.org>
date Mon Apr 09 19:03:43 2012 +0200 (2012-04-09)
parents
children 5bfb2289a920
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/lxc/receipt	Mon Apr 09 19:03:43 2012 +0200
     1.3 @@ -0,0 +1,52 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="lxc"
     1.7 +VERSION="0.7.4.1"
     1.8 +CATEGORY="system-tools"
     1.9 +SHORT_DESC="Userspace control package for Linux Containers."
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.12 +WEB_SITE="http://lxc.sourceforge.net/"
    1.13 +WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
    1.14 +
    1.15 +DEPENDS="libcap perl"
    1.16 +BUILD_DEPENDS="libcap-dev"
    1.17 +
    1.18 +# Rules to configure and make the package.
    1.19 +compile_rules()
    1.20 +{
    1.21 +	cd $src
    1.22 +	./configure --prefix=/usr --mandir=/usr/share/man \
    1.23 +		--localstatedir=/var \
    1.24 +	$CONFIGURE_ARGS &&
    1.25 +	make &&
    1.26 +	make DESTDIR=$DESTDIR install
    1.27 +}
    1.28 +
    1.29 +# Rules to gen a SliTaz package suitable for Tazpkg.   
    1.30 +genpkg_rules()                                      
    1.31 +{
    1.32 +	mkdir -p $fs/usr $fs/var/lib/lxc
    1.33 +	cp -a $_pkg/usr/bin $fs/usr
    1.34 +	cp -a $_pkg/usr/lib $fs/usr
    1.35 +	sed -i 's|/usr/var/lib/lxc|/var/lib/lxc|;s|/bin/bash|/bin/ash|' \
    1.36 +		$fs/usr/bin/lxc-version $fs/usr/bin/lxc-netstat \
    1.37 +		$fs/usr/bin/lxc-destroy $fs/usr/bin/lxc-create \
    1.38 +		$fs/usr/bin/lxc-setcaps $fs/usr/bin/lxc-setuid \
    1.39 +		$fs/usr/bin/lxc-ls
    1.40 +	sed -i -e 's/^is_set(/zgrep() { zcat | grep "$@"; }\n\n&/' \
    1.41 +		-e 's/\(.*\$GREP .*\)\(\$CONFIG.*\)/\1< \2/' \
    1.42 +		-e 's/ < 3/ -lt 3/;s/ > 3/ -gt 3/' -e 's|/bin/bash|/bin/ash|' \
    1.43 +		$fs/usr/bin/lxc-checkconfig
    1.44 +	chmod +x $fs/usr/bin/lxc-*
    1.45 +}
    1.46 +
    1.47 +post_install()
    1.48 +{
    1.49 +	[ -n "$1" ] && return
    1.50 +	lxc-checkconfig  | tee /dev/stderr | grep -q required && cat <<EOT
    1.51 +
    1.52 +You have to fix your kernel configuration first to use lxc !
    1.53 +
    1.54 +EOT
    1.55 +}