diff --git a/srcpkgs/xen-devel b/srcpkgs/xen-devel new file mode 120000 index 0000000000..90d3590441 --- /dev/null +++ b/srcpkgs/xen-devel @@ -0,0 +1 @@ +xen \ No newline at end of file diff --git a/srcpkgs/xen/files/xend.rc b/srcpkgs/xen/files/xend.rc new file mode 100644 index 0000000000..157af0ce0b --- /dev/null +++ b/srcpkgs/xen/files/xend.rc @@ -0,0 +1,34 @@ +#!/sbin/runscript +# +# Script for starting xend in dom0 kernels. +# +command=/usr/sbin/xend +pidfile=/var/run/xend.pid + +depend() +{ + need localmount +} + +start() +{ + modprobe -q xen-evtchn || eend $? "Failed to load xen-evtchn module!" + + if test -d /proc/xen && ! test -d /proc/xen/capabilities && \ + ! grep ' xenfs$' /proc/filesystems >/dev/null && \ + ! grep '^xenfs ' /proc/mounts >/dev/null; then + ebegin "Mounting xenfs for xend" + mount -t xenfs xenfs /proc/xen + eend $? + fi + ebegin "Starting xend" + ${command} start + eend $? +} + +stop() +{ + ebegin "Stopping xend" + ${command} stop + eend $? +} diff --git a/srcpkgs/xen/template b/srcpkgs/xen/template new file mode 100644 index 0000000000..6ae43229c4 --- /dev/null +++ b/srcpkgs/xen/template @@ -0,0 +1,83 @@ +# Template file for 'xen' +pkgname=xen +version=3.4.2 +distfiles="http://bits.xensource.com/oss-xen/release/$version/xen-$version.tar.gz" +build_style=gnu_makefile +make_build_target="DISTDIR=$XBPS_DESTDIR/$pkgname-$version xen tools" +make_install_target="install-xen install-tools" +short_desc="Xen Hypervisor and Utilities" +maintainer="Juan RP " +checksum=d17c33136041cc8da69214ccf527fc48637bee7a9ab4d68a88ec50e6a9d20b0b +long_desc=" + This package provides the official Xen Hypervisor and related utilities + for starting/stopping/accessing unprivileged domains (domUs)." + +nostrip=yes +subpackages="xen-devel" +openrc_services="xend default" + +conf_files=" +/etc/sysconfig/xendomains +/etc/xen/xmexample.pv-grub +/etc/xen/xm-config.xml +/etc/xen/xmexample.hvm +/etc/xen/xmexample1 +/etc/xen/xend-config.sxp +/etc/xen/qemu-ifup +/etc/xen/xmexample.hvm-stubdom +/etc/xen/xend-pci-quirks.sxp +/etc/xen/xmexample.vti +/etc/xen/xmexample.nbd +/etc/xen/xend-pci-permissive.sxp +/etc/xen/xmexample2" + +Add_dependency run glibc +Add_dependency run e2fsprogs-libs +Add_dependency run bzip2 +Add_dependency run xz +Add_dependency run zlib +Add_dependency run gnutls +Add_dependency run libbluetooth +Add_dependency run pciutils +Add_dependency run SDL +Add_dependency run libX11 +Add_dependency run libXext +Add_dependency run MesaLib +Add_dependency run ncurses-libs +Add_dependency run libgcrypt +Add_dependency full python +Add_dependency full iproute2 +Add_dependency build e2fsprogs-devel +Add_dependency build bzip2-devel +Add_dependency build xz-devel +Add_dependency build zlib-devel +Add_dependency build gnutls-devel +Add_dependency build libbluetooth-devel +Add_dependency build pciutils-devel +Add_dependency build SDL-devel +Add_dependency build libX11-devel +Add_dependency build libXext-devel +Add_dependency build MesaLib-devel +Add_dependency build ncurses-devel +Add_dependency build libgcrypt-devel +Add_dependency build dev86 + +pre_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 +} + +post_install() +{ + # Remove upstream xend and use our own. + rm -f ${DESTDIR}/etc/init.d/xend + install -m755 ${FILESDIR}/xend.rc ${DESTDIR}/etc/init.d/xend + # Remove unneeded stuff. + rm -f ${DESTDIR}/install ${DESTDIR}/usr/lib64 +} diff --git a/srcpkgs/xen/xen-devel.template b/srcpkgs/xen/xen-devel.template new file mode 100644 index 0000000000..068a927033 --- /dev/null +++ b/srcpkgs/xen/xen-devel.template @@ -0,0 +1,30 @@ +# Template file for 'xen-devel'. +# +short_desc="${sourcepkg} development files" +long_desc="${long_desc} + + This package contains files for development, headers, static libs, etc." + +Add_dependency run python-devel +Add_dependency run e2fsprogs-devel +Add_dependency run bzip2-devel +Add_dependency run xz-devel +Add_dependency run zlib-devel +Add_dependency run gnutls-devel +Add_dependency run libbluetooth-devel +Add_dependency run pciutils-devel +Add_dependency run SDL-devel +Add_dependency run libX11-devel +Add_dependency run libXext-devel +Add_dependency run MesaLib-devel +Add_dependency run ncurses-devel +Add_dependency run libgcrypt-devel +Add_dependency run xen + +do_install() +{ + mkdir -p ${DESTDIR}/usr/lib + mv ${SRCPKGDESTDIR}/usr/include ${DESTDIR}/usr + mv ${SRCPKGDESTDIR}/usr/lib/lib*.*a ${DESTDIR}/usr/lib + mv ${SRCPKGDESTDIR}/usr/lib/lib*.so ${DESTDIR}/usr/lib +} diff --git a/xbps-src/common/mapping_shlib_binpkg.txt b/xbps-src/common/mapping_shlib_binpkg.txt index b09799d9cf..1545f44426 100644 --- a/xbps-src/common/mapping_shlib_binpkg.txt +++ b/xbps-src/common/mapping_shlib_binpkg.txt @@ -437,3 +437,9 @@ libparted-2.1.so libparted libparted-devel libopenobex.so libopenobex libopenobex-devel libntfs-3g.so.73 ntfs-3g ntfs-3g-devel libruby.so.1 ruby ruby-devel +libfsimage.so.1 xen xen-devel +libxenctrl.so.3 xen xen-devel +libxenstore.so.3 xen xen-devel +libflask.so.1 xen xen-devel +libblktap.so.3 xen xen-devel +libxenguest.so.3 xen xen-devel