# $Header: /magellan-cvs/smage/xen-hypervisor/xen-hypervisor-3.2.1-r2.smage2,v 1.3 2008/05/24 10:56:44 niro Exp $ PNAME="xen-hypervisor" PVER="3.2.1" PBUILD="r3" PCATEGORIE="app-emulation" STATE="unstable" DESCRIPTION="Xen is an open-source virtual machine hypervisor." HOMEPAGE="http://www.xen.org/" DEPEND=">= sys-apps/grub-0.97" SRCFILE="${PNAME/-hypervisor/}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME/-hypervisor/}-${PVER}" sminclude mbuild mtools SRC_URI=( http://bits.xensource.com/oss-xen/release/${PVER}/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) src_compile() { cd ${SRCDIR} mmake -C xen || die } src_install() { cd ${SRCDIR} mmake -C xen DESTDIR=${BINDIR} install || die minstalldocs xen/COPYING || die # install a example grub conf cat > ${SRCDIR}/grub.conf.example-xen << EOF default 0 timeout 30 title Magellan-Linux - Xen domain0 root (hd0,0) kernel (hd0,0)/boot/xen.gz dom0_mem=256M module /boot/vmlinuz-xen root=/dev/hda3 module /initrd-xen EOF minstalldir /boot/grub || die minstallfile grub.conf.example-xen /boot/grub || die } preinstall() { if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]] then mount /boot &> /dev/null fi } postinstall() { echo echo "See '/boot/grub/grub.conf.example-xen' how to setup your bootloader for xen." echo } preremove() { if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]] then mount /boot &> /dev/null fi }