From 574f67ef682739779f40a87b3f0bc9b0c61aa611 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Wed, 1 Oct 2025 16:49:38 +0300 Subject: [PATCH] Initial commit --- .gitignore | 2 ++ check-version.sh | 8 ++++++++ pkg.info | 23 +++++++++++++++++++++++ source.sh | 19 +++++++++++++++++++ 4 files changed, 52 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..15669e0 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +URL="https://releases.pagure.org/libosinfo/" + +# Get version number from FTP server +VERSION=$(curl -s -L "$URL" | grep -o 'osinfo-db-tools-.*.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..20cb4f5 --- /dev/null +++ b/pkg.info @@ -0,0 +1,23 @@ +name: osinfo-db-tools +description: Tools for managing the osinfo database +version: 1.12.0 +revision: 1 +url: https://libosinfo.org/ +license: GPL2-or-later +architecture: any +type: source +depends: + - gcc-libs + - glib + - glibc + - json-glib + - libarchive + - libsoup + - libxml2 +make_depends: + - meson +downloads: + - url: https://releases.pagure.org/libosinfo/osinfo-db-tools-${BPM_PKG_VERSION}.tar.xz + extract_to_bpm_source: true + extract_strip_components: 1 + checksum: f3315f675d18770f25dea8ed04b20b8fc80efb00f60c37ee5e815f9c3776e7f3 diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..649a67a --- /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/osinfo-db-tools/COPYING +}