commit aec615cdafda0ece136a64043e0668238f30877a Author: EnumDev Date: Wed Oct 1 16:58: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..0a91920 --- /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 -E 'osinfo-db-[0-9]{1,}.tar.xz' | grep -o -E '[0-9]{1,}' | sort -V | tail -n1) + +echo "$VERSION" diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..d7c8b30 --- /dev/null +++ b/pkg.info @@ -0,0 +1,16 @@ +name: osinfo-db +description: Default Package Description +version: "20250606" +revision: 1 +url: https://libosinfo.org/ +license: GPL2-or-later +architecture: any +output_architecture: any +type: source +depends: + - osinfo-db-tools +downloads: + - url: https://releases.pagure.org/libosinfo/osinfo-db-${BPM_PKG_VERSION}.tar.xz + extract_to_bpm_source: true + extract_strip_components: 1 + checksum: 9940aa47df298073c51dcf8a4dcc855f494ab864c24cdbda46bd897957357fe1 diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..834919d --- /dev/null +++ b/source.sh @@ -0,0 +1,12 @@ +# 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 package function is executed in the source directory +# This function is used to move the compiled files into the output directory +package() { + osinfo-db-import --root "$BPM_OUTPUT" --system "$BPM_WORKDIR"/osinfo-db-${BPM_PKG_VERSION}.tar.xz + + # Install package license + install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/osinfo-db/LICENSE +}