From 98e3b5bd79b70cd96523a07204a2604e032e083b Mon Sep 17 00:00:00 2001 From: EnumDev Date: Mon, 10 Nov 2025 14:33:33 +0200 Subject: [PATCH] Initial commit --- .gitignore | 2 ++ check-version.sh | 9 +++++++++ pkg.info | 17 +++++++++++++++++ source.sh | 18 ++++++++++++++++++ 4 files changed, 46 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..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..0d47a93 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# Git repository +REPO="https://passt.top/passt" + +# 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) + +echo "$TAG_NAME" diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..e9f8eff --- /dev/null +++ b/pkg.info @@ -0,0 +1,17 @@ +name: passt +description: Plug A Simple Socket Transport +version: 2025_09_19.623dbf6 +revision: 1 +url: https://passt.top/passt/about/ +license: BSD-3-Clause,GPL2-or-later +architecture: any +type: source +depends: + - glibc +optional_depends: + - sh +downloads: + - url: https://passt.top/passt/snapshot/passt-${BPM_PKG_VERSION}.tar.zst + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: 5e4c2d7a25122be4f34a177f1fe9b00670ee5c8d9509835a276737999fce854a diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..0cc2fa5 --- /dev/null +++ b/source.sh @@ -0,0 +1,18 @@ +# 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() { + make VERSION="$BPM_PKG_VERSION" +} + +# 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" prefix=/usr install + + # Install package licenses + install -Dm644 "$BPM_SOURCE"/LICENSES/* -t "$BPM_OUTPUT"/usr/share/licenses/passt/ +}