aboutsummaryrefslogtreecommitdiffstats
path: root/main/qemu
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-12-28 14:11:07 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-12-28 14:11:07 +0000
commita84c5b90f6eb90d50ae51058886cac109071de5d (patch)
tree31a1fed6e617ab49e94d3d9d98b70f9d1ebc9470 /main/qemu
parent9010f45d39cb7eb566227bd5259a9bbc6436d5d1 (diff)
downloadaports-a84c5b90f6eb90d50ae51058886cac109071de5d.tar.bz2
aports-a84c5b90f6eb90d50ae51058886cac109071de5d.tar.xz
main/qemu: add udev rule, create kvm group, subpackage for qemu-img
Diffstat (limited to 'main/qemu')
-rw-r--r--main/qemu/80-kvm.rules1
-rw-r--r--main/qemu/APKBUILD19
-rw-r--r--main/qemu/qemu.pre-install4
3 files changed, 18 insertions, 6 deletions
diff --git a/main/qemu/80-kvm.rules b/main/qemu/80-kvm.rules
new file mode 100644
index 0000000000..e61b48ff32
--- /dev/null
+++ b/main/qemu/80-kvm.rules
@@ -0,0 +1 @@
+KERNEL=="kvm", GROUP="kvm", MODE="0666"
diff --git a/main/qemu/APKBUILD b/main/qemu/APKBUILD
index e1f694d5e4..7d4f56074b 100644
--- a/main/qemu/APKBUILD
+++ b/main/qemu/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=qemu
pkgver=0.13.0
-pkgrel=0
+pkgrel=1
pkgdesc="QEMU is a generic machine emulator and virtualizer"
url="http://www.nongnu.org/qemu/"
arch="x86 x86_64"
@@ -26,9 +26,10 @@ $pkgname-sh4eb
$pkgname-sparc
$pkgname-sparc64
$pkgname-x86_64
+$pkgname-img
"
source="http://savannah.nongnu.org/download/$pkgname/$pkgname-$pkgver.tar.gz
- kqemu.patch
+ 80-kvm.rules
"
prepare() {
@@ -42,7 +43,6 @@ prepare() {
Makefile Makefile.target tests/Makefile
sed -i 's/^VL_LDFLAGS=$/VL_LDFLAGS=-Wl,-z,execheap/' \
Makefile.target
-# patch -p1 -i ../kqemu.patch || return 1
}
build() {
@@ -61,6 +61,8 @@ build() {
package() {
cd "$srcdir"/$pkgname-$pkgver
make DESTDIR="$pkgdir" install || return 1
+ install -Dm644 "$srcdir"/80-kvm.rules \
+ "$pkgdir"/lib/udev/rules.d/80-kvm.rules
}
_subsys() {
@@ -87,5 +89,14 @@ sparc() { _subsys sparc; }
sparc64() { _subsys sparc64; }
x86_64() { _subsys x86_64; }
+img() {
+ pkgdesc="QEMU command line tool for manipulating disk images"
+ replaces="qemu"
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/qemu-img \
+ "$pkgdir"/usr/bin/qemu-io \
+ "$subpkgdir"/usr/bin/
+}
+
md5sums="397a0d665da8ba9d3b9583629f3d6421 qemu-0.13.0.tar.gz
-f63f7412f016d8ccddabfd02ea28e748 kqemu.patch"
+66660f143235201249dc0648b39b86ee 80-kvm.rules"
diff --git a/main/qemu/qemu.pre-install b/main/qemu/qemu.pre-install
index 0119bacbea..68d7043acc 100644
--- a/main/qemu/qemu.pre-install
+++ b/main/qemu/qemu.pre-install
@@ -1,6 +1,6 @@
#!/bin/sh
-if ! getent group | grep -q "^kvm:"; then
- addgroup kvm
+if ! getent group kvm >/dev/null; then
+ addgroup -g 34 -S kvm
fi