summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-cluster/vserver-utils-svn/vserver-utils-svn-9999.ebuild')
-rw-r--r--sys-cluster/vserver-utils-svn/vserver-utils-svn-9999.ebuild55
1 files changed, 48 insertions, 7 deletions
diff --git a/sys-cluster/vserver-utils-svn/vserver-utils-svn-9999.ebuild b/sys-cluster/vserver-utils-svn/vserver-utils-svn-9999.ebuild
index 233f3ec..6c2eeb0 100644
--- a/sys-cluster/vserver-utils-svn/vserver-utils-svn-9999.ebuild
+++ b/sys-cluster/vserver-utils-svn/vserver-utils-svn-9999.ebuild
@@ -12,25 +12,66 @@ LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~alpha ~ppc ~sparc ~x86"
-IUSE=""
+IUSE="client server stats"
DEPEND="=sys-libs/libvserver-svn-9999
- app-arch/bzip2
dev-libs/confuse
- >=dev-libs/xmlrpc-c-1.05
- >=dev-db/libdbi-0.8
- net-analyzer/rrdtool
- sys-libs/zlib"
+ client? ( >=dev-libs/xmlrpc-c-1.05 )
+ server? (
+ app-arch/bzip2
+ >=dev-db/libdbi-0.8
+ >=dev-libs/xmlrpc-c-1.05
+ sys-libs/zlib
+ )
+ stats? ( net-analyzer/rrdtool )"
ESVN_REPO_URI="http://dev.croup.de/repos/vserver-utils/trunk"
ESVN_BOOTSTRAP="make -f Makefile.svn"
+pkg_setup() {
+ if ! built_with_use dev-db/libdbi-drivers sqlite3; then
+ eerror "You have no SQLite3 backend in libdbi"
+ eerror "Please remerge libdbi-drivers with sqlite3 USE flag"
+ die "No SQLite3 support"
+ fi
+
+ if built_with_use dev-libs/xmlrpc-c threads; then
+ eerror "You have thread support enabled in XMLRPC-C"
+ eerror "This is likely to cause problems in ${PN}"
+ eerror "Please remove thread USE flag from XMLRPC-C"
+ die "No thread support possible"
+ fi
+
+ if ! built_with_use dev-libs/xmlrpc-c curl &&
+ ! built_with_use dev-libs/xmlrpc-c libwww; then
+ eerror "No client transport found in XMLRPC-C"
+ eerror "Please enable curl or libwww USE flag in XMLRPC-C"
+ die "No client transport found"
+ fi
+
+ einfo
+ einfo "You can set your vserver base directory using the VSERVERDIR"
+ einfo "environment variable."
+ einfo
+ einfo "Using ${VSERVERDIR:=/vservers} as vserver base directory"
+ einfo
+}
+
src_compile() {
- econf || die "econf failed"
+ econf --with-vserverdir="${VSERVERDIR}" \
+ $(use_enable client) \
+ $(use_enable server) \
+ $(use_enable stats) || die "econf failed"
+
emake || die "emake failed"
}
src_install() {
make DESTDIR="${D}" install || die "install failed"
+
+ use server && keepdir "${VSERVERDIR}"
+ use server && keepdir /var/lib/vcd
+ use stats && keepdir /var/lib/vstatd
+
dodoc README ChangeLog AUTHORS
}