wok-next annotate lxc/receipt @ rev 12361
Up: alsa-utils to 1.0.25.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Thu Apr 19 21:33:30 2012 +0000 (2012-04-19) |
parents | |
children | 5bfb2289a920 |
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@10905 | 8 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@10905 | 9 WEB_SITE="http://lxc.sourceforge.net/" |
pascal@10905 | 10 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" |
pascal@10905 | 11 |
pascal@10905 | 12 DEPENDS="libcap perl" |
pascal@10905 | 13 BUILD_DEPENDS="libcap-dev" |
pascal@10905 | 14 |
pascal@10905 | 15 # Rules to configure and make the package. |
pascal@10905 | 16 compile_rules() |
pascal@10905 | 17 { |
pascal@10905 | 18 cd $src |
pascal@10905 | 19 ./configure --prefix=/usr --mandir=/usr/share/man \ |
pascal@10905 | 20 --localstatedir=/var \ |
pascal@10905 | 21 $CONFIGURE_ARGS && |
pascal@10905 | 22 make && |
pascal@10905 | 23 make DESTDIR=$DESTDIR install |
pascal@10905 | 24 } |
pascal@10905 | 25 |
pascal@10905 | 26 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@10905 | 27 genpkg_rules() |
pascal@10905 | 28 { |
pascal@10905 | 29 mkdir -p $fs/usr $fs/var/lib/lxc |
pascal@10905 | 30 cp -a $_pkg/usr/bin $fs/usr |
pascal@10905 | 31 cp -a $_pkg/usr/lib $fs/usr |
pascal@10905 | 32 sed -i 's|/usr/var/lib/lxc|/var/lib/lxc|;s|/bin/bash|/bin/ash|' \ |
pascal@10905 | 33 $fs/usr/bin/lxc-version $fs/usr/bin/lxc-netstat \ |
pascal@10905 | 34 $fs/usr/bin/lxc-destroy $fs/usr/bin/lxc-create \ |
pascal@10905 | 35 $fs/usr/bin/lxc-setcaps $fs/usr/bin/lxc-setuid \ |
pascal@10905 | 36 $fs/usr/bin/lxc-ls |
pascal@10905 | 37 sed -i -e 's/^is_set(/zgrep() { zcat | grep "$@"; }\n\n&/' \ |
pascal@10905 | 38 -e 's/\(.*\$GREP .*\)\(\$CONFIG.*\)/\1< \2/' \ |
pascal@10905 | 39 -e 's/ < 3/ -lt 3/;s/ > 3/ -gt 3/' -e 's|/bin/bash|/bin/ash|' \ |
pascal@10905 | 40 $fs/usr/bin/lxc-checkconfig |
pascal@10905 | 41 chmod +x $fs/usr/bin/lxc-* |
pascal@10905 | 42 } |
pascal@10905 | 43 |
pascal@10905 | 44 post_install() |
pascal@10905 | 45 { |
pascal@10905 | 46 [ -n "$1" ] && return |
pascal@10905 | 47 lxc-checkconfig | tee /dev/stderr | grep -q required && cat <<EOT |
pascal@10905 | 48 |
pascal@10905 | 49 You have to fix your kernel configuration first to use lxc ! |
pascal@10905 | 50 |
pascal@10905 | 51 EOT |
pascal@10905 | 52 } |