wok-6.x annotate lxc/receipt @ rev 23649
Up openvpn (2.4.9)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Apr 20 13:31:36 2020 +0000 (2020-04-20) |
parents | 4175a35819c8 |
children | 34e801e0eb52 |
rev | line source |
---|---|
pascal@10905 | 1 # SliTaz package receipt. |
pascal@10905 | 2 |
pascal@10905 | 3 PACKAGE="lxc" |
Hans-G?nter@23150 | 4 VERSION="3.2.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@15082 | 8 LICENSE="LGPL2.1" |
Hans-G?nter@21391 | 9 WEB_SITE="https://linuxcontainers.org/lxc/" |
Hans-G?nter@21391 | 10 |
pascal@10905 | 11 TARBALL="$PACKAGE-$VERSION.tar.gz" |
Hans-G?nter@21391 | 12 WGET_URL="https://linuxcontainers.org/downloads/$PACKAGE/$TARBALL" |
pascal@10905 | 13 |
Hans-G?nter@23150 | 14 DEPENDS="bridge-utils gcc83-lib-base gnutls iptables libcap linux-bridge |
Hans-G?nter@23150 | 15 linux-netfilter perl util-linux-getopt" |
Hans-G?nter@21391 | 16 BUILD_DEPENDS="gcc83 gnutls-dev libcap-dev util-linux-getopt" |
pascal@10905 | 17 |
pascal@10905 | 18 # Rules to configure and make the package. |
pascal@10905 | 19 compile_rules() |
pascal@10905 | 20 { |
Hans-G?nter@21391 | 21 ./configure \ |
Hans-G?nter@21391 | 22 CC=gcc-83 \ |
Hans-G?nter@21391 | 23 CXX=g++-83 \ |
Hans-G?nter@21391 | 24 --prefix=/usr \ |
Hans-G?nter@21391 | 25 --mandir=/usr/share/man \ |
Hans-G?nter@21391 | 26 --sysconfdir=/etc \ |
Hans-G?nter@21391 | 27 --libexec=/usr/lib/$PACKAGE \ |
Hans-G?nter@21391 | 28 --localstatedir=/var \ |
Hans-G?nter@21391 | 29 $CONFIGURE_ARGS && |
Hans-G?nter@21391 | 30 make -j 1 && |
pascal@10905 | 31 make DESTDIR=$DESTDIR install |
pascal@10905 | 32 } |
pascal@10905 | 33 |
pascal@10905 | 34 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@10905 | 35 genpkg_rules() |
pascal@10905 | 36 { |
Hans-G?nter@21391 | 37 mkdir -p $fs/usr/share |
Hans-G?nter@21391 | 38 mkdir -p $fs/var/lib/lxc |
Hans-G?nter@21391 | 39 |
Hans-G?nter@21391 | 40 cp -a $install/usr/share/lxc $fs/usr/share |
Hans-G?nter@21391 | 41 cp -a $install/usr/bin $fs/usr |
Hans-G?nter@21391 | 42 cp -a $install/usr/lib $fs/usr |
Hans-G?nter@21391 | 43 |
Hans-G?nter@23150 | 44 rm -rf $fs/usr/lib/pkgconfig |
Hans-G?nter@21391 | 45 |
Hans-G?nter@21391 | 46 cp -a $install/etc $fs |
Hans-G?nter@21391 | 47 cp -a $install/var $fs |
Hans-G?nter@21391 | 48 |
Hans-G?nter@23150 | 49 sed -i -e 's/^is_set(/zgrep() { zcat | grep "$@"; }\n\n&/' \ |
pascal@10905 | 50 -e 's/\(.*\$GREP .*\)\(\$CONFIG.*\)/\1< \2/' \ |
pascal@10905 | 51 $fs/usr/bin/lxc-checkconfig |
Hans-G?nter@23150 | 52 chmod +x $fs/usr/bin/lxc-* |
pascal@10905 | 53 } |
pascal@10905 | 54 |
pascal@10905 | 55 post_install() |
pascal@10905 | 56 { |
pascal@10905 | 57 [ -n "$1" ] && return |
pascal@10905 | 58 lxc-checkconfig | tee /dev/stderr | grep -q required && cat <<EOT |
pascal@10905 | 59 |
pascal@10905 | 60 You have to fix your kernel configuration first to use lxc ! |
pascal@10905 | 61 |
pascal@10905 | 62 EOT |
pascal@10905 | 63 } |