mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-02-03 21:47:15 +08:00
65 lines
2.2 KiB
Bash
65 lines
2.2 KiB
Bash
pkgname=qemu
|
|
_pkgname=kvm
|
|
pkgver=2.3.0
|
|
pkgrel=2
|
|
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' 'bluez-libs')
|
|
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")
|
|
md5sums=('2fab3ea4460de9b57192e5b8b311f221'
|
|
'6c511f3ea77bde6b1a790c246da79b75')
|
|
|
|
build() {
|
|
cd $srcdir/$pkgname-$pkgver
|
|
|
|
./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 \
|
|
--enable-bluez --enable-modules \
|
|
--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"
|
|
|
|
# remove conflicting /var/run directory
|
|
rm -r "${pkgdir}/var"
|
|
|
|
# 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
|
|
}
|