pkgname='qemu' pkgver=2.4.1 pkgrel=3 arch=('i686' 'x86_64' 'armv7h') license=('GPL2' 'LGPL2.1') url="http://wiki.qemu.org/Index.html" pkgdesc="A generic and open source processor emulator which achieves a good emulation speed by using dynamic translation." makedepends=('perl' 'python2' 'glibc' 'glib2' 'pcre' 'gtk2' 'mesa-libgl') options=(!strip) source=(http://wiki.qemu.org/download/qemu-${pkgver}.tar.bz2) md5sums=('a895e93ec1dafc34bc64ed676f0d55a6') build() { cd "${srcdir}/qemu-${pkgver}" export LDFLAGS="-L/usr/lib" ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --python=/usr/bin/python2 --disable-werror \ --disable-docs --enable-user \ --disable-libnfs --disable-libiscsi make -j4 } package() { cd "${srcdir}/qemu-${pkgver}" make DESTDIR="${pkgdir}" libexecdir="/usr/lib/qemu" install # remove conflicting /var/run directory rm -r "${pkgdir}/var" # bridge_helper needs suid # https://bugs.archlinux.org/task/32565 chmod u+s "${pkgdir}/usr/lib/qemu/qemu-bridge-helper" # add sample config mkdir -p $pkgdir/etc/qemu echo "allow br0" > ${pkgdir}/etc/qemu/bridge.conf.sample # strip scripts directory find "${pkgdir}/usr/src/linux-${_kernver}/scripts" -type f -perm -u+w 2>/dev/null | while read binary ; do case "$(file -bi "$binary")" in *application/x-executable*) # Binaries /usr/bin/strip $STRIP_BINARIES "$binary";; esac done }