From 35917a86213e4a7a4f73ce968f7bd29a0848e4a5 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Tue, 28 Jul 2026 17:21:46 +0300 Subject: [PATCH] Initial commit --- .gitignore | 3 +++ check-version.sh | 15 +++++++++++++++ info.yml | 15 +++++++++++++++ recipe.sh | 18 ++++++++++++++++++ 4 files changed, 51 insertions(+) create mode 100644 .gitignore create mode 100644 check-version.sh create mode 100644 info.yml create mode 100644 recipe.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9d96df7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# Ignore BPM archives and signatures +*.bpm +*.bpm.sig diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..17fc5d7 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Sourceforge project +REPO="hdparm" + +# Get version using best_release.json +VERSION=$(curl -s -L https://sourceforge.net/projects/"$REPO"/best_release.json | jq -r '.platform_releases.linux.filename' | cut -d'/' -f3) + +# Trim prefix +VERSION=${VERSION//hdparm-} + +# Trim suffix +VERSION=${VERSION//.tar.gz} + +echo "$VERSION" diff --git a/info.yml b/info.yml new file mode 100644 index 0000000..e0625de --- /dev/null +++ b/info.yml @@ -0,0 +1,15 @@ +name: hdparm +description: Utility to get or set ATA and SATA drive parameters +version: "9.65" +revision: 1 +url: https://sourceforge.net/projects/hdparm/ +license: custom +architecture: any +type: source +depends: + - glibc +downloads: + - url: https://downloads.sourceforge.net/project/hdparm/hdparm/hdparm-${BPM_PKG_VERSION}.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: d14929f910d060932e717e9382425d47c2e7144235a53713d55a94f7de535a4b diff --git a/recipe.sh b/recipe.sh new file mode 100644 index 0000000..e66cbe8 --- /dev/null +++ b/recipe.sh @@ -0,0 +1,18 @@ +# This is the recipe.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 +} + +# 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" exec_prefix=/usr/ install + + # Install package license + install -Dm644 "$BPM_SOURCE"/LICENSE.TXT "$BPM_OUTPUT"/usr/share/licenses/hdparm/LICENSE.TXT +}