# Contributor: Ian Bashford # Maintainer: Ian Bashford pkgname=xe-guest-utilities pkgver=7.17.0 pkgrel=0 pkgdesc="XenServer guest tools" url="https://github.com/xenserver/xe-guest-utilities" arch="x86 x86_64 aarch64" license="BSD-2-Clause" makedepends="go udev" subpackages="$pkgname-udev:udev:noarch $pkgname-openrc" options="!check" source="$pkgname-$pkgver.tar.gz::https://github.com/xenserver/xe-guest-utilities/archive/v$pkgver.tar.gz $pkgname.initd detect_distribution.patch " build() { go get golang.org/x/sys/unix make } package() { mkdir -p "$pkgdir" cp -ar "$builddir/build/stage/usr/" "$pkgdir/" install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname } udev() { pkgdesc="udev rules for CPU hotplugging when running as Xen DomU" depends="udev" udev_dir="etc/udev/rules.d" mkdir -p "$subpkgdir/$udev_dir" filename="z10_xen-vcpu-hotplug.rules" install -m644 -D "$builddir/build/stage/$udev_dir/$filename" "$subpkgdir/$udev_dir/$filename" } sha512sums="fd5772cf7fb607edaf58bc92ae3d17a2ddf1de8465842c9ec83e97ab13a5c0c0d4c3efbb3381ebb8c584f2b30fcc1d328aed6b726eb870b29aa3fae8379e74ee xe-guest-utilities-7.17.0.tar.gz 3e898b473f6e71ecc5b820717df0a460b31756b68f4bb9bf454df39f430e64ca5e33582c03bfea044d93f49937883fe9b6807c31dee72307750de670bfca8bcd xe-guest-utilities.initd bcb9e25a285683f5136e025e765b8744eb6f6cc5ba7e5e6832a351bc5a0a647b627bdecda6fd22f0d9d624fdd503357f19904da794a988be8108421f57daa5a0 detect_distribution.patch"