desktop/qemu-kvm/PKGBUILD
2014-04-18 15:03:16 +00:00

70 lines
2.3 KiB
Bash

# Maintainer: UtG <utg[dot]chakra.linux[at]gmail[dot]com>
pkgname=qemu
_pkgname=kvm
pkgver=2.0.0
pkgrel=1
pkgdesc="Generic and open source processor emulator using dynamic translation to improve speed."
arch=('x86_64')
license=('GPL2' 'LGPL2.1')
url="http://wiki.qemu.org/Index.html"
depends=('alsa-lib' 'bluez' 'curl' 'gnutls>=2.4.1' 'libjpeg' 'libpng' 'libpulse' 'libsasl' 'sdl' 'util-linux-ng' 'vde2' 'pixman' 'libaio' 'libseccomp')
makedepends=('git' 'iasl' 'perl' 'python2' 'texi2html')
backup=('etc/qemu/target-x86_64.conf')
provides=("qemu-kvm=${pkver}")
conflicts=("qemu-kvm<${pkgver}")
replaces=("qemu-kvm<${pkgver}")
categories=('system')
options=(!strip)
install='qemu-kvm.install'
source=("http://wiki.qemu.org/download/${pkgname}-${pkgver}.tar.bz2"
"65-kvm.rules"
"qemu-glibc-2.18.patch")
md5sums=('2790f44fd76da5de5024b4aafeb594c2'
'6c511f3ea77bde6b1a790c246da79b75'
'8b94e8971f56405e52d3f9b62a86e65f')
build() {
cd $srcdir/$pkgname-$pkgver
patch -i ../qemu-glibc-2.18.patch -p1 || return 1
./configure --prefix=/usr --sysconfdir=/etc --audio-drv-list='pa alsa sdl'\
--python=/usr/bin/python2 --smbd=/usr/bin/smbd \
--libexecdir=/usr/lib/qemu \
--disable-gtk \
--enable-linux-aio --enable-seccomp \
--localstatedir=/var
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
chmod u+s "${pkgdir}/usr/lib/qemu/qemu-bridge-helper"
# add sample config
echo "allow br0" > ${pkgdir}/etc/qemu/bridge.conf.sample
# symbolic link for backwards compatibility
ln -s qemu-system-x86_64 "${pkgdir}/usr/bin/qemu-kvm"
# symbolic link for to qemu binary for emulator apps
ln -s qemu-system-x86_64 "${pkgdir}/usr/bin/qemu"
# symbolic link for to qemu binary for emulator apps
ln -s qemu-system-x86_64 "${pkgdir}/usr/bin/kvm"
# install udev rules
install -D -m644 "${srcdir}/65-kvm.rules" \
"${pkgdir}/usr/lib/udev/rules.d/65-kvm.rules"
# strip scripts directory
find "${pkgdir}/usr/bin" -type f -perm -u+w 2>/dev/null | while read binary ; do
case "$(file -bi "$binary")" in
*application/x-executable*) # Binaries
/usr/bin/strip $STRIP_BINARIES "$binary";;
esac
done
}