From 04ad380bc69edd11f77eca6f0962f6ad8570cced Mon Sep 17 00:00:00 2001 From: EnumDev Date: Fri, 13 Mar 2026 17:32:49 +0200 Subject: [PATCH] Initial commit --- .gitignore | 3 +++ check-version.sh | 11 +++++++++++ pkg.info | 24 ++++++++++++++++++++++++ source.sh | 30 ++++++++++++++++++++++++++++++ 4 files changed, 68 insertions(+) create mode 100644 .gitignore create mode 100644 check-version.sh create mode 100644 pkg.info create mode 100644 source.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..deec87f --- /dev/null +++ b/check-version.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +URL="https://www.samba.org/ftp/talloc/" + +# Get version number from FTP server +VERSION=$(curl -s -L "$URL" | grep -o -E 'talloc-[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..a5783ec --- /dev/null +++ b/pkg.info @@ -0,0 +1,24 @@ +name: talloc +description: Hierarchical pool based memory allocator with destructors +version: 2.4.4 +revision: 1 +url: https://talloc.samba.org/ +license: GPL3-or-later +maintainers: + - enumdev@enumerated.dev +architecture: any +type: source +depends: + - glibc + - libbsd + - libxcrypt +optional_depends: + - python3:For python bindings +make_depends: + - docbook-xsl-nons + - python3 +downloads: + - url: https://www.samba.org/ftp/talloc/talloc-${BPM_PKG_VERSION}.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: 55e47994018c13743485544e7206780ffbb3c8495e704a99636503e6e77abf59 diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..d009130 --- /dev/null +++ b/source.sh @@ -0,0 +1,30 @@ +# 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 \ + --bundled-libraries=NONE \ + --builtin-libraries=replace \ + --enable-talloc-compat1 + 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"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/talloc/LICENSE +}