# Description: QEMU guest agent
# URL: https://www.qemu.org/
# Maintainer: Matt Housh, jaeger at crux dot ninja
# Depends on: glib xorg-libpixman

name=qemu-guest-agent
version=8.0.2
release=1
source=(https://download.qemu.org/qemu-$version.tar.xz qemu-ga.conf $name.rc)

build() {
	cd qemu-$version
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--enable-guest-agent \
		--disable-docs
	make qemu-ga
	install -D -o root -g root -m 0755 build/qga/qemu-ga \
		$PKG/usr/bin/qemu-ga
	install -dm 0755 $PKG/etc/qemu
	install -m 0644 scripts/$name/fsfreeze-hook \
		$PKG/etc/qemu/
	install -m 0755 $SRC/qemu-ga.conf \
		$PKG/etc/qemu/
	install -Dm 0755 $SRC/$name.rc \
		$PKG/etc/rc.d/$name
}
