commit 1f0ae2881a6d2d02575b1523f1f07764826f40f0 Author: EnumDev Date: Fri Feb 13 12:15:20 2026 +0200 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..2b3f3fb --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Git repository +REPO="git://git.sv.gnu.org/time" + +# Get tag name using 'git ls-remote' +TAG_NAME=$(git ls-remote --exit-code --refs --tags --sort='v:refname' "$REPO" | tail -1 | cut -d'/' -f3) + +# Trim 'v' character in VERSION variable +VERSION=$(echo "$TAG_NAME" | tr -d 'v') + +echo "$VERSION" diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..f63964f --- /dev/null +++ b/pkg.info @@ -0,0 +1,17 @@ +name: time +description: Display information about the resources used by a program +version: "1.9" +revision: 1 +url: https://www.gnu.org/software/time/ +license: GPL3-only +maintainers: + - enumdev@enumerated.dev +architecture: any +type: source +depends: + - glibc +downloads: + - url: https://ftpmirror.gnu.org/gnu/time/time-${BPM_PKG_VERSION}.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: fbacf0c81e62429df3e33bda4cee38756604f18e01d977338e23306a3e3b521e diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..0e9347e --- /dev/null +++ b/source.sh @@ -0,0 +1,26 @@ +# 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() { + export CFLAGS="$CFLAGS -std=gnu17" + ./configure --prefix=/usr + make +} + +# The check function is executed in the source directory +# This function is used to run tests to verify the package has been compiled correctly +check() { + make check +} + +# 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"/COPYING "$BPM_OUTPUT"/usr/share/licenses/time/COPYING +}