2 #Contributor WaxyMouthfeel
6 pkgdesc="Xen 4 (hypervisor and tools)"
10 depends=('xz-utils' 'bzip2' 'iproute' 'bridge-utils' 'python2' 'sdl' 'zlib' 'e2fsprogs' 'bin86' 'pkgconfig' 'gnutls' 'lzo2' 'glibc')
11 [ "$CARCH" == "x86_64" ] && depends=(${depends} 'lib32-glibc')
12 optdepends=('xen-docs: Xen Official Documentation')
13 makedepends=('dev86' 'ocaml-findlib' 'iasl')
14 conflicts=('xen4' 'xen3' 'xen-hv-tools' 'libxen4')
16 backup=('etc/xen/xend-config.sxp' 'etc/xen/xend-pci-permissive.sxp' 'etc/xen/xend-pci-quirks.sxp')
19 source=(http://bits.xensource.com/oss-xen/release/${pkgver}/xen-${pkgver}.tar.gz
23 dom0_xz_decompression.patch)
28 cd $srcdir/xen-${pkgver}
30 patch -p1 -i ../xen.patch
31 patch -p1 -i ../archinit.patch
32 patch -p1 -i ../dom0_xz_decompression.patch
36 make PYTHON=python2 DESTDIR=$pkgdir install-xen
37 make PYTHON=python2 DESTDIR=$pkgdir install-tools
38 #make PYTHON=python2 DESTDIR=$pkgdir install-stubdom
40 sed -i 's#XENDOM_CONFIG=/etc/sysconfig/xendomains#XENDOM_CONFIG=/etc/conf.d/xendomains#' $pkgdir/etc/init.d/xendomains
41 sed -i "s#touch /var/lock/subsys/xend#mkdir -p /var/lock/subsys\n touch /var/lock/subsys/xend#" $pkgdir/etc/init.d/xend
43 [ -d $pkgdir/usr/lib64 ] && ( cd $pkgdir/usr && cp -R lib64/* lib/ && rm -R lib64 )
44 ( cd $pkgdir/etc && mv init.d rc.d ) || return 1
45 rm -f $pkgdir/usr/share/man/man1/qemu-img.1* \
46 $pkgdir/usr/share/man/man1/qemu.1*
47 # First experiment to generate grub2.cfg entry
48 mkdir -p $pkgdir/etc/grub.d
49 chmod +x $srcdir/09_xen
50 cp $srcdir/09_xen $pkgdir/etc/grub.d
52 ############ kill unwanted stuff ############
55 rm -rf $pkgdir/usr/*-xen-elf
58 rm -rf $pkgdir/boot/xen-4.1.gz
59 rm -rf $pkgdir/boot/xen-4.gz
60 rm -rf $pkgdir/boot/xen.gz
63 rm -fr $pkgdir/usr/share/doc/xen
64 rm -rf $pkgdir/usr/share/doc/qemu
67 rm -f $pkgdir/usr/sbin/xen-python-path
69 # qemu stuff (unused or available from upstream)
70 rm -rf $pkgdir/usr/share/xen/man
71 rm -rf $pkgdir/usr/bin/qemu-*-xen
72 for file in bios.bin openbios-sparc32 openbios-sparc64 ppc_rom.bin \
73 pxe-e1000.bin pxe-ne2k_pci.bin pxe-pcnet.bin pxe-rtl8139.bin \
74 vgabios.bin vgabios-cirrus.bin video.x openbios-ppc bamboo.dtb
76 rm -f $pkgdir/usr/share/xen/qemu/$file
79 # adhere to Static Library Packaging Guidelines
80 rm -rf $pkgdir/usr/lib/*.a
85 md5sums=('73561faf3c1b5e36ec5c089b5db848ad'
86 '1eb1de5675e4499018a37c3a5de973fe'
87 'f149bae1a6b420e49c51b9f3a74338a4'
88 '7a1ed81ecc828037724bb3280058c9fc'
89 '4aebccf16b578ed97aa8bab945011f35')