wok-stable annotate lxc/receipt @ rev 12465

Up e2fsprogs (1.44.2)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 04 18:42:23 2019 +0100 (2019-03-04)
parents a949dd818ac6
children
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@12429 12 DEPENDS="libcap perl util-linux-ng-getopt"
pascal@12410 13 BUILD_DEPENDS="libcap-dev util-linux-ng-getopt"
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 \
shann@12427 36 $fs/usr/bin/lxc-ls $fs/usr/lib/lxc/templates/lxc*
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
shann@12412 41 sed -i "s/--preserve-root//" $fs/usr/bin/lxc-destroy $fs/usr/lib/lxc/templates/lxc-*
shann@12427 42 sed -i "s/(arch)/(uname -m)/" $fs/usr/lib/lxc/templates/lxc-*
pascal@10905 43 chmod +x $fs/usr/bin/lxc-*
pascal@10905 44 }
pascal@10905 45
pascal@10905 46 post_install()
pascal@10905 47 {
pascal@10905 48 [ -n "$1" ] && return
pascal@10905 49 lxc-checkconfig | tee /dev/stderr | grep -q required && cat <<EOT
pascal@10905 50
pascal@10905 51 You have to fix your kernel configuration first to use lxc !
pascal@10905 52
pascal@10905 53 EOT
pascal@10905 54 }