[arch-commits] CVS update of extra/emulators/qemu (PKGBUILD)

Alexander Baldeck alexander at archlinux.org
Mon Jun 11 03:33:26 EDT 2007


    Date: Monday, June 11, 2007 @ 03:33:26
  Author: alexander
    Path: /home/cvs-extra/extra/emulators/qemu

Modified: PKGBUILD (1.4 -> 1.5)

added kvm support for x86_64


----------+
 PKGBUILD |   41 ++++++++++++++++++++++++++++++++---------
 1 file changed, 32 insertions(+), 9 deletions(-)


Index: extra/emulators/qemu/PKGBUILD
diff -u extra/emulators/qemu/PKGBUILD:1.4 extra/emulators/qemu/PKGBUILD:1.5
--- extra/emulators/qemu/PKGBUILD:1.4	Sun Feb 11 18:00:33 2007
+++ extra/emulators/qemu/PKGBUILD	Mon Jun 11 03:33:26 2007
@@ -1,30 +1,53 @@
-# $Id: PKGBUILD,v 1.4 2007/02/11 23:00:33 andyrtr Exp $
+# $Id: PKGBUILD,v 1.5 2007/06/11 07:33:26 alexander Exp $
 # Maintainer: Thomas Bächler <thomas at archlinux.org>
 pkgname=qemu
 pkgver=0.9.0
-pkgrel=1
+pkgrel=2
 pkgdesc="QEMU is a generic and open source processor emulator which achieves a good emulation speed by using dynamic translation."
 arch=(i686 x86_64)
+license=('GPL')
 url="http://fabrice.bellard.free.fr/qemu/"
 depends=('sdl' 'alsa-lib' 'zlib')
+[ ${CARCH} = "x86_64" ] && depends=(${depends[@]} 'kvm-modules')
 makedepends=('gcc3')
-source=(http://fabrice.bellard.free.fr/qemu/$pkgname-$pkgver.tar.gz \
-        70-kqemu.rules)
+source=(http://fabrice.bellard.free.fr/qemu/${pkgname}-${pkgver}.tar.gz \
+        70-kqemu.rules \
+        http://downloads.sourceforge.net/kvm/kvm-28.tar.gz)
 md5sums=('ab11a03ba30cf4a70641f0f170473d69' 'ec06591830b8fcf53913f05f3d66f7e5')
 
 build()
 {
-  cd $startdir/src/$pkgname-$pkgver
+  cd ${startdir}/src/${pkgname}-${pkgver}
   unset CFLAGS
 
-  if [ "$CARCH" = "x86_64" ]; then
+  if [ "${CARCH}" = "x86_64" ]; then
      # any "xxx-user" target seems to not build on x86_64
          ./configure --prefix=/usr --enable-alsa \
-                     --target-list="i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu arm-softmmu mips-softmmu"
+                     --target-list="i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu arm-softmmu mips-softmmu" \
     else ./configure --prefix=/usr --enable-alsa
   fi
 
   make || return 1
-  make DESTDIR=$startdir/pkg install || return 1
-  install -D -m644 $startdir/src/70-kqemu.rules $startdir/pkg/etc/udev/rules.d/70-kqemu.rules
+  make DESTDIR=${startdir}/pkg install || return 1
+  install -D -m644 ${startdir}/src/70-kqemu.rules \
+                   ${startdir}/pkg/etc/udev/rules.d/70-kqemu.rules
+
+  # we replace the regular $CHOST version with the kvm/qemu version on
+  # x86_64 only for now
+  if [ ${CARCH} = "x86_64" ]; then
+    rm ${startdir}/pkg/usr/bin/qemu-system-x86_64
+
+    cd ${startdir}/src/kvm-28
+    ./configure --prefix=/usr \
+                --qemu-cc=gcc-3.3
+
+    for dir in user qemu; do
+      cd ${startdir}/src/kvm-28/${dir}
+      make || return 1
+    done
+
+    install -m 755 ${startdir}/src/kvm-28/qemu/x86_64-softmmu/qemu-system-x86_64 \
+                   ${startdir}/pkg/usr/bin/qemu-system-x86_64
+
+  fi
 }




More information about the arch-commits mailing list