2010-02-23 22:56:13 +00:00
|
|
|
# Template file for 'xen'
|
|
|
|
pkgname=xen
|
2013-06-04 15:11:10 +00:00
|
|
|
version=4.2.2
|
2010-04-09 09:50:25 +00:00
|
|
|
wrksrc=xen-${version}
|
2013-06-04 15:11:10 +00:00
|
|
|
revision=1
|
|
|
|
hostmakedepends="which wget bison pkg-config"
|
|
|
|
makedepends="lzo-devel openssl-devel e2fsprogs-devel zlib-devel gnutls-devel>=3.1.5
|
2012-12-03 11:41:58 +00:00
|
|
|
libbluetooth-devel pciutils-devel libX11-devel libXext-devel SDL-devel MesaLib-devel
|
2013-06-04 15:11:10 +00:00
|
|
|
ncurses-devel liblzma-devel python-devel yajl-devel libglib-devel iproute2
|
|
|
|
bridge-utils dev86 acpica-utils"
|
2012-05-23 18:58:45 +00:00
|
|
|
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
2013-04-14 16:42:25 +00:00
|
|
|
makedepends+=" gcc-multilib"
|
2012-05-23 18:58:45 +00:00
|
|
|
fi
|
2010-02-23 22:56:13 +00:00
|
|
|
short_desc="Xen Hypervisor and Utilities"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
2011-07-07 22:22:30 +00:00
|
|
|
homepage="http://xen.org"
|
|
|
|
license="GPL-2"
|
2012-07-11 21:39:47 +00:00
|
|
|
distfiles="http://bits.xensource.com/oss-xen/release/$version/xen-$version.tar.gz"
|
2013-06-04 15:11:10 +00:00
|
|
|
checksum=c9bfe91a5e72f8545acebad9889d64368020359bfe18044c0e683133e55ae005
|
2010-02-23 22:56:13 +00:00
|
|
|
long_desc="
|
|
|
|
This package provides the official Xen Hypervisor and related utilities
|
|
|
|
for starting/stopping/accessing unprivileged domains (domUs)."
|
|
|
|
|
2013-06-04 15:11:10 +00:00
|
|
|
do_configure() {
|
|
|
|
unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
|
|
|
|
./configure --prefix=/usr
|
|
|
|
}
|
2010-02-23 22:56:13 +00:00
|
|
|
|
2012-01-31 10:07:58 +00:00
|
|
|
do_build() {
|
2010-02-23 22:56:13 +00:00
|
|
|
install -d ${DESTDIR}
|
2013-06-04 15:11:10 +00:00
|
|
|
cd ${DESTDIR}
|
|
|
|
ln -sf . install
|
2011-11-08 10:56:17 +00:00
|
|
|
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
2011-01-10 13:35:11 +00:00
|
|
|
install -d ${DESTDIR}/usr/lib
|
2013-06-04 15:11:10 +00:00
|
|
|
cd ${DESTDIR}/usr
|
|
|
|
ln -sf lib lib64
|
|
|
|
cd ${wrksrc}
|
2011-01-10 13:35:11 +00:00
|
|
|
fi
|
2013-06-04 15:11:10 +00:00
|
|
|
unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
|
|
|
|
make ${makejobs} DISTDIR=${DESTDIR}
|
2011-01-10 11:03:00 +00:00
|
|
|
}
|
2010-02-23 22:56:13 +00:00
|
|
|
|
2012-01-31 10:07:58 +00:00
|
|
|
do_install() {
|
2011-11-08 10:56:17 +00:00
|
|
|
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
2010-02-23 22:56:13 +00:00
|
|
|
install -d ${DESTDIR}/usr/lib
|
2013-06-04 15:11:10 +00:00
|
|
|
cd ${DESTDIR}/usr
|
|
|
|
ln -sf lib lib64
|
|
|
|
cd ${wrksrc}
|
2010-02-23 22:56:13 +00:00
|
|
|
fi
|
2013-06-04 15:11:10 +00:00
|
|
|
unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
|
2011-01-10 11:03:00 +00:00
|
|
|
make DESTDIR=${DESTDIR} install-xen install-tools
|
2011-07-11 17:57:23 +00:00
|
|
|
|
|
|
|
# Move example config files into correct directory.
|
|
|
|
vmkdir usr/share/examples/xen
|
2013-06-04 15:11:10 +00:00
|
|
|
mv ${DESTDIR}/etc/xen/x*example* ${DESTDIR}/usr/share/examples/xen
|
2011-07-11 17:57:23 +00:00
|
|
|
mv ${DESTDIR}/etc/xen/cpupool ${DESTDIR}/usr/share/examples/xen
|
2013-06-04 15:11:10 +00:00
|
|
|
|
2013-06-04 15:32:55 +00:00
|
|
|
mv ${DESTDIR}/etc/init.d/xendomains ${DESTDIR}/etc/xen/scripts
|
|
|
|
|
2013-06-04 15:11:10 +00:00
|
|
|
# Remove useless stuff.
|
|
|
|
rm -rf ${DESTDIR}/etc/init.d ${DESTDIR}/usr/local
|
|
|
|
rm -f ${DESTDIR}/install.sh ${DESTDIR}/usr/lib64
|
|
|
|
rm -rf ${DESTDIR}/usr/bin/qemu-*-xen
|
|
|
|
rm -rf ${DESTDIR}/usr/share/qemu-xen
|
|
|
|
rm -f ${DESTDIR}/boot/xen{,-4,-4.2}.gz
|
|
|
|
rm -f ${DESTDIR}/usr/sbin/xen-python-path
|
|
|
|
|
|
|
|
# Move bash-completion to the correct dir.
|
|
|
|
vmkdir usr/share/bash-completion/completions
|
|
|
|
mv ${DESTDIR}/etc/bash_completion.d/* \
|
|
|
|
${DESTDIR}/usr/share/bash-completion/completions
|
|
|
|
|
|
|
|
# Install systemd services.
|
|
|
|
vmkdir usr/lib/systemd/system
|
|
|
|
install -m644 ${FILESDIR}/*.{mount,service} ${DESTDIR}/usr/lib/systemd/system
|
|
|
|
vmkdir usr/lib/modules-load.d
|
|
|
|
install -m644 ${FILESDIR}/xen.conf ${DESTDIR}/usr/lib/modules-load.d
|
|
|
|
install -Dm644 ${FILESDIR}/tmpfiles.d-xen.conf \
|
|
|
|
${DESTDIR}/usr/lib/tmpfiles.d/xen.conf
|
|
|
|
|
|
|
|
# Move bins to /usr/bin.
|
|
|
|
mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin/
|
2010-02-23 22:56:13 +00:00
|
|
|
}
|
2013-04-14 16:42:25 +00:00
|
|
|
|
|
|
|
xen-devel_package() {
|
2013-06-04 15:11:10 +00:00
|
|
|
short_desc="Xen development files"
|
2013-04-14 16:42:25 +00:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/include
|
2013-06-04 15:11:10 +00:00
|
|
|
vmove "usr/lib/*.a"
|
2013-04-14 16:42:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
xen_package() {
|
|
|
|
make_dirs="
|
|
|
|
/var/run/xenstored 755 root root
|
|
|
|
/var/lib/xenstored 755 root root
|
|
|
|
/var/lib/xen/xenpaging 755 root root
|
|
|
|
/var/xen/dump 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"
|
2013-06-04 15:11:10 +00:00
|
|
|
nostrip_files="
|
|
|
|
openbios-ppc
|
|
|
|
openbios-sparc32
|
|
|
|
openbios-sparc64
|
|
|
|
palcode-clipper
|
|
|
|
xen-syms-${version}"
|
2013-04-14 16:42:25 +00:00
|
|
|
pycompile_module="xen grub"
|
|
|
|
depends="iproute2 bridge-utils"
|
|
|
|
pkg_install() {
|
2013-06-04 15:11:10 +00:00
|
|
|
vmove all
|
2013-04-14 16:42:25 +00:00
|
|
|
}
|
|
|
|
}
|