commit 746d4f45629ab0b33113e6079880e05860c77b20 Author: EnumDev Date: Wed Oct 1 13:42:04 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..f112d61 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +URL="https://download.savannah.nongnu.org/releases/dmidecode/" + +# Get version number from tag name +VERSION=$(curl --silent "$URL" | grep -o -E 'dmidecode-[0-9]{1,}\.[0-9]{1,}.tar.xz' | grep -o -E '[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..8f0ffae --- /dev/null +++ b/pkg.info @@ -0,0 +1,15 @@ +name: dmidecode +description: Reports information about your system's hardware as described in your system BIOS according to the SMBIOS/DMI standard +version: "3.6" +revision: 1 +url: https://www.nongnu.org/dmidecode/ +license: GPL2-or-later +architecture: any +type: source +depends: + - glibc +downloads: + - url: http://download.savannah.gnu.org/releases/dmidecode/dmidecode-${BPM_PKG_VERSION}.tar.xz + extract_to_bpm_source: true + extract_strip_components: 1 + checksum: e40c65f3ec3dafe31ad8349a4ef1a97122d38f65004ed66575e1a8d575dd8bae diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..19b8d07 --- /dev/null +++ b/source.sh @@ -0,0 +1,18 @@ +# 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() { + make CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" +} + +# The package function is executed in the source directory +# This function is used to move the compiled files into the output directory +package() { + make DESTDIR="$BPM_OUTPUT" install + + # Install package license + install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/dmidecode/LICENSE +}