1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit base bash-completion-r1 eutils toolchain-funcs udev
9 DESCRIPTION="OpenVZ ConTainers control utility"
10 HOMEPAGE="http://openvz.org/"
11 SRC_URI="http://download.openvz.org/utils/${PN}/${PV}/src/${P}.tar.bz2"
15 KEYWORDS="~amd64 ~ppc64 ~x86 -amd64-fbsd -sparc-fbsd -x86-fbsd"
16 IUSE="+ploop +vzmigrate"
18 RDEPEND="net-firewall/iptables
20 >=sys-apps/iproute2-3.3.0
23 >=sys-cluster/ploop-1.13
28 >=dev-libs/libcgroup-0.38
31 net-misc/rsync[xattr,acl]
32 app-arch/tar[xattr,acl]
46 # Set default OSTEMPLATE on gentoo
47 sed -i -e 's:=redhat-:=gentoo-:' etc/dists/default || die 'sed on etc/dists/default failed'
48 # Set proper udev directory
49 sed -i -e "s:/lib/udev:$(get_udevdir):" src/lib/dev.c || die 'sed on src/lib/dev.c failed'
55 --localstatedir=/var \
66 emake DESTDIR="${D}" udevdir="$(get_udevdir)"/rules.d install install-gentoo
68 # install the bash-completion script into the right location
69 rm -rf "${ED}"/etc/bash_completion.d
70 newbashcomp etc/bash_completion.d/vzctl.sh ${PN}
72 # We need to keep some dirs
73 keepdir /vz/{dump,lock,root,private,template/cache}
74 keepdir /etc/vz/names /var/lib/vzctl/veip
78 einfo "This vzctl release required kernel above 2.6.32.92"
80 einfo "If you have checkpoint suspend/restore feature in vanilla kernel"
81 einfo "please install "sys-process/criu" "
82 einfo "This is experimental and not stable ( in gentoo ) now"
84 einfo "if you have work with .xz compressed template, please install app-arch/xz-utils"
85 einfo "if you have check signature downloaded template - install gpg "