From 61ba9dd863ac7f9de47f79e5c009c9f034b37ced Mon Sep 17 00:00:00 2001 From: EnumDev Date: Sat, 4 Oct 2025 13:41:10 +0300 Subject: [PATCH] Initial commit --- .gitignore | 2 ++ check-version.sh | 8 ++++++++ pkg.info | 32 ++++++++++++++++++++++++++++++++ source.sh | 19 +++++++++++++++++++ 4 files changed, 61 insertions(+) create mode 100644 .gitignore create mode 100644 check-version.sh create mode 100644 pkg.info create mode 100644 source.sh 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..2cc9c40 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +URL="https://releases.pagure.org/virt-manager/" + +# Get version number from FTP server +VERSION=$(curl -s -L "$URL" | grep -o 'virt-manager-.*.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..c513b9c --- /dev/null +++ b/pkg.info @@ -0,0 +1,32 @@ +name: virt-manager +description: Desktop user interface for managing virtual machines through libvirt +version: 5.1.0 +revision: 1 +url: https://virt-manager.org/ +license: GPL2-only +architecture: any +type: source +depends: + - cpio + - gtk-update-icon-cache + - gtk-vnc + - gtksourceview4 + - libosinfo + - libvirt-glib + - libvirt-python + - python-pygobject + - python-requests + - libvirt-python + - python-pycairo + - spice-gtk + - vte +optional_depends: + - libayatana-appindicator +make_depends: + - meson + - python-docutils +downloads: + - url: https://releases.pagure.org/virt-manager/virt-manager-${BPM_PKG_VERSION}.tar.xz + extract_to_bpm_source: true + extract_strip_components: 1 + checksum: ccfc44b6c1c0be8398beb687c675d9ea4ca1c721dfb67bd639209a7b0dec11b1 diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..d288a49 --- /dev/null +++ b/source.sh @@ -0,0 +1,19 @@ +# 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 build function is executed in the source directory +# This function is used to compile the source code +build() { + meson setup build --prefix=/usr + meson compile -C build +} + +# 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" + + # Install package license + install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/virt-manager/COPYING +}