aboutsummaryrefslogtreecommitdiffstats
path: root/main/qemu
diff options
context:
space:
mode:
Diffstat (limited to 'main/qemu')
-rw-r--r--main/qemu/APKBUILD47
1 files changed, 21 insertions, 26 deletions
diff --git a/main/qemu/APKBUILD b/main/qemu/APKBUILD
index 99d2ed7166..9890dfce74 100644
--- a/main/qemu/APKBUILD
+++ b/main/qemu/APKBUILD
@@ -135,6 +135,7 @@ source="http://wiki.qemu-project.org/download/$pkgname-$pkgver.tar.bz2
80-kvm.rules
bridge.conf
"
+builddir="$srcdir/$pkgname-$pkgver"
# secfixes:
# 2.8.1-r1:
@@ -164,16 +165,14 @@ source="http://wiki.qemu-project.org/download/$pkgname-$pkgver.tar.bz2
# - CVE-2017-5898
# - CVE-2017-5931
-builddir="$srcdir"/$pkgname-$pkgver
prepare() {
- default_prepare || return 1 # apply patches
+ default_prepare # apply patches
sed -i 's/^VL_LDFLAGS=$/VL_LDFLAGS=-Wl,-z,execheap/' \
Makefile.target
}
-
_compile_common() {
"$builddir"/configure \
--prefix=/usr \
@@ -187,9 +186,8 @@ _compile_common() {
--disable-sdl \
--disable-xen \
--cc="${CC:-gcc}" \
- "$@" \
- || return 1
- make ARFLAGS="rc" || return 1
+ "$@"
+ make ARFLAGS="rc"
}
_compile_system() {
@@ -224,8 +222,7 @@ build() {
_compile_common \
--enable-linux-user \
--disable-system \
- --static \
- || return 1
+ --static
cd "$builddir"/build
_compile_system \
@@ -234,14 +231,13 @@ build() {
--enable-vnc-jpeg \
--enable-spice \
--enable-guest-agent \
- --disable-gtk \
- || return 1
+ --disable-gtk
# tests fails on x86
# http://lists.gnu.org/archive/html/qemu-devel/2012-11/msg01429.html
# http://web.archiveorange.com/archive/v/21oVv8wOfpQGkyy8EK0N
-# make check || return 1
+# make check
if [ -n "$_arch" ]; then
cd "$builddir"/build-gtk
@@ -251,34 +247,33 @@ build() {
--disable-vnc \
--disable-spice \
--disable-guest-agent \
- --target-list="$_arch-softmmu" \
- || return 1
+ --target-list="$_arch-softmmu"
fi
}
package() {
cd "$builddir"/build-user
- make DESTDIR="$pkgdir" install || return 1
+ make DESTDIR="$pkgdir" install
cd "$builddir"/build
- make DESTDIR="$pkgdir" install || return 1
- paxmark -m "$pkgdir"/usr/bin/qemu-system-* || return 1
+ make DESTDIR="$pkgdir" install
+ paxmark -m "$pkgdir"/usr/bin/qemu-system-*
install -Dm640 -g qemu "$srcdir"/bridge.conf \
- "$pkgdir"/etc/qemu/bridge.conf || return 1
+ "$pkgdir"/etc/qemu/bridge.conf
install -Dm644 "$srcdir"/80-kvm.rules \
- "$pkgdir"/lib/udev/rules.d/80-kvm.rules || return 1
+ "$pkgdir"/lib/udev/rules.d/80-kvm.rules
# qemu-bridge-helper needs suid to create tunX devices;
# allow only users in the qemu group to run it.
- chmod 04710 "$pkgdir"/usr/lib/qemu/qemu-bridge-helper || return 1
- chgrp qemu "$pkgdir"/usr/lib/qemu/qemu-bridge-helper || return 1
+ chmod 04710 "$pkgdir"/usr/lib/qemu/qemu-bridge-helper
+ chgrp qemu "$pkgdir"/usr/lib/qemu/qemu-bridge-helper
if [ -n "$_arch" ]; then
cd "$builddir"/build-gtk
install $_arch-softmmu/qemu-system-$_arch \
- "$pkgdir"/usr/bin/qemu-system-$_arch-gtk || return 1
+ "$pkgdir"/usr/bin/qemu-system-$_arch-gtk
fi
# Do not install HTML docs.
@@ -291,7 +286,7 @@ _subsys() {
options=""
depends=""
case "$name" in
- system*) depends="qemu";;
+ system*) depends="qemu";;
esac
mkdir -p "$subpkgdir"/usr/bin
@@ -307,7 +302,7 @@ img() {
mv "$pkgdir"/usr/bin/qemu-img \
"$pkgdir"/usr/bin/qemu-io \
"$pkgdir"/usr/bin/qemu-nbd \
- "$subpkgdir"/usr/bin/ || return 1
+ "$subpkgdir"/usr/bin/
# We exploit the fact that -img subpackage are created last
# and check that we done have new systems that belongs in
@@ -328,12 +323,12 @@ guest() {
options=""
mkdir -p "$subpkgdir"/usr/bin
- mv "$pkgdir"/usr/bin/qemu-ga "$subpkgdir"/usr/bin/ || return 1
+ mv "$pkgdir"/usr/bin/qemu-ga "$subpkgdir"/usr/bin/
install -Dm755 "$srcdir"/$pkgname-guest-agent.initd \
- "$subpkgdir"/etc/init.d/$pkgname-guest-agent || return 1
+ "$subpkgdir"/etc/init.d/$pkgname-guest-agent
install -Dm644 "$srcdir"/$pkgname-guest-agent.confd \
- "$subpkgdir"/etc/conf.d/$pkgname-guest-agent || return 1
+ "$subpkgdir"/etc/conf.d/$pkgname-guest-agent
}
sha512sums="4b28966eec0ca44681e35fcfb64a4eaef7c280b8d65c91d03f2efa37f76278fd8c1680e5798c7a30dbfcc8f3c05f4a803f48b8a2dfec3a4181bac079b2a5e422 qemu-2.9.0.tar.bz2