1 # Contributor: Bernhard Walle <bernhard.walle@gmx.de>
2 # Contributor: Frederic Bezies <fredbezies@gmail.com>
3 # Based on official Qemu-kvm PKGBUILD
8 pkgdesc="Qemu-KVM emulator - git version"
10 url="http://www.linux-kvm.org/page/Main_Page"
12 depends=('libjpeg' 'libpng' 'libsasl' 'curl' 'sdl' 'alsa-lib' 'nss' 'glib2' 'gnutls>=2.4.1' 'bluez' 'vde2' 'util-linux-ng' 'libpulse' 'spice')
13 makedepends=('git' 'texi2html' 'perl')
17 backup=(etc/qemu/target-x86_64.conf)
19 install='kvm-git.install'
20 source=('kvm-git.install'
23 md5sums=('6540bf1723d0571af45bc11ded95fb7e'
24 'b316a066d2f1bb57d8f5b7ea1d0d1caf')
25 _gitroot="git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git"
30 msg "Connecting to GIT server...."
32 if [ -d $_gitname ] ; then
33 cd $_gitname && git pull origin
34 msg "The local files are updated."
39 msg "GIT checkout done or server timeout"
40 msg "Starting make..."
42 rm -rf "$srcdir/$_gitname-build"
43 cp -r "$srcdir/$_gitname" "$srcdir/$_gitname-build"
44 cd "$srcdir/$_gitname-build"
46 ./configure --prefix=/usr --audio-drv-list=alsa,oss,sdl,pa \
47 --audio-card-list=ac97,sb16,es1370,adlib --enable-docs \
48 --extra-cflags=-D__EXPORTED__HEADERS__ --disable-werror --python=/usr/bin/python2
52 make DESTDIR=${pkgdir} install
53 # symbolic link for backwards compatibility
54 ln -s qemu-system-x86_64 ${pkgdir}/usr/bin/qemu-kvm
55 # symbolic link for to qemu binary for emulator apps
56 ln -s qemu-system-x86_64 ${pkgdir}/usr/bin/qemu
57 # symbolic link for to qemu binary for emulator apps
58 ln -s qemu-system-x86_64 ${pkgdir}/usr/bin/kvm
60 mv ${pkgdir}/usr/share/man/man1/qemu.1 \
61 ${pkgdir}/usr/share/man/man1/qemu-kvm.1
63 install -D -m644 ${srcdir}/65-kvm.rules \
64 ${pkgdir}/lib/udev/rules.d/65-kvm.rules
65 # strip scripts directory
66 find ${pkgdir}/usr/bin -type f -perm -u+w 2>/dev/null | while read binary ; do
67 case "$(file -bi "$binary")" in
68 *application/x-executable*) # Binaries
69 /usr/bin/strip $STRIP_BINARIES "$binary";;