Initial commit
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
# Ignore BPM archives and signatures
|
||||
*.bpm
|
||||
*.bpm.sig
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Github repository
|
||||
REPO="miniupnp/miniupnp"
|
||||
|
||||
# Get tag name using Github Rest API
|
||||
TAG_NAME=$(curl -s -L -H "X-GitHub-Api-Version: 2022-11-28" -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/"$REPO"/releases | jq -r '.[].tag_name' | grep '^miniupnpc_' | head -n1)
|
||||
|
||||
# Trim prefix
|
||||
VERSION=${TAG_NAME//miniupnpc_}
|
||||
|
||||
# Replace '_' with '.'
|
||||
VERSION=${VERSION//_/.}
|
||||
|
||||
echo "$VERSION"
|
||||
@@ -0,0 +1,31 @@
|
||||
name: miniupnpc
|
||||
description: Small UPnP client library/tool to access Internet Gateway Devices
|
||||
version: 2.3.3
|
||||
revision: 1
|
||||
url: https://miniupnp.tuxfamily.org/
|
||||
license: BSD-3-Clause
|
||||
maintainers:
|
||||
- [email protected]
|
||||
architecture: any
|
||||
type: source
|
||||
depends:
|
||||
- glibc
|
||||
- sh
|
||||
make_depends:
|
||||
- python3=3.14.*
|
||||
- python-build
|
||||
- python-installer
|
||||
- python-setuptools
|
||||
- python-wheel
|
||||
downloads:
|
||||
- url: http://miniupnp.free.fr/files/miniupnpc-${BPM_PKG_VERSION}.tar.gz
|
||||
extract_to: ${BPM_SOURCE}
|
||||
extract_strip_components: 1
|
||||
checksum: d52a0afa614ad6c088cc9ddff1ae7d29c8c595ac5fdd321170a05f41e634bd1a
|
||||
split_packages:
|
||||
- name: miniupnpc
|
||||
- name: python-miniupnpc
|
||||
description: Python bindings for miniupnpc
|
||||
depends:
|
||||
- glibc
|
||||
- python3=3.14.*
|
||||
@@ -0,0 +1,36 @@
|
||||
# This is the recipe.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
|
||||
python3 -m build --wheel --no-isolation .
|
||||
}
|
||||
|
||||
# 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 test
|
||||
}
|
||||
|
||||
# The package function is executed in the source directory
|
||||
# This function is used to move the compiled files into the output directory
|
||||
package_miniupnpc() {
|
||||
make DESTDIR="$BPM_OUTPUT" install
|
||||
|
||||
# Install man page
|
||||
install -Dm644 man3/miniupnpc.3 -t "$BPM_OUTPUT"/usr/share/man/man3
|
||||
|
||||
# Install package license
|
||||
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/miniupnpc/LICENSE
|
||||
}
|
||||
|
||||
package_python-miniupnpc() {
|
||||
python3 -m installer --destdir="$BPM_OUTPUT" dist/*.whl
|
||||
|
||||
# Install package license
|
||||
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/python-miniupnpc/LICENSE
|
||||
}
|
||||
Reference in New Issue
Block a user