pmaports/cross/qemu-user-static-repack/APKBUILD
2017-12-14 20:35:36 +00:00

53 lines
1.3 KiB
Text

pkgname=qemu-user-static-repack
pkgver=2.8
_debver=${pkgver}+dfsg-6+deb9u3_amd64
pkgrel=10
pkgdesc="QEMU user mode emulation binaries (static version)"
arch=x86_64
url="https://wiki.debian.org/DebianKernel/ARMMP"
license="GPL2"
source="https://deb.debian.org/debian/pool/main/q/qemu/qemu-user-static_${_debver}.deb"
makedepends="tar xz"
subpackages="$pkgname-doc $pkgname-binfmt:binfmt:noarch"
options="!check"
unpack() {
cd "$srcdir"
for i in $source; do
case $i in
*.deb) ar x ${i##*/} ;;
esac
done
# postinst in this archive contains the binfmt information
tar -xf "$srcdir/control.tar.gz"
}
package() {
mkdir -p "$pkgdir"
tar -xJf "$srcdir"/data.tar.xz -C $pkgdir
return 0
}
_binfmtout="$srcdir/qemu-user-binfmt.txt"
build() {
cd "$srcdir"
for line in \
"# Non-standard file format with grepped binfmt information" \
"# from Debians postinst script. Used in pmbootstrap."
do
echo "$line" >> $_binfmtout
done
for suffix in mask magic; do
grep "_${suffix}=" postinst >> $_binfmtout
done
}
binfmt() {
mkdir -p "$pkgdir-binfmt"
install -Dm644 $_binfmtout \
"$pkgdir-binfmt/usr/share/qemu-user-binfmt.txt"
}
sha512sums="96ffac25444f7fd3275dfb5c00b73a033b4668572aac3448e77e8d87ca27698f9b32fc7d57f1b311ee8b0662a7d7cb39c716bbdb433e0bd798e7b6d2d8380c2a qemu-user-static_2.8+dfsg-6+deb9u3_amd64.deb"