diff options
author | Stefan Agner | 2019-01-11 14:52:47 +0100 |
---|---|---|
committer | Stefan Agner | 2019-01-11 14:52:47 +0100 |
commit | 50648423db30f0b02ccd4b72f0407e798ba11e8b (patch) | |
tree | fcb5de9a44184fc0bdb564cf9a4c0f34030fcdee /PKGBUILD | |
parent | 10f335944406fc7707b75c8e56a0f48027cba283 (diff) | |
download | aur-50648423db30f0b02ccd4b72f0407e798ba11e8b.tar.gz |
build Qemu user binaries statically from source
Change this package to build Qemu statically from source. According
to tioduke@gmail.com the old qemu-user-static has been merged with
qemu-user-static-bin.
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 95 |
1 files changed, 73 insertions, 22 deletions
@@ -1,33 +1,84 @@ -# Maintainer: Sergio Tridente <tioduke at gmail dot com > -# Contributor: Steven Noonan <steven@uplinklabs.net> +# Maintainer: Stefan Agner <stefan@agner.ch> pkgname=qemu-user-static -pkgver=3.1 -pkgrel=2 -pkgdesc="A generic and open source processor emulator which achieves a good emulation speed by using dynamic translation, statically linked." -arch=('i686' 'x86_64') -license=('GPL2' 'LGPL2.1') -url="http://wiki.qemu.org/Index.html" +pkgdesc="Static build of qemu with user emulation useful for containers/chroot" +pkgver=3.1.0 +pkgrel=1 +arch=(x86_64) +license=(GPL2 LGPL2.1) +url="http://wiki.qemu.org/" depends=() -optdepends=('binfmt-qemu-static: to allow handling foreign ELF binaries and executing them via qemu') -conflicts=() -_arch=amd64 -[ "$CARCH" = 'i686' ] && _arch=i386 -_debsrc=${pkgname}_${pkgver}+dfsg-2_${_arch}.deb -source=(http://ftp.debian.org/debian/pool/main/q/qemu/${_debsrc}) -sha1sums=('fa4b324de5539ba477beecdc0b5557b153763b12') -[ "$CARCH" = 'i686' ] && sha1sums=('3a3e3022b1e03858963128a734fcf725f1fae9a6') +makedepends=(python2 glib2-static pcre-static) +source=(https://download.qemu.org/qemu-$pkgver.tar.xz{,.sig}) +sha512sums=('7e8dae823937cfac2f0c60406bd3bdcb89df40313dab2a4bed327d5198f7fcc68ac8b31e44692caa09299cc71256ee0b8c17e4f49f78ada8043d424f5daf82fe' + 'SKIP') +validpgpkeys=('CEACC9E15534EBABB82D3FA03353C9CEF108B584') + +case $CARCH in + i?86) _corearch=i386 ;; + x86_64) _corearch=x86_64 ;; +esac prepare() { - cd "$srcdir" - ar p ${_debsrc} data.tar.xz | bsdtar xf - + mkdir build-user-static + + cd qemu-${pkgver} + sed -i 's/vte-2\.90/vte-2.91/g' configure } +build() ( + cd build-user-static + + ../qemu-${pkgver}/configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --libexecdir=/usr/lib/qemu \ + --enable-linux-user \ + --disable-debug-info \ + --disable-bsd-user \ + --disable-werror \ + --disable-system \ + --disable-tools \ + --disable-docs \ + --disable-gtk \ + --disable-gnutls \ + --disable-nettle \ + --disable-gcrypt \ + --disable-glusterfs \ + --disable-libnfs \ + --disable-libiscsi \ + --disable-vnc \ + --disable-kvm \ + --disable-libssh2 \ + --disable-libxml2 \ + --disable-vde \ + --disable-sdl \ + --disable-xen \ + --static + + make ARFLAGS="rc" +) + package() { + provides=(qemu-user-static) + options=(!strip) + + make -C build-user-static DESTDIR="$pkgdir" install "${@:2}" + + # remove conflicting /var/run directory cd "$pkgdir" - mkdir -p "$pkgdir"/usr/bin/ - mkdir -p "$pkgdir"/usr/share/man/ + rm -r var - cp "$srcdir"/usr/bin/* "$pkgdir"/usr/bin/ - cp "$srcdir"/usr/share/man/man1 "$pkgdir"/usr/share/man/ -r + # Remove BIOS files etc... + rm -r usr/share + + # Rename static qemu binaries + cd "${pkgdir}/usr/bin/" + tidy_strip + ls -1 | while read f; do + mv "$f" "$f-static" + done } + +# vim:set ts=2 sw=2 et: |