wok-backports annotate lxc/receipt @ rev 55

Remove ashism ==
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Feb 27 17:46:33 2019 +0100 (2019-02-27)
parents cc08b218b93c
children
rev   line source
shann@6 1 # SliTaz package receipt.
shann@6 2
shann@6 3 PACKAGE="lxc"
shann@6 4 VERSION="0.7.4.1"
shann@6 5 CATEGORY="system-tools"
shann@6 6 SHORT_DESC="Userspace control package for Linux Containers."
shann@6 7 MAINTAINER="pascal.bellard@slitaz.org"
shann@6 8 TARBALL="$PACKAGE-$VERSION.tar.gz"
shann@6 9 WEB_SITE="http://lxc.sourceforge.net/"
shann@6 10 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
shann@6 11
shann@8 12 DEPENDS="libcap perl util-linux-ng-getopt linux-netfilter linux-bridge iptables bridge-utils"
shann@6 13 BUILD_DEPENDS="libcap-dev util-linux-ng-getopt"
shann@6 14
shann@6 15 # Rules to configure and make the package.
shann@6 16 compile_rules()
shann@6 17 {
shann@6 18 cd $src
shann@6 19 ./configure --prefix=/usr --mandir=/usr/share/man \
shann@6 20 --localstatedir=/var \
shann@6 21 $CONFIGURE_ARGS &&
shann@6 22 make &&
shann@6 23 make DESTDIR=$DESTDIR install
shann@6 24 }
shann@6 25
shann@6 26 # Rules to gen a SliTaz package suitable for Tazpkg.
shann@6 27 genpkg_rules()
shann@6 28 {
shann@6 29 mkdir -p $fs/usr $fs/var/lib/lxc
shann@6 30 cp -a $_pkg/usr/bin $fs/usr
shann@6 31 cp -a $_pkg/usr/lib $fs/usr
shann@6 32 sed -i 's|/usr/var/lib/lxc|/var/lib/lxc|;s|/bin/bash|/bin/ash|' \
shann@6 33 $fs/usr/bin/lxc-version $fs/usr/bin/lxc-netstat \
shann@6 34 $fs/usr/bin/lxc-destroy $fs/usr/bin/lxc-create \
shann@6 35 $fs/usr/bin/lxc-setcaps $fs/usr/bin/lxc-setuid \
shann@6 36 $fs/usr/bin/lxc-ls $fs/usr/lib/lxc/templates/lxc*
shann@6 37 sed -i -e 's/^is_set(/zgrep() { zcat | grep "$@"; }\n\n&/' \
shann@6 38 -e 's/\(.*\$GREP .*\)\(\$CONFIG.*\)/\1< \2/' \
shann@6 39 -e 's/ < 3/ -lt 3/;s/ > 3/ -gt 3/' -e 's|/bin/bash|/bin/ash|' \
shann@6 40 $fs/usr/bin/lxc-checkconfig
shann@6 41 sed -i "s/--preserve-root//" $fs/usr/bin/lxc-destroy $fs/usr/lib/lxc/templates/lxc-*
shann@6 42 sed -i "s/(arch)/(uname -m)/" $fs/usr/lib/lxc/templates/lxc-*
shann@6 43 chmod +x $fs/usr/bin/lxc-*
shann@6 44 }
shann@6 45
shann@6 46 post_install()
shann@6 47 {
shann@6 48 [ -n "$1" ] && return
shann@6 49 lxc-checkconfig | tee /dev/stderr | grep -q required && cat <<EOT
shann@6 50
shann@6 51 You have to fix your kernel configuration first to use lxc !
shann@6 52
shann@6 53 EOT
shann@6 54 }