commit f629e47850d9a699a19658eb2e6072be446ef2d0 Author: EnumDev Date: Fri Mar 13 16:34:06 2026 +0200 Initial commit 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..3c17e1b --- /dev/null +++ b/check-version.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +URL="https://www.samba.org/ftp/tdb/" + +# Get version number from FTP server +VERSION=$(curl -s -L "$URL" | grep -o -E 'tdb-[0-9]{1,}\.[0-9]{1,}(\.[0-9]{1,})?.tar.gz' | cut -d '-' -f2 | sort -V | tail -n1) + +# Remove '.tar.gz' suffix from VERSION variable +VERSION=${VERSION//.tar.gz/} + +echo "$VERSION" diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..bb67b3e --- /dev/null +++ b/pkg.info @@ -0,0 +1,23 @@ +name: tdb +description: Trivial Database similar to GDBM but allows simultaneous commits +version: 1.4.15 +revision: 1 +url: https://tdb.samba.org/ +license: GPL3-or-later +maintainers: + - enumdev@enumerated.dev +architecture: any +type: source +depends: + - glibc +optional_depends: + - python3:For python bindings +make_depends: + - docbook-xsl-nons + - libxslt + - python3 +downloads: + - url: https://www.samba.org/ftp/tdb/tdb-${BPM_PKG_VERSION}.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: fba09d8df1f1b9072aeae8e78b2bd43c5afef20b2f6deefa633aa14a377a8dd2 diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..3f17304 --- /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() { + ./configure --prefix=/usr --sysconfdir=/etc/samba --localstatedir=/var + 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" install + + # Install package license + install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/tdb/LICENSE +}