commit a2563e554eeaef42ec25446cadd601ec0fd5b008 Author: EnumDev Date: Sat Oct 4 13:41:23 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..c780a6a --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Git repository +REPO="https://git.netfilter.org/libnetfilter_conntrack" + +# Get tag name using 'git ls-remote' +TAG_NAME=$(git ls-remote --exit-code --refs --tags --sort='v:refname' "$REPO" | cut -d'/' -f3 | grep '^libnetfilter_conntrack' | tail -1 ) + +# Trim prefix +VERSION=${TAG_NAME//libnetfilter_conntrack-/} + +echo "$VERSION" diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..6ef8ace --- /dev/null +++ b/pkg.info @@ -0,0 +1,16 @@ +name: libnetfilter_conntrack +description: Userspace library providing a programming interface (API) to the in-kernel connection tracking state table +version: 1.1.0 +revision: 1 +url: https://www.netfilter.org/projects/libnetfilter_conntrack/ +license: GPL2-or-later +architecture: any +type: source +depends: + - libmnl + - libnfnetlink +downloads: + - url: https://www.netfilter.org/pub/libnetfilter_conntrack/libnetfilter_conntrack-${BPM_PKG_VERSION}.tar.xz + extract_to_bpm_source: true + extract_strip_components: 1 + checksum: 67edcb4eb826c2f8dc98af08dabff68f3b3d0fe6fb7d9d0ac1ee7ecce0fe694e diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..b68d46c --- /dev/null +++ b/source.sh @@ -0,0 +1,25 @@ +# 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 + 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/libnetfilter_conntrack/COPYING +}