commit 5dab505f6af5264ecb9b69f74bcf7f8e3f32ca73 Author: EnumDev Date: Wed Oct 1 18:19:27 2025 +0300 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3e58e5f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Exclude bpm archives +*.bpm \ No newline at end of file diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..160e654 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +URL="https://download.qemu.org/" + +# Get version number from FTP server +VERSION=$(curl -s -L "$URL" | grep -o 'qemu-.*.tar.xz' | grep -o -E '[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}' | sort -V | tail -n1) + +echo "$VERSION" diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..a12bf85 --- /dev/null +++ b/pkg.info @@ -0,0 +1,60 @@ +name: qemu +description: A generic and open source machine emulator and virtualizer +version: 10.1.0 +revision: 1 +url: https://www.qemu.org/ +license: GPL2-only,LGPL2.1-only +architecture: any +type: source +depends: + - alsa-lib + - bzip2 + - curl + - dtc + - fuse3 + - gcc-libs + - glib + - glibc + - glusterfs + - gnutls + - hicolor-icon-theme + - jack + - keyutils + - libaio + - libcap + - libcbor + - libelf + - libepoxy + - libiscsi + - libjpeg-turbo + - libpng + - libpulse + - libseccomp + - libssh2 + - liburing + - lzo + - mesa + - pam + - pipewire + - pixman + - sdl2-compat + - sdl2-image + - spice + - vte + - zlib + - zstd +make_depends: + - libxkbcommon + - libxml2 + - meson + - ncurses + - pam + - pcre2 + - python3 + - python-setuptools + - spice-protocol +downloads: + - url: https://download.qemu.org/qemu-${BPM_PKG_VERSION}.tar.xz + extract_to_bpm_source: true + extract_strip_components: 1 + checksum: e0517349b50ca73ebec2fa85b06050d5c463ca65c738833bd8fc1f15f180be51 diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..df339c5 --- /dev/null +++ b/source.sh @@ -0,0 +1,44 @@ +# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package +# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE +# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT + +# The prepare function is executed in the root of the temp directory +# This function is used for putting downloaded files to the correct location or applying patches +prepare() { + echo "You may remove this function if you do not intend to use it" +} + +# The build function is executed in the source directory +# This function is used to compile the source code +build() { + mkdir build + cd build + + ../configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --audio-drv-list=alsa \ + --disable-user \ + --enable-attr \ + --enable-tcg \ + --enable-slirp \ + --enable-modules \ + --enable-sdl \ + --disable-slirp \ + --enable-tpm \ + --with-coroutine=ucontext + make +} + +# The package function is executed in the source directory +# This function is used to move the compiled files into the output directory +package() { + meson install -C build --destdir="$BPM_OUTPUT" + + # Fix permissions and ownership + chgrp kvm "$BPM_OUTPUT"/usr/libexec/qemu-bridge-helper + chmod 4750 "$BPM_OUTPUT"/usr/libexec/qemu-bridge-helper + + # Install package license + install -Dm644 "$BPM_SOURCE"/COPYING* -t "$BPM_OUTPUT"/usr/share/licenses/qemu/ +}