void-packages/srcpkgs/xen/template

86 lines
2.4 KiB
Text

# Template file for 'xen'
pkgname=xen
version=4.1.2
wrksrc=xen-${version}
revision=2
makedepends="which lzo-devel openssl-devel e2fsprogs-devel zlib-devel gnutls-devel>=3.1.5
libbluetooth-devel pciutils-devel libX11-devel libXext-devel SDL-devel MesaLib-devel
ncurses-devel liblzma-devel python-devel dev86 acpica-utils wget git"
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
makedepends+=" gcc-multilib"
fi
short_desc="Xen Hypervisor and Utilities"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://xen.org"
license="GPL-2"
distfiles="http://bits.xensource.com/oss-xen/release/$version/xen-$version.tar.gz"
checksum=7d9c93057cf480d3f1efa792b19285a84fa3c06060ea5c5c453be00887389b0d
long_desc="
This package provides the official Xen Hypervisor and related utilities
for starting/stopping/accessing unprivileged domains (domUs)."
broken_as_needed=yes
do_build() {
install -d ${DESTDIR}
cd ${DESTDIR} && ln -sf . install
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
install -d ${DESTDIR}/usr/lib
cd ${DESTDIR}/usr && ln -s lib lib64 && cd ${wrksrc}
fi
cd ${wrksrc} && make ${makejobs} DISTDIR=${DESTDIR} xen tools
}
do_install() {
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
install -d ${DESTDIR}/usr/lib
cd ${DESTDIR}/usr && ln -s lib lib64 && cd ${wrksrc}
fi
make DESTDIR=${DESTDIR} install-xen install-tools
rm -f ${DESTDIR}/usr/lib/lib
# Remove unneeded stuff.
rm -f ${DESTDIR}/install ${DESTDIR}/usr/lib64
# Move example config files into correct directory.
vmkdir usr/share/examples/xen
mv ${DESTDIR}/etc/xen/xmexample* ${DESTDIR}/usr/share/examples/xen
mv ${DESTDIR}/etc/xen/cpupool ${DESTDIR}/usr/share/examples/xen
}
xen-devel_package() {
depends="xen"
short_desc="${sourcepkg} development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/lib*.*a"
}
}
xen_package() {
make_dirs="
/var/run/xenstored 755 root root
/var/run/xend/boot 755 root root
/var/lib/xenstored 755 root root
/var/lib/xen/xenpaging 755 root root
/var/xen/dump 755 root root
/var/log/xen 755 root root
/var/lock/subsys 755 root root
/etc/xen/auto 755 root root"
conf_files="
/etc/default/xendomains
/etc/default/xencommons
/etc/xen/xm-config.xml
/etc/xen/xl.conf
/etc/xen/xend-config.sxp
/etc/xen/xend-pci-quirks.sxp
/etc/xen/xend-pci-permissive.sxp"
pycompile_module="xen grub"
depends="iproute2 bridge-utils"
nostrip=yes
pkg_install() {
vmove etc
vmove usr
}
}