opt/qemu/Pkgfile

41 lines
1.5 KiB
Plaintext
Raw Normal View History

# Description: Fast CPU emulator and virtualizer for the x86 platform
2021-02-02 11:51:20 +01:00
# URL: https://www.qemu.org/
# Maintainer: Juergen Daubert, jue at crux dot nu
# Depends on: dtc glib libusb linux-pam xorg-libpixman
2023-09-16 18:35:36 +02:00
# Optional: alsa-lib fuse3 gnutls libaio libjpeg-turbo libpng libsdl2 libseccomp libslirp libssh liburing libxkbcommon nettle nfs-utils numactl pipewire pulseaudio python3-sphinx python3-sphinx_rtd_theme sdl2_image snappy xkeyboard-config xkeyboard-config
2021-02-02 11:51:20 +01:00
2009-03-08 09:43:24 +01:00
name=qemu
2024-03-05 11:30:49 +01:00
version=8.2.2
2023-09-22 15:24:56 +02:00
release=1
2023-10-17 17:59:38 +02:00
source=(https://download.qemu.org/$name-$version.tar.xz)
2009-03-08 09:43:24 +01:00
build() {
2020-09-02 13:49:51 +02:00
cd $name-$version
## only needed for qemu-keymap
if [[ ! -e /usr/include/xkbcommon/xkbcommon-x11.h ]] && ! prt-get isinst xkeyboard-config; then
printf '\e[1;31m%-6s\e[m\n' "You need to install xkeyboard-config, then rebuild libxkbcommon to build qemu-keymap. We are disabling this feature now."
PKGMK_QEMU+=' --disable-xkbcommon'
fi
prt-get isinst python3-sphinx python3-sphinx_rtd_theme || PKGMK_QEMU+=' --disable-docs'
2023-12-21 14:02:22 +01:00
./configure $PKGMK_QEMU \
2020-09-02 13:49:51 +02:00
--prefix=/usr \
--sysconfdir=/etc \
--libexecdir=/usr/lib/qemu \
--localstatedir=/var \
--enable-linux-user \
--enable-fdt=system \
2020-09-02 13:49:51 +02:00
--python=/usr/bin/python3 \
--target-list=x86_64-linux-user,i386-linux-user,i386-softmmu,x86_64-softmmu \
--disable-gtk \
2020-09-02 13:49:51 +02:00
make
make DESTDIR=$PKG install
2020-09-02 13:49:51 +02:00
install -d $PKG/etc/udev/rules.d/
echo 'KERNEL=="kvm", NAME="kvm", OWNER="root", GROUP="kvm", MODE="0660"' > \
$PKG/etc/udev/rules.d/60-kvm.rules
rm -r $PKG/var
2009-03-08 09:43:24 +01:00
}