# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-4.1.2-r3.ebuild,v 1.4 2012/12/11 09:02:38 ssuominen Exp $ EAPI="4" PYTHON_DEPEND="2" PYTHON_USE_WITH="xml threads" if [[ $PV == *9999 ]]; then KEYWORDS="" REPO="xen-unstable.hg" EHG_REPO_URI="http://xenbits.xensource.com/${REPO}" 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 selinux 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 }