# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-9999.ebuild,v 1.7 2011/10/23 10:49:29 patrick Exp $ EAPI="4" PYTHON_DEPEND="2" PYTHON_USE_WITH="xml threads" if [[ $PV == *9999 ]]; then KEYWORDS="" REPO="xen-unstable.hg" XEN_EXTFILES_URL="http://xenbits.xensource.com/xen-extfiles" IPXE_COMMIT="9a93db3f0947484e30e753bbd61a10b17336e20e" EHG_REPO_URI="http://xenbits.xensource.com/${REPO}" SRC_URI="http://dev.gentoo.org/~alexxy/distfiles/ipxe-git-${IPXE_COMMIT}.tar.gz" S="${WORKDIR}/${REPO}" live_eclass="mercurial" else KEYWORDS="~amd64 ~x86" XEN_EXTFILES_URL="http://xenbits.xensource.com/xen-extfiles" SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz \ $XEN_EXTFILES_URL/ipxe-git-v1.0.0.tar.gz" S="${WORKDIR}/xen-${PV}" fi inherit flag-o-matic eutils multilib python toolchain-funcs ${live_eclass} DESCRIPTION="Xend daemon and tools" HOMEPAGE="http://xen.org/" DOCS=( README docs/README.xen-bugtool docs/ChangeLog ) LICENSE="GPL-2" SLOT="0" IUSE="api custom-cflags debug doc flask hvm qemu pygrub screen xend" REQUIRED_USE="hvm? ( qemu )" QA_PRESTRIPPED="/usr/share/xen/qemu/openbios-ppc \ /usr/share/xen/qemu/openbios-sparc64 \ /usr/share/xen/qemu/openbios-sparc32" QA_WX_LOAD=${QA_PRESTRIPPED} CDEPEND="> "${ED}"/etc/conf.d/xendomains || die cp "${FILESDIR}"/xen-consoles.logrotate "${ED}"/etc/xen/ || die keepdir /var/log/xen-consoles fi python_convert_shebangs -r 2 "${ED}" # xend expects these to exist keepdir /var/run/xenstored /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen # for xendomains keepdir /etc/xen/auto } pkg_postinst() { elog "Official Xen Guide and the unoffical wiki page:" elog " http://www.gentoo.org/doc/en/xen-guide.xml" elog " http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo" if [[ "$(scanelf -s __guard -q $(type -P python))" ]] ; then echo ewarn "xend may not work when python is built with stack smashing protection (ssp)." ewarn "If 'xm create' fails with '', see bug #141866" ewarn "This probablem may be resolved as of Xen 3.0.4, if not post in the bug." fi if ! has_version "dev-lang/python[ncurses]"; then echo ewarn "NB: Your dev-lang/python is built without USE=ncurses." ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py." fi if has_version "sys-apps/iproute2[minimal]"; then echo ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking" ewarn "will not work until you rebuild iproute2 without USE=minimal." fi if ! use hvm; then echo elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm" elog "support enable the hvm use flag." elog "An x86 or amd64 multilib system is required to build HVM support." echo elog "The qemu use flag has been removed and replaced with hvm." fi if use xend; then echo elog "xend capability has been enabled and installed" fi if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then echo elog "xensv is broken upstream (Gentoo bug #142011)." elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed." fi python_mod_optimize $(use pygrub && echo grub) xen } pkg_postrm() { python_mod_cleanup $(use pygrub && echo grub) xen }