summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-09-01 23:33:04 +0200
committerErich Eckner <git@eckner.net>2020-09-01 23:33:04 +0200
commit234dbe1098f32a00b6719e733e9f6f260e5084d8 (patch)
tree02f15564c70eed764420f7f7994a86178edd1ede
parenta41e0696a0dda58375fbc63744c8a9130e2b70ce (diff)
downloadarchlinuxewe-234dbe1098f32a00b6719e733e9f6f260e5084d8.tar.xz
qemu-user-static new
-rw-r--r--qemu-user-static/PKGBUILD103
1 files changed, 103 insertions, 0 deletions
diff --git a/qemu-user-static/PKGBUILD b/qemu-user-static/PKGBUILD
new file mode 100644
index 000000000..687cdfaaf
--- /dev/null
+++ b/qemu-user-static/PKGBUILD
@@ -0,0 +1,103 @@
+# Maintainer: Erich Eckner <arch at eckner dot net>
+# Contributor: crab2313 <crab2313@gmail.com>
+# Contributor: Stefan Agner <stefan@agner.ch>
+
+pkgname=qemu-user-static
+pkgdesc="Statically linked binaries of Qemu with user emulation. Useful for containers/chroot environment with binfmt."
+pkgver=5.1.0
+pkgrel=1
+arch=(x86_64)
+license=(GPL2 LGPL2.1)
+url="http://wiki.qemu.org/"
+depends=()
+makedepends=(python glib2-static pcre-static)
+source=(https://download.qemu.org/qemu-$pkgver.tar.xz{,.sig})
+sha512sums=('e213edb71d93d5167ddce7546220ecb7b52a7778586a4f476f65bd1e510c9cfc6d1876238a7b501d9cc3fd31cc2ae4b7fb9e753bc3f12cc17cd16dfce2a96ba3'
+ 'SKIP')
+validpgpkeys=('CEACC9E15534EBABB82D3FA03353C9CEF108B584')
+
+case $CARCH in
+ i?86) _corearch=i386 ;;
+ x86_64) _corearch=x86_64 ;;
+esac
+
+# If non empty, always run the configure script
+: "${FORCE_CONFIGURE:=1}"
+
+prepare() {
+ mkdir -p build-user-static
+
+ cd qemu-${pkgver}
+ #sed -i 's/vte-2\.90/vte-2.91/g' configure
+}
+
+_configure() {
+ ../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-libssh \
+ --disable-libxml2 \
+ --disable-vde \
+ --disable-sdl \
+ --disable-opengl \
+ --disable-xen \
+ --disable-fdt \
+ --disable-vhost-net \
+ --disable-vhost-crypto \
+ --disable-vhost-user \
+ --disable-vhost-vsock \
+ --disable-vhost-scsi \
+ --disable-tpm \
+ --disable-qom-cast-debug \
+ --disable-capstone \
+ --disable-zstd \
+ --disable-linux-io-uring \
+ --static
+}
+
+build() (
+ cd build-user-static
+ [[ ! $FORCE_CONFIGURE && -e ../qemu-${pkgver}/config.log ]] || _configure
+ 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"
+ rm -rf var
+
+ # Remove BIOS files etc...
+ rm -rf 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: