[arch-commits] CVS update of extra/modules/kvm-modules (PKGBUILD kvm-modules.install)

Alexander Baldeck alexander at archlinux.org
Mon Jun 11 07:28:45 UTC 2007


    Date: Monday, June 11, 2007 @ 03:28:45
  Author: alexander
    Path: /home/cvs-extra/extra/modules/kvm-modules

   Added: PKGBUILD (1.1) kvm-modules.install (1.1)

addpkg: kvm-modules (x86_64 only atm)


---------------------+
 PKGBUILD            |   38 ++++++++++++++++++++++++++++++++++++++
 kvm-modules.install |   24 ++++++++++++++++++++++++
 2 files changed, 62 insertions(+)


Index: extra/modules/kvm-modules/PKGBUILD
diff -u /dev/null extra/modules/kvm-modules/PKGBUILD:1.1
--- /dev/null	Mon Jun 11 03:28:45 2007
+++ extra/modules/kvm-modules/PKGBUILD	Mon Jun 11 03:28:45 2007
@@ -0,0 +1,38 @@
+# Contributor: Dario Bazzichetto <headhunter at tiscali.it>
+pkgname=kvm-modules
+pkgver=28
+pkgrel=1
+pkgdesc="KVM is a full virtualization solution for Linux on x86 hardware."
+url="http://kvm.qumranet.com/kvmwiki"
+license="GPL"
+arch=('i686' 'x86_64')
+depends=('sdl' 'zlib' 'alsa-lib' 'e2fsprogs')
+makedepends=('gcc3')
+_kver=2.6.21-ARCH
+install=kvm-modules.install
+source=(http://downloads.sourceforge.net/kvm/kvm-${pkgver}.tar.gz)
+
+build() {
+  cd ${startdir}/src/kvm-${pkgver}
+  # do not depmod while building
+  sed "s/\/sbin\/depmod -a//g" -i kernel/Makefile
+
+  ./configure --prefix=/usr \
+              --qemu-cc=gcc-3.3|| return 1
+
+  for dir in kernel user; do
+    cd ${startdir}/src/kvm-${pkgver}/${dir}
+    make || return 1
+    make DESTDIR=${startdir}/pkg install
+  done
+
+  mkdir -p ${startdir}/pkg/etc/udev/rules.d
+  cp ${startdir}/src/kvm-${pkgver}/scripts/65-kvm.rules ${startdir}/pkg/etc/udev/rules.d/65-kvm.rules
+
+  # do it the arch way (hopefully)
+  mv ${startdir}/pkg/lib/modules/${_kver}/extra \
+     ${startdir}/pkg/lib/modules/${_kver}/misc
+
+  mv ${startdir}/pkg/usr/lib64 \
+     ${startdir}/pkg/usr/lib
+}
Index: extra/modules/kvm-modules/kvm-modules.install
diff -u /dev/null extra/modules/kvm-modules/kvm-modules.install:1.1
--- /dev/null	Mon Jun 11 03:28:45 2007
+++ extra/modules/kvm-modules/kvm-modules.install	Mon Jun 11 03:28:45 2007
@@ -0,0 +1,24 @@
+# kvm:  the new package version
+post_install() {
+  #
+  groupadd kvm
+  echo ">>> PLEASE READ FOR KVM USAGE!"
+  echo ">>>  Remember to either modprobe kvm-intel or kvm-amd and"
+  echo ">>>  add yourself to the group kvm."
+  #
+  depmod -a
+  /bin/true
+}
+
+post_remove() {
+  #
+  groupdel kvm
+  #
+  depmod -a
+  #
+  /bin/true
+}
+
+op=$1
+shift
+$op $*




More information about the arch-commits mailing list