Created
December 9, 2013 02:09
-
-
Save dlintw/7866460 to your computer and use it in GitHub Desktop.
PKGBUILD.qemu-static 1.7.0-1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkgdesc="A generic and open source processor emulator which achieves a good emulation speed by using dynamic translation." | |
pkgname='qemu-static' | |
pkgver=1.7.0 | |
pkgrel=1 | |
arch=('i686' 'x86_64') | |
license=('GPL2' 'LGPL2.1') | |
url="http://wiki.qemu.org/Index.html" | |
source=(http://wiki.qemu.org/download/qemu-${pkgver}.tar.bz2) | |
depends=('qemu') | |
makedepends=('pixman' 'libjpeg' 'libpng' 'sdl' 'alsa-lib' 'nss' 'glib2' | |
'gnutls>=2.4.1' 'bluez-libs' 'vde2' 'util-linux' 'curl' 'libsasl' | |
'libgl' 'libpulse' 'seabios' 'libcap-ng' 'libaio' 'libseccomp' | |
'libiscsi' 'libcacard' 'spice' 'python2' | |
'glib2-static' 'pcre-static' 'glibc-static') | |
options=(!strip) | |
build() { | |
cd "${srcdir}/qemu-${pkgver}" | |
# qemu vs. make 4 == bad | |
export ARFLAGS="rv" | |
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ | |
--static --python=/usr/bin/python2 --disable-werror \ | |
--disable-docs --disable-gtk --disable-vnc --disable-kvm --disable-libssh2 \ | |
--enable-user --disable-system --disable-fdt | |
make V=99 | |
} | |
package() { | |
cd "${srcdir}/qemu-${pkgver}" | |
make DESTDIR="${pkgdir}" libexecdir="/usr/lib/qemu" install | |
# provided by seabios package | |
rm "${pkgdir}/usr/share/qemu/bios.bin" | |
rm "${pkgdir}/usr/share/qemu/acpi-dsdt.aml" | |
rm "${pkgdir}/usr/share/qemu/q35-acpi-dsdt.aml" | |
# 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 | |
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 | |
# remove libcacard files | |
rm -rf ${pkgdir}/usr/include/cacard | |
rm -rf ${pkgdir}/usr/lib/libcacard* | |
rm -rf ${pkgdir}/usr/lib/pkgconfig/libcacard.pc | |
rm -rf ${pkgdir}/usr/bin/vscclient | |
rm -rf ${pkgdir}/{etc,usr/{lib,share}} | |
cd ${pkgdir}/usr/bin/ | |
ls -1 | while read f; do | |
mv "$f" "$f-static" | |
done | |
} | |
md5sums=('32893941d40d052a5e649efcf06aca06') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment