aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/qemu/APKBUILD34
1 files changed, 19 insertions, 15 deletions
diff --git a/main/qemu/APKBUILD b/main/qemu/APKBUILD
index 6824403bc4..66e379f190 100644
--- a/main/qemu/APKBUILD
+++ b/main/qemu/APKBUILD
@@ -101,8 +101,7 @@ _subsystems="
x86_64
"
for _sub in $_subsystems; do
- subpackages="$subpackages $pkgname-$_sub:${_sub//-/_}"
- eval "${_sub//-/_}() { _subsys $_sub; }"
+ subpackages="$subpackages $pkgname-$_sub:_subsys"
done
case "$CARCH" in
@@ -210,10 +209,13 @@ build() {
package() {
cd "$builddir"/build
+
make DESTDIR="$pkgdir" install || return 1
+ paxmark -m "$pkgdir"/usr/bin/qemu-system-* || return 1
+
install -Dm644 "$srcdir"/80-kvm.rules \
"$pkgdir"/lib/udev/rules.d/80-kvm.rules || return 1
- paxmark -m "$pkgdir"/usr/bin/qemu-system-* || return 1
+
gzip "$pkgdir"/usr/share/man/man1/*
gzip "$pkgdir"/usr/share/man/man8/*
@@ -230,12 +232,13 @@ package() {
}
_subsys() {
- pkgdesc="Qemu ${1/-/ } emulator"
+ local name=${1:-"${subpkgname#$pkgname-}"}
+ pkgdesc="Qemu ${name/-/ } emulator"
depends="qemu"
options=""
mkdir -p "$subpkgdir"/usr/bin
- mv "$pkgdir"/usr/bin/qemu-$1 "$subpkgdir"/usr/bin/ || return 1
+ mv "$pkgdir"/usr/bin/qemu-$name "$subpkgdir"/usr/bin/
}
img() {
@@ -246,19 +249,19 @@ img() {
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/qemu-img \
"$pkgdir"/usr/bin/qemu-io \
- "$subpkgdir"/usr/bin/
+ "$subpkgdir"/usr/bin/ || return 1
- # we exploit the fact that -img subpackage are created last
+ # We exploit the fact that -img subpackage are created last
# and check that we done have new systems that belongs in
- # subpackage
- local _bins= _ret=0
- for i in "$pkgdir"/usr/bin/qemu-system-*; do
- if [ -r "$i" ]; then
- error "Please create a subpackage for ${i##*/}"
- _ret=1
+ # subpackage.
+ local path= retval=0
+ for path in "$pkgdir"/usr/bin/qemu-system-*; do
+ if [ -r "$path" ]; then
+ error "Please create a subpackage for ${path##*/}"
+ retval=1
fi
done
- return $_ret
+ return $retval
}
guest() {
@@ -266,7 +269,8 @@ guest() {
options=""
mkdir -p "$subpkgdir"/usr/bin
- mv "$pkgdir"/usr/bin/qemu-ga "$subpkgdir"/usr/bin/
+ mv "$pkgdir"/usr/bin/qemu-ga "$subpkgdir"/usr/bin/ || return 1
+
install -Dm755 "$srcdir"/$pkgname-guest-agent.initd \
"$subpkgdir"/etc/init.d/$pkgname-guest-agent || return 1
install -Dm644 "$srcdir"/$pkgname-guest-agent.confd \