summaryrefslogtreecommitdiff
path: root/kernels/xen/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'kernels/xen/PKGBUILD')
-rw-r--r--[-rwxr-xr-x]kernels/xen/PKGBUILD214
1 files changed, 116 insertions, 98 deletions
diff --git a/kernels/xen/PKGBUILD b/kernels/xen/PKGBUILD
index c51ffeaa9..33a2dccb1 100755..100644
--- a/kernels/xen/PKGBUILD
+++ b/kernels/xen/PKGBUILD
@@ -1,104 +1,122 @@
-# Maintainer M0Rf30
-# Contributor WaxyMouthfeel
-# Maintainer (Parabola): André Silva <andre.paulista@adinet.com.uy>
+# Maintainer: Limao Luo <luolimao+AUR@gmail.com>
+# Contributor: Luceo
+# Contributor: Revellion
+
pkgname=xen
-pkgver=4.1.2
-pkgrel=3.1
-pkgdesc="Xen 4 (hypervisor and tools)"
+pkgver=4.2.0
+pkgrel=12
+pkgdesc="Xen Hypervisor & Tools"
arch=(i686 x86_64)
-url="http://xen.org/"
-license="GPL"
-
-if [[ $CARCH == "x86_64" ]]; then
- depends=('xz' 'bzip2' 'iproute' 'net-tools' 'bridge-utils' 'python2' 'sdl' 'zlib' 'e2fsprogs' 'bin86' 'pkgconfig' 'gnutls' 'lzo2' 'lib32-glibc')
-else
- depends=('xz' 'bzip2' 'iproute' 'net-tools' 'bridge-utils' 'python2' 'sdl' 'zlib' 'e2fsprogs' 'bin86' 'pkgconfig' 'gnutls' 'lzo2' 'glibc')
-fi
-
-optdepends=('xen-docs: Xen Official Documentation')
-makedepends=('dev86' 'ocaml-findlib' 'iasl')
-conflicts=('xen4' 'xen3' 'xen-hv-tools' 'libxen4')
-provides=('xen')
-backup=('etc/xen/xend-config.sxp' 'etc/xen/xend-pci-permissive.sxp' 'etc/xen/xend-pci-quirks.sxp')
-options=(!strip)
-optional=(xen-docs)
-source=(http://bits.xensource.com/oss-xen/release/${pkgver}/xen-${pkgver}.tar.gz
- 09_xen
- xen.patch
- parabolainit.patch
- dom0_xz_decompression.patch
- 24341.patch
- 24344.patch
- 24345.patch)
+url=http://xen.org
+license=(GPL)
+depends=(bin86 bluez bridge-utils glib2 gnutls libaio libjpeg-turbo libpng lzo2 sdl wget vde2 yajl)
+[[ "$CARCH" == "x86_64" ]] && depends+=(lib32-glibc)
+makedepends=(dev86 git iasl markdown ocaml-findlib)
+optdepends=('xen-docs: Official Xen Documentation')
+conflicts=(xen-4.2{,-testing-hg} xen-{gdbsx,hg-unstable,rc})
+backup=(etc/$pkgname/xend-{config,pci-{permissive,quirks}}.sxp etc/modules-load.d/$pkgname.conf)
+options=(!buildflags !emptydirs !strip)
+install=$pkgname.install
+source=(http://bits.xensource.com/oss-xen/release/$pkgver/$pkgname-$pkgver.tar.gz
+ 09_xen
+ archinit.patch
+ texi2html.patch
+ proc-xen.mount
+ var-lib-xenstored.mount
+ xenconsoled.service
+ xendomains.service
+ xendomU@.service
+ xenstored.service
+ $pkgname.conf)
+sha256sums=('43f4a086e4e0330145a27b7ace8365c42b5afbc95cefadafe067be91bd3e5cfb'
+ 'e8dd740c0f18ea41bb80afad36ca981669e6ab86eb3848fbb40f0dff3b8aa3e6'
+ '35900d3ae2f2cc27834b8a7cb11f134b582f01bde033598c407c8e58ad58fdb9'
+ '08e5bf65c833a608470ad118ce369e32f9c267e1787f2900c06708af321225e6'
+ '139eed988bfaf8edc8ccdfd0b668382bd63db48ce17be91776182a7e28e9d88c'
+ 'c19146931c6ab8e53092bd9b2ebbfda5c76fd22ad3b1d42dcda3dd1b61f123ff'
+ 'ba8f1c10b3f3df1f9fda0782a691fed67661e36f49be74471c86850639fee3ba'
+ '0bd45d9de6456c4f9adf32e726f2db3a3cd0423c1d161b442e8a1666d2e68e3f'
+ '1862a14607582d14247b74435dfb16411fd68904aa19e2a93c5e6ac301169d3c'
+ '0a1960fd51a2f4e8e856c7392e33cc9607ac4a80e9d68b316b6a4281f34728e0'
+ '50a9b7fd19e8beb1dea09755f07318f36be0b7ec53d3c9e74f3266a63e682c0c')
+sha512sums=('4fb56c79d722fb307bc657f16d02079c6636427e7650c4354193632d38d2d1db8e588f844ff0ca6e757c108ed639a528565ec9fc7c00bb4d5b6fbc9d122d8a70'
+ '23402f54e1a40c058566d6c0f18ac2e89ea85eea8bedf669f059e30ad76b3b90d81b7ff34d8e8c07ab4fea7f82ae32c80a66df2fd95fb3b296e982cdcc93d0b6'
+ '9ce0c009f055c9be42435be9eeeec980285cbef4fb52cbd8d81f76ae1e7760575b5c9f958e3d44612d2740eafa1e18ee48f30a5571f0c06bd031d4e102abb22f'
+ '562f12e723116c705fc9d0fd4a2afd382a93465be7f616d1e20e87daf39c11029fbc57ec46e38d3ff61c482fdc9ac4df9e07600a77515867d9da6f0faf3da7f9'
+ '6afdf16e32bb837faf6333334f86855a746f1f46fee9673a4fddc62eecf41f9856bc34397807203c6f5071f0b1ce74532214084042154585c0d39514450db25c'
+ '00e340f4d3635e3850ca24baea1da08467523c17815feb74161e18397b607fef904db2165fd9bf4632a6e8a6e37aeddad4e56965e1c99b5213c98b3f9afc6aad'
+ '27d7289a8bf6e15bddcb360287001429205b57ee4d791b0337328879ffd76b8e375e3c1dd0de0ab57dd4bd1e2a2bc1748c44cc05b2528632a3e6af60f626de9d'
+ 'f00034f8b826b828659a0177f0a6454113c625e69a817dfe32e461767f6643e0288bfc2a22d23358504240df627af6e3b8f5ffa0077e241e590b33d3f252e74c'
+ '31fefc739f0f0e568df03dcf9aa02e0265ff4fbf77e7ae62d6a318fcc34e87a0ffd3fc4b84ff8c9cc95511e2e74b7b61e6b5471cd0b3cd47ee0da86b1ea90268'
+ '87aceb1c646e49940bfbc47da85d7e20c9436449b152c0842b357033f66aba68a590f1d56c4a3f437d093047a611f28fd67d381692d9b21a582e598ecf1a72a2'
+ 'ccaa2ff82e4203b11e5dec9aeccac2e165721d8067e0094603ecaa7a70b78c9eb9e2287a32687883d26b6ceae6f8d2ad7636ddf949eb658637b3ceaa6999711b')
build() {
-
-
- cd $srcdir/xen-${pkgver}
-
- patch -p1 -i ../xen.patch
- patch -p1 -i ../parabolainit.patch
- patch -p1 -i ../dom0_xz_decompression.patch
- patch -p1 -i ../24341.patch
- patch -p1 -i ../24344.patch
- patch -p1 -i ../24345.patch
-
-unset CFLAGS LDFLAGS
-
-make PYTHON=python2 DESTDIR=$pkgdir install-xen
-make PYTHON=python2 DESTDIR=$pkgdir install-tools
-#make PYTHON=python2 DESTDIR=$pkgdir install-stubdom
-
- sed -i 's#XENDOM_CONFIG=/etc/sysconfig/xendomains#XENDOM_CONFIG=/etc/conf.d/xendomains#' $pkgdir/etc/init.d/xendomains
- sed -i "s#touch /var/lock/subsys/xend#mkdir -p /var/lock/subsys\n touch /var/lock/subsys/xend#" $pkgdir/etc/init.d/xend
-
- [ -d $pkgdir/usr/lib64 ] && ( cd $pkgdir/usr && cp -R lib64/* lib/ && rm -R lib64 )
- ( cd $pkgdir/etc && mv init.d rc.d ) || return 1
- rm -f $pkgdir/usr/share/man/man1/qemu-img.1* \
- $pkgdir/usr/share/man/man1/qemu.1*
- # First experiment to generate grub2.cfg entry
- mkdir -p $pkgdir/etc/grub.d
- chmod +x $srcdir/09_xen
- cp $srcdir/09_xen $pkgdir/etc/grub.d
-
- ############ kill unwanted stuff ############
-
-# stubdom: newlib
-rm -rf $pkgdir/usr/*-xen-elf
-
-# hypervisor symlinks
-rm -rf $pkgdir/boot/xen-4.1.gz
-rm -rf $pkgdir/boot/xen-4.gz
-rm -rf $pkgdir/boot/xen.gz
-
-# silly doc dir fun
-rm -fr $pkgdir/usr/share/doc/xen
-rm -rf $pkgdir/usr/share/doc/qemu
-
-# Pointless helper
-rm -f $pkgdir/usr/sbin/xen-python-path
-
-# qemu stuff (unused or available from upstream)
-rm -rf $pkgdir/usr/share/xen/man
-rm -rf $pkgdir/usr/bin/qemu-*-xen
-for file in bios.bin openbios-sparc32 openbios-sparc64 ppc_rom.bin \
- pxe-e1000.bin pxe-ne2k_pci.bin pxe-pcnet.bin pxe-rtl8139.bin \
- vgabios.bin vgabios-cirrus.bin video.x openbios-ppc bamboo.dtb
-do
- rm -f $pkgdir/usr/share/xen/qemu/$file
-done
-
-# adhere to Static Library Packaging Guidelines
-rm -rf $pkgdir/usr/lib/*.a
-
-
+ cd "$srcdir"/$pkgname-$pkgver/
+
+ patch -Np1 -i ../archinit.patch
+ patch -Np1 -i ../texi2html.patch
+
+ ./autogen.sh
+ ./configure PYTHON=/usr/bin/python2
}
-md5sums=('73561faf3c1b5e36ec5c089b5db848ad'
- '8d50beba46ffd89a3b959176245b676e'
- 'f149bae1a6b420e49c51b9f3a74338a4'
- '7a1ed81ecc828037724bb3280058c9fc'
- '4aebccf16b578ed97aa8bab945011f35'
- '1b0c05a555bc99fc8416dd52b6c6ae95'
- 'b6225be5bec3fe462f9166f9fde9c347'
- 'd282946a2873a78b2b2c3944571eb2fe')
+package() {
+ cd "$srcdir"/$pkgname-$pkgver/
+
+ make PYTHON=python2 DESTDIR="$pkgdir" install-xen install-tools
+ # stubdom won't build with multiple makethreads
+ make -j1 PYTHON=python2 DESTDIR="$pkgdir" install-stubdom
+
+ cd ../
+ for f in ${source[@]}; do
+ [[ $f =~ .mount || $f =~ .service ]] && install -Dm644 $f "$pkgdir"/usr/lib/systemd/system/$f
+ done
+ install -Dm644 $pkgname.conf "$pkgdir"/etc/modules-load.d/$pkgname.conf
+ install -Dm755 09_xen "$pkgdir"/etc/grub.d/09_xen
+
+ cd "$pkgdir"
+ sed -i ':XENDOM_CONFIG=/etc/:s:sysconfig/xendomains:conf.d/xendomains:' etc/init.d/xendomains
+ sed -i 's:touch /var/lock/subsys/xend:mkdir -p /var/lock/subsys\n &:' etc/init.d/xend
+
+ if [[ -d usr/lib64 ]]; then
+ cd usr/
+ cp -r lib64/* lib/
+ rm -rf lib64
+ fi
+
+ mv etc/{init,rc}.d
+
+ mv usr/local/etc/qemu/ etc/
+ rm -rf usr/local/share/
+ mv etc/rc.d/xendomains etc/xen/scripts/xendomains
+
+ ##### Kill unwanted stuff #####
+ # stubdom: newlib
+ rm -rf usr/*-xen-elf
+
+ # hypervisor symlinks
+ rm -f boot/xen{,-4,-4.2}.gz
+
+ # silly doc dir fun
+ rm -rf usr/share/doc/xen
+ rm -rf usr/share/doc/qemu
+
+ # Pointless helper
+ rm -f usr/sbin/xen-python-path
+
+ # qemu stuff (unused or available from upstream)
+ rm -rf usr/share/xen/man
+ rm -rf usr/bin/qemu-*-xen
+ for file in bios.bin openbios-sparc32 openbios-sparc64 ppc_rom.bin \
+ pxe-e1000.bin pxe-ne2k_pci.bin pxe-pcnet.bin pxe-rtl8139.bin \
+ vgabios.bin vgabios-cirrus.bin video.x openbios-ppc bamboo.dtb; do
+ rm -f usr/share/xen/qemu/$file
+ done
+
+ # adhere to Static Library Packaging Guidelines
+ rm -rf usr/lib/*.a
+
+ # Fix errors from deprecated xend
+ rm etc/udev/rules.d/xend.rules
+}