# NOTE: Waiting to upstream to aports until abuild gets -systemd subpkg support
pkgname=qemu-binfmt
pkgver=10.0.2
pkgrel=0
pkgdesc="QEMU binfmt configuration for user mode emulation"
arch="all"
url="https://www.qemu.org/"
license="GPL-3.0-or-later"
makedepends="python3"
source="https://download.qemu.org/qemu-$pkgver.tar.xz"
options="!check"  # no tests
builddir="$srcdir/qemu-$pkgver"

package() {
	mkdir -p "$pkgdir"/usr/lib/binfmt.d
	scripts/qemu-binfmt-conf.sh \
		--systemd ALL \
		--exportdir "$pkgdir"/usr/lib/binfmt.d \
		--qemu-path /usr/bin \
		--persistent yes \
		--preserve-argv0 yes
}
sha512sums="
7fda582c3845ea663aa5eda21bb38ebcfb6c25bccf8944ea6cdf8b5be6946b5a874b36674a7f5db3e325abb9cca0dd9bc0727837fdceb71a8c947d96169a9b20  qemu-10.0.2.tar.xz
"
