aboutsummaryrefslogtreecommitdiffstats
path: root/community/xe-guest-utilities/APKBUILD
blob: f6be1b8c982ceed05ce748c4ca2bb993cf31d225 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Contributor: Ian Bashford <ianbashford@gmail.com>
# Maintainer: Ian Bashford <ianbashford@gmail.com>
pkgname=xe-guest-utilities
pkgver=7.18.0
pkgrel=1
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() {
	depends=""
	pkgdesc="udev rules for CPU hotplugging when running as Xen DomU"
	install_if="$pkgname=$pkgver-r$pkgrel udev"

	mkdir -p "$subpkgdir"/usr/lib/udev/rules.d
	install -Dm644 "$builddir"/build/stage/etc/udev/rules.d/*.rules -t "$subpkgdir"/usr/lib/udev/rules.d
}

sha512sums="b0a58ab62d9f8a3e5cb23a545445f0ec1d2bcb25e4411bbcac2303ff46ec9f578c220b0453c354869bef388a6f99bea73ce217b20affcb407c0766f56d0c7e1d  xe-guest-utilities-7.18.0.tar.gz
3e898b473f6e71ecc5b820717df0a460b31756b68f4bb9bf454df39f430e64ca5e33582c03bfea044d93f49937883fe9b6807c31dee72307750de670bfca8bcd  xe-guest-utilities.initd
bcb9e25a285683f5136e025e765b8744eb6f6cc5ba7e5e6832a351bc5a0a647b627bdecda6fd22f0d9d624fdd503357f19904da794a988be8108421f57daa5a0  detect_distribution.patch"