desktop/qemu-kvm/PKGBUILD

80 lines
2.6 KiB
Bash
Raw Normal View History

2011-10-15 21:51:06 +08:00
#
# Apps Packages for Chakra, part of chakra-project.org
#
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves@gmail.com>
pkgname=qemu
2011-10-15 21:51:06 +08:00
_pkgname=kvm
pkgver=1.5.1
2012-03-12 02:24:48 +08:00
pkgrel=1
2011-10-15 21:51:06 +08:00
pkgdesc="Generic and open source processor emulator using dynamic translation to improve speed."
arch=('i686' 'x86_64')
license=('GPL2' 'LGPL2.1')
url="http://www.linux-kvm.org"
2012-03-12 02:24:48 +08:00
depends=('alsa-lib' 'bluez' 'curl' 'gnutls>=2.4.1' 'libjpeg' 'libpng' 'libpulse' 'libsasl' 'sdl' 'util-linux-ng' 'vde2')
makedepends=('git' 'iasl' 'perl' 'python2' 'texi2html')
2011-10-15 21:51:06 +08:00
backup=('etc/qemu/target-x86_64.conf')
provides=("qemu-kvm=${pkver}")
conflicts=("qemu-kvm<${pkgver}")
categories=('system')
2011-10-15 21:51:06 +08:00
options=(!strip)
install='qemu-kvm.install'
source=("http://wiki.qemu.org/download/${pkgname}-${pkgver}.tar.bz2"
2011-10-15 21:51:06 +08:00
"65-kvm.rules")
md5sums=('b56e73bdcfdb214d5c68e13111aca96f'
2011-10-15 21:51:06 +08:00
'b316a066d2f1bb57d8f5b7ea1d0d1caf')
build() {
cd $srcdir/$pkgname-$_pkgver
2011-10-15 21:51:06 +08:00
# TODO: we should enable seccomp, but we don't have libseccomp yet
# TODO: same goes for libaio
./configure --prefix=/usr --sysconfdir=/etc --audio-drv-list='pa alsa sdl'\
--python=/usr/bin/python2 --smbd=/usr/bin/smbd \
--enable-mixemu --libexecdir=/usr/lib/qemu \
--disable-gtk --disable-linux-aio --disable-seccomp
make
2012-03-12 02:24:48 +08:00
# Use latest seabios version
# https://bugs.archlinux.org/task/27616
cd "${srcdir}/"
git clone git://git.seabios.org/seabios.git
cd seabios
make clean
make
2011-10-15 21:51:06 +08:00
}
package() {
cd $srcdir/$pkgname-$_pkgver
cd "${srcdir}/${pkgname}-${_pkgver}"
2012-03-12 02:24:48 +08:00
make DESTDIR="${pkgdir}" install
2011-10-15 21:51:06 +08:00
2012-03-12 02:24:48 +08:00
# Use latest seabios version
# https://bugs.archlinux.org/task/27616
cp "${srcdir}/seabios/out/bios.bin" "${pkgdir}/usr/share/qemu/bios.bin"
2011-10-15 21:51:06 +08:00
chmod u+s "${pkgdir}/usr/lib/qemu/qemu-bridge-helper"
# add sample config
echo "allow br0" > ${pkgdir}/etc/qemu/bridge.conf.sample
2012-03-12 02:24:48 +08:00
# 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"
2012-03-12 02:24:48 +08:00
# install udev rules
install -D -m644 "${srcdir}/65-kvm.rules" \
"${pkgdir}/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
2011-10-15 21:51:06 +08:00
}