wok-next rev 10905
Add lxc
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Jul 21 12:00:26 2011 +0200 (2011-07-21) |
parents | 1ad8ae5ccf68 |
children | 04d689df32af |
files | lxc-dev/receipt lxc/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/lxc-dev/receipt Thu Jul 21 12:00:26 2011 +0200 1.3 @@ -0,0 +1,19 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="lxc-dev" 1.7 +VERSION="0.7.4.1" 1.8 +CATEGORY="development" 1.9 +SHORT_DESC="Userspace control package for Linux Containers development files." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +WEB_SITE="http://lxc.sourceforge.net/" 1.12 +WANTED="lxc" 1.13 + 1.14 +DEPENDS="lxc" 1.15 + 1.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.17 +genpkg_rules() 1.18 +{ 1.19 + mkdir -p $fs/usr/share 1.20 + cp -a $_pkg/usr/include $fs/usr 1.21 + cp -a $_pkg/usr/share/pkgconfig $fs/usr/share 1.22 +}
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/lxc/receipt Thu Jul 21 12:00:26 2011 +0200 2.3 @@ -0,0 +1,52 @@ 2.4 +# SliTaz package receipt. 2.5 + 2.6 +PACKAGE="lxc" 2.7 +VERSION="0.7.4.1" 2.8 +CATEGORY="system-tools" 2.9 +SHORT_DESC="Userspace control package for Linux Containers." 2.10 +MAINTAINER="pascal.bellard@slitaz.org" 2.11 +TARBALL="$PACKAGE-$VERSION.tar.gz" 2.12 +WEB_SITE="http://lxc.sourceforge.net/" 2.13 +WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" 2.14 + 2.15 +DEPENDS="libcap perl" 2.16 +BUILD_DEPENDS="libcap-dev" 2.17 + 2.18 +# Rules to configure and make the package. 2.19 +compile_rules() 2.20 +{ 2.21 + cd $src 2.22 + ./configure --prefix=/usr --mandir=/usr/share/man \ 2.23 + --localstatedir=/var \ 2.24 + $CONFIGURE_ARGS && 2.25 + make && 2.26 + make DESTDIR=$DESTDIR install 2.27 +} 2.28 + 2.29 +# Rules to gen a SliTaz package suitable for Tazpkg. 2.30 +genpkg_rules() 2.31 +{ 2.32 + mkdir -p $fs/usr $fs/var/lib/lxc 2.33 + cp -a $_pkg/usr/bin $fs/usr 2.34 + cp -a $_pkg/usr/lib $fs/usr 2.35 + sed -i 's|/usr/var/lib/lxc|/var/lib/lxc|;s|/bin/bash|/bin/ash|' \ 2.36 + $fs/usr/bin/lxc-version $fs/usr/bin/lxc-netstat \ 2.37 + $fs/usr/bin/lxc-destroy $fs/usr/bin/lxc-create \ 2.38 + $fs/usr/bin/lxc-setcaps $fs/usr/bin/lxc-setuid \ 2.39 + $fs/usr/bin/lxc-ls 2.40 + sed -i -e 's/^is_set(/zgrep() { zcat | grep "$@"; }\n\n&/' \ 2.41 + -e 's/\(.*\$GREP .*\)\(\$CONFIG.*\)/\1< \2/' \ 2.42 + -e 's/ < 3/ -lt 3/;s/ > 3/ -gt 3/' -e 's|/bin/bash|/bin/ash|' \ 2.43 + $fs/usr/bin/lxc-checkconfig 2.44 + chmod +x $fs/usr/bin/lxc-* 2.45 +} 2.46 + 2.47 +post_install() 2.48 +{ 2.49 + [ -n "$1" ] && return 2.50 + lxc-checkconfig | tee /dev/stderr | grep -q required && cat <<EOT 2.51 + 2.52 +You have to fix your kernel configuration first to use lxc ! 2.53 + 2.54 +EOT 2.55 +}