diff options
-rw-r--r-- | PKGBUILD | 102 |
1 files changed, 49 insertions, 53 deletions
@@ -1,10 +1,8 @@ -# Maintainer: David Herrmann <dh.herrmann@gmail.com> - _pkgname=qemu-user-static pkgdesc='A generic and open source machine emulator, statically linked' -pkgver=3.1 -pkgrel=8 -_debrel='+dfsg-8' +pkgver=4.1 +pkgadditver=1+b4 +pkgrel=1 pkgname=$_pkgname-bin arch=('x86_64' 'i686' 'aarch64') @@ -15,22 +13,23 @@ makedepends=('perl') provides=("$_pkgname" "qemu-user") conflicts=("$_pkgname" "qemu-user") -if [ "$CARCH" = 'x86_64' ] ; then - _debsrc="${_pkgname}_${pkgver}${_debrel}_amd64.deb" - _csum=02578dafdffe8953a15ca62d3cc10e87bbf31294052061966c908a25bddbce46 -elif [ "$CARCH" = 'i686' ] ; then - _debsrc="${_pkgname}_${pkgver}${_debrel}_i386.deb" +_debsrc="${_pkgname}_${pkgver}-${pkgadditver}" +if [ "$CARCH" = 'x86_64' ]; then + _debsrc=$_debsrc"_amd64.deb" + _csum="2015a082c6cc474b258638ebd6877dad9f96667d0cd88440b47e7d30a34370a9" +elif [ "$CARCH" = 'i686' ]; then + _debsrc=$_debsrc"_i386.deb" _csum=SKIP -elif [ "$CARCH" = 'aarch64' ] ; then - _debsrc="${_pkgname}_${pkgver}${_debrel}_arm64.deb" +elif [ "$CARCH" = 'aarch64' ]; then + _debsrc=$_debsrc"_arm64.deb" _csum=SKIP else - _debsrc="${_pkgname}_${pkgver}${_debrel}_${CARCH}.deb" + _debsrc=$_debsrc"_$CARCH.deb" _csum=SKIP fi source=( - "qemu-user-static-${pkgver}${_debrel}_${CARCH}.deb::http://ftp.debian.org/debian/pool/main/q/qemu/${_debsrc}" + "$_debsrc::http://ftp.debian.org/debian/pool/main/q/qemu/$_debsrc" "qemu.binfmt" # http://src.fedoraproject.org/rpms/qemu/raw/master/f/qemu.binfmt ) sha256sums=( @@ -71,58 +70,55 @@ create_binfmts() { # Fedora configuration manually. for i in \ - aarch64 \ - alpha \ - armeb \ - arm \ - cris \ - i386 \ - i486 \ - m68k \ - microblazeel \ - microblaze \ - mips64el \ - mips64 \ - mipsel \ - mips \ - ppc64abi32 \ - ppc64le \ - ppc64 \ - ppc \ - s390x \ - sh4eb \ - sh4 \ - sparc32plus \ - sparc64 \ - sparc \ - x86_64 \ - ; do + aarch64 \ + alpha \ + armeb \ + arm \ + cris \ + i386 \ + i486 \ + m68k \ + microblazeel \ + microblaze \ + mips64el \ + mips64 \ + mipsel \ + mips \ + ppc64abi32 \ + ppc64le \ + ppc64 \ + ppc \ + s390x \ + sh4eb \ + sh4 \ + sparc32plus \ + sparc64 \ + sparc \ + x86_64; do # Skip emulator of target machine (and dependents) - if [ "$CARCH" = "$i" ] ; then + if [ "$CARCH" = "$i" ]; then continue - elif [ "$CARCH" = "x86_64" ] ; then - if [ "$i" = "i386" ] || \ - [ "$i" = "i486" ] || \ - [ "$i" = "x86_64" ] ; then + elif [ "$CARCH" = "x86_64" ]; then + if [ "$i" = "i386" ] || + [ "$i" = "i486" ] || + [ "$i" = "x86_64" ]; then continue fi - elif [ "$CARCH" = "i686" ] ; then - if [ "$i" = "i386" ] || \ - [ "$i" = "i486" ] ; then + elif [ "$CARCH" = "i686" ]; then + if [ "$i" = "i386" ] || + [ "$i" = "i486" ]; then continue fi fi CFG=$(grep "^:qemu-$i:" "${srcdir}/qemu.binfmt" | tr -d '\n') - if [ -z "$CFG" ] ; then - continue + if [ -z "$CFG" ]; then + continue fi echo -E -n "$CFG" >"usr/lib/binfmt.d/qemu-$i-static.conf" perl -i -p -e "s/bin\/qemu-([^:]+):\$/bin\/qemu-\1-static:F/" \ - "usr/lib/binfmt.d/qemu-$i-static.conf" + "usr/lib/binfmt.d/qemu-$i-static.conf" done } - -# vim:set sw=2 et: |