2010-02-23 23:56:13 +01:00
|
|
|
# Template file for 'xen'
|
|
|
|
pkgname=xen
|
2014-03-10 14:33:37 +01:00
|
|
|
version=4.4.0
|
2010-04-09 11:50:25 +02:00
|
|
|
wrksrc=xen-${version}
|
2014-08-04 21:21:59 +02:00
|
|
|
revision=3
|
2014-02-14 15:28:54 +01:00
|
|
|
short_desc="The Xen hypervisor utilities"
|
2010-02-23 23:56:13 +01:00
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
2011-07-08 00:22:30 +02:00
|
|
|
homepage="http://xen.org"
|
|
|
|
license="GPL-2"
|
2012-07-11 23:39:47 +02:00
|
|
|
distfiles="http://bits.xensource.com/oss-xen/release/$version/xen-$version.tar.gz"
|
2014-03-10 14:33:37 +01:00
|
|
|
checksum=6910a504fe2ffe8db0e7a44756ce1c4c95e1ccbef942a1fc8da27aced5aac021
|
2010-02-23 23:56:13 +01:00
|
|
|
|
2014-08-04 21:30:56 +02:00
|
|
|
only_for_archs="x86_64"
|
2013-06-07 09:14:38 +02:00
|
|
|
|
2014-08-04 21:21:59 +02:00
|
|
|
hostmakedepends="wget bison pkg-config git"
|
2014-03-10 14:33:37 +01:00
|
|
|
makedepends="
|
2014-08-04 21:21:59 +02:00
|
|
|
libaio-devel lzo-devel libressl-devel e2fsprogs-devel zlib-devel gnutls-devel>=3.1.5
|
2013-06-07 09:14:38 +02:00
|
|
|
libbluetooth-devel pciutils-devel libX11-devel libXext-devel SDL-devel MesaLib-devel
|
2014-08-04 21:21:59 +02:00
|
|
|
ncurses-devel liblzma-devel python-devel yajl-devel libuuid-devel libglib-devel
|
2014-08-04 21:30:56 +02:00
|
|
|
dev86 acpica-utils pixman-devel gcc-multilib"
|
2013-06-07 09:14:38 +02:00
|
|
|
|
2014-01-01 16:10:11 +01:00
|
|
|
depends="iproute2 bridge-utils xen-hypervisor"
|
|
|
|
|
|
|
|
make_dirs="
|
|
|
|
/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/xl.conf"
|
|
|
|
nostrip_files="
|
|
|
|
openbios-ppc
|
|
|
|
openbios-sparc32
|
|
|
|
openbios-sparc64
|
2014-03-10 14:33:37 +01:00
|
|
|
palcode-clipper
|
|
|
|
s390-ccw.img"
|
2014-01-01 16:10:11 +01:00
|
|
|
pycompile_module="xen grub"
|
|
|
|
|
2013-06-04 17:11:10 +02:00
|
|
|
do_configure() {
|
|
|
|
unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
|
2013-06-05 10:53:20 +02:00
|
|
|
./configure ${configure_args}
|
2013-06-04 17:11:10 +02:00
|
|
|
}
|
2010-02-23 23:56:13 +01:00
|
|
|
|
2012-01-31 11:07:58 +01:00
|
|
|
do_build() {
|
2011-11-08 11:56:17 +01:00
|
|
|
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
2011-01-10 14:35:11 +01:00
|
|
|
install -d ${DESTDIR}/usr/lib
|
2013-06-04 17:11:10 +02:00
|
|
|
cd ${DESTDIR}/usr
|
|
|
|
ln -sf lib lib64
|
2011-01-10 14:35:11 +01:00
|
|
|
fi
|
2013-06-05 17:08:04 +02:00
|
|
|
cd ${wrksrc}
|
2013-06-04 17:11:10 +02:00
|
|
|
unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
|
2013-06-07 09:14:38 +02:00
|
|
|
make ${makejobs} DISTDIR=${wrksrc}/${pkgver}-distdir
|
2011-01-10 12:03:00 +01:00
|
|
|
}
|
2010-02-23 23:56:13 +01:00
|
|
|
|
2012-01-31 11:07:58 +01:00
|
|
|
do_install() {
|
2011-11-08 11:56:17 +01:00
|
|
|
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
2010-02-23 23:56:13 +01:00
|
|
|
install -d ${DESTDIR}/usr/lib
|
2013-06-04 17:11:10 +02:00
|
|
|
cd ${DESTDIR}/usr
|
|
|
|
ln -sf lib lib64
|
|
|
|
cd ${wrksrc}
|
2010-02-23 23:56:13 +01:00
|
|
|
fi
|
2013-06-04 17:11:10 +02:00
|
|
|
unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
|
2013-06-05 10:53:20 +02:00
|
|
|
make DESTDIR=${DESTDIR} install
|
2011-07-11 19:57:23 +02:00
|
|
|
|
|
|
|
# Move example config files into correct directory.
|
|
|
|
vmkdir usr/share/examples/xen
|
2013-06-04 17:11:10 +02:00
|
|
|
mv ${DESTDIR}/etc/xen/x*example* ${DESTDIR}/usr/share/examples/xen
|
2011-07-11 19:57:23 +02:00
|
|
|
mv ${DESTDIR}/etc/xen/cpupool ${DESTDIR}/usr/share/examples/xen
|
2013-06-04 17:32:55 +02:00
|
|
|
mv ${DESTDIR}/etc/init.d/xendomains ${DESTDIR}/etc/xen/scripts
|
|
|
|
|
2013-06-04 17:11:10 +02: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
|
2013-07-09 14:35:07 +02:00
|
|
|
rm -f ${DESTDIR}/boot/xen{,-4,-4.3}.gz
|
2013-06-04 17:11:10 +02:00
|
|
|
rm -f ${DESTDIR}/usr/sbin/xen-python-path
|
2013-06-05 10:53:20 +02:00
|
|
|
rm -f ${DESTDIR}/{install,COPYING,README,usr/lib/lib}
|
|
|
|
rm -rf ${DESTDIR}/etc/udev
|
2013-07-09 19:20:51 +02:00
|
|
|
rm -f ${DESTDIR}//usr/libexec/qemu-bridge-helper
|
2013-11-16 11:59:27 +01:00
|
|
|
rm -rf ${DESTDIR}/usr/etc
|
2013-06-04 17:11:10 +02:00
|
|
|
|
|
|
|
# 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/
|
2013-06-07 09:14:38 +02:00
|
|
|
|
|
|
|
# Drop xen/xm stuff (obsolete).
|
|
|
|
rm -f ${DESTDIR}/usr/bin/{xm,xend}
|
|
|
|
rm -f ${DESTDIR}/etc/xen/*.{sxp,xml}
|
|
|
|
rm -f ${DESTDIR}/usr/share/man/man5/{xmdomain.cfg,xend-config.sxp}.5
|
|
|
|
rm -f ${DESTDIR}/usr/share/man/man1/xm.1
|
|
|
|
rm -f ${DESTDIR}/usr/share/doc/xen/html/man/xm.1.html
|
|
|
|
rm -f ${DESTDIR}/usr/share/doc/xen/html/man/{xmdomain.cfg,xend-config.sxp}.5.html
|
|
|
|
rm -f ${DESTDIR}/usr/share/examples/xen/xmexample*
|
2010-02-23 23:56:13 +01:00
|
|
|
}
|
2013-04-14 18:42:25 +02:00
|
|
|
|
2013-11-16 11:59:27 +01:00
|
|
|
xen-hypervisor_package() {
|
|
|
|
short_desc="Xen Hypervisor"
|
|
|
|
replaces="xen<4.3.1_2"
|
|
|
|
nostrip_files="xen-syms-${version}"
|
|
|
|
pkg_install() {
|
|
|
|
vmove boot
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-04-14 18:42:25 +02:00
|
|
|
xen-devel_package() {
|
2013-11-16 11:59:27 +01:00
|
|
|
short_desc+=" - development files"
|
|
|
|
depends="xen-libs>=${version}_${revision}"
|
2013-04-14 18:42:25 +02:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/include
|
2013-06-04 17:11:10 +02:00
|
|
|
vmove "usr/lib/*.a"
|
2013-11-16 11:59:27 +01:00
|
|
|
vmove "usr/lib/*.so"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
xen-libs_package() {
|
|
|
|
short_desc+=" - runtime libraries"
|
|
|
|
replaces="xen<4.3.1_2"
|
|
|
|
pkg_install() {
|
|
|
|
vmove "usr/lib/*.so.*"
|
2013-04-14 18:42:25 +02:00
|
|
|
}
|
|
|
|
}
|