# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit autotools eutils subversion DESCRIPTION="Linux-VServer Control Daemon." HOMEPAGE="http://svn.linux-vserver.org/projects/vcd/" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="client server" DEPEND="dev-libs/confuse =dev-libs/lucid-svn-9999 =sys-libs/libvserver-svn-9999 >=dev-libs/xmlrpc-c-1.05 server? ( >=dev-db/sqlite-3 )" RDEPEND="${DEPEND}" ESVN_REPO_URI="http://svn.linux-vserver.org/svn/vcd/trunk" ESVN_BOOTSTRAP="make -f Makefile.svn" pkg_setup() { if built_with_use dev-libs/xmlrpc-c threads ; then eerror "You have threads support enabled in XMLRPC-C." eerror "This is likely to cause problems in ${PN}." eerror "Please remove the 'threads' USE flag from XMLRPC-C!" die "No threads 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 the 'curl' or 'libwww' USE flags 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 --with-vserverdir="${VSERVERDIR}" \ $(use_enable client) \ $(use_enable server) \ || die "econf failed" emake || die "emake failed" } src_install() { emake DESTDIR="${D}" install || die "emake install failed" if use server ; then keepdir "${VSERVERDIR}" keepdir /var/lib/vcd newinitd "${FILESDIR}/vcd-initd" vcd || die "Inserting init.d-file failed" fi dodoc README ChangeLog AUTHORS }