summaryrefslogtreecommitdiff
blob: 489f47abd12973c729e9bf735b7f9723abbf464e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vserver-utils/vserver-utils-1.0.3.ebuild,v 1.2 2006/04/10 12:03:22 phreak Exp $

inherit autotools eutils toolchain-funcs

DESCRIPTION="Linux-VServer admin utilities"
HOMEPAGE="http://dev.croup.de/proj/vserver-utils"
SRC_URI="http://dev.gentoo.org/~hollow/vserver-utils/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"

IUSE="diet"

DEPEND=">=sys-libs/libvserver-1.0.2
	diet? ( >=dev-libs/dietlibc-0.28 )"

pkg_setup() {
	if [[ -z "${VDIRBASE}" ]]; then
		einfo
		einfo "You can change the default vserver base directory (/vservers)"
		einfo "by setting the VDIRBASE environment variable."
	fi

	: ${VDIRBASE:=/vservers}

	einfo
	einfo "Using \"${VDIRBASE}\" as vserver base directory"
	einfo
}

src_compile() {
	econf $(use_enable diet dietlibc) \
	      --localstatedir=/var \
	      --with-vdirbase="${VDIRBASE}" || die "econf failed"
	emake || die "emake failed"
}

src_install() {
	make DESTDIR="${D}" install || die "install failed"

	keepdir "${VDIRBASE}"
	fperms 000 "${VDIRBASE}"

	keepdir /var/lock/vservers

	dodoc README ChangeLog AUTHORS
}