wok annotate lxc/receipt @ rev 18101
Up lighttpd (1.4.35)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Jun 01 10:08:34 2015 +0200 (2015-06-01) |
parents | 59e18fea0fd0 |
children | 4175a35819c8 |
rev | line source |
---|---|
pascal@10905 | 1 # SliTaz package receipt. |
pascal@10905 | 2 |
pascal@10905 | 3 PACKAGE="lxc" |
pascal@15927 | 4 VERSION="1.0.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 |
shann@15698 | 13 DEPENDS="libcap perl util-linux-getopt linux-netfilter linux-bridge iptables bridge-utils" |
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@15570 | 21 --sysconfdir=/etc \ |
pascal@15570 | 22 --libexec=/usr/lib/$PACKAGE \ |
pascal@10905 | 23 --localstatedir=/var \ |
pascal@10905 | 24 $CONFIGURE_ARGS && |
pascal@10905 | 25 make && |
pascal@10905 | 26 make DESTDIR=$DESTDIR install |
pascal@10905 | 27 } |
pascal@10905 | 28 |
pascal@10905 | 29 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@10905 | 30 genpkg_rules() |
pascal@10905 | 31 { |
pascal@15570 | 32 mkdir -p $fs/usr/share $fs/var/lib/lxc |
pascal@15570 | 33 cp -a $install/usr/share/lxc $fs/usr/share |
pascal@15082 | 34 cp -a $install/usr/bin $fs/usr |
pascal@15082 | 35 cp -a $install/usr/lib $fs/usr |
pascal@15571 | 36 rm -rf $fs/usr/lib/pkgconfig |
pascal@15570 | 37 cp -a $install/etc $fs |
pascal@15570 | 38 cp -a $install/var $fs |
pascal@10905 | 39 sed -i -e 's/^is_set(/zgrep() { zcat | grep "$@"; }\n\n&/' \ |
pascal@10905 | 40 -e 's/\(.*\$GREP .*\)\(\$CONFIG.*\)/\1< \2/' \ |
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 } |