commit e742242b8f2c19527ea177c474dedbec1b2a67e9 Author: EnumDev Date: Sat Mar 14 12:15:50 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..6e0ddd1 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Git repository +REPO="https://git.libssh.org/projects/libssh.git" + +# Get tag name using 'git ls-remote' +TAG_NAME=$(git ls-remote --exit-code --refs --tags --sort='v:refname' "$REPO" | cut -d'/' -f3 | grep 'libssh-' | tail -1) + +# Remove prefix +VERSION=${TAG_NAME//libssh-/} + +# Replace '-' with '.' +VERSION=${VERSION//-/.} + +echo "$VERSION" diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..8fd75c8 --- /dev/null +++ b/pkg.info @@ -0,0 +1,25 @@ +name: libssh +description: Library for accessing ssh client services through C libraries +version: 0.12.0 +revision: 1 +url: https://libssh.org/ +license: LGPL2.1-or-later +maintainers: + - enumdev@enumerated.dev +architecture: any +type: source +depends: + - glibc + - openssl + - zlib +make_depends: + - cmake + - cmocka + - doxygen + - openssh + - python3 +downloads: + - url: https://www.libssh.org/files/${BPM_PKG_VERSION%.*}/libssh-${BPM_PKG_VERSION}.tar.xz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: 1a6af424d8327e5eedef4e5fe7f5b924226dd617ac9f3de80f217d82a36a7121 diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..a3f427f --- /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() { + cmake -B build -DCMAKE_INSTALL_PREFIX=/usr -DWITH_GSSAPI=OFF + cmake --build build +} + +# 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() { + ctest --test-dir build +} + +# The package function is executed in the source directory +# This function is used to move the compiled files into the output directory +package() { + DESTDIR="$BPM_OUTPUT" cmake --install build + + # Install package license + install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/libssh/COPYING +}