qemu-user: move extra binfmts to the relevant package

This commit is contained in:
classabbyamp 2025-06-14 17:45:02 -04:00
parent c35441a029
commit 04bb657872
No known key found for this signature in database
GPG key ID: 6BE0755918A4C7F5

View file

@ -73,8 +73,14 @@ for _arch in "${_archs[@]}"; do
subpackages+=" ${_pkgname}"
depends+=" ${_pkgname}>=${version}"
case "$_arch" in
i386)
_extra_binfmts="i486"
;;
esac
eval "${_pkgname}_package() {
_user_tmpl '$_arch'
_user_tmpl '$_arch' '$_extra_binfmts'
}"
done
@ -82,12 +88,15 @@ export PYTHONUNBUFFERED=1
_user_tmpl() {
_arch="$1"
_binfmt="$2"
_extra_binfmts="$2"
short_desc="QEMU ${_arch} user-mode emulator"
pkg_install() {
vmove "usr/bin/qemu-$_arch"
vmove "usr/bin/qemu-$_arch-static"
vmove "usr/share/binfmts/qemu-$_arch" || :
for bf in $_extra_binfmts; do
vmove "usr/share/binfmts/qemu-$bf" || :
done
}
}