Rebuild with python
This commit is contained in:
@@ -1,9 +1,34 @@
|
|||||||
name: libseccomp
|
name: libseccomp
|
||||||
description: Library providing an easy to use, platform independent, interface to the Linux Kernel's syscall filtering mechanism
|
description: Library providing an easy to use, platform independent, interface to the Linux Kernel's syscall filtering mechanism
|
||||||
version: 2.6.0
|
version: 2.6.0
|
||||||
|
revision: 2
|
||||||
url: https://github.com/seccomp/libseccomp
|
url: https://github.com/seccomp/libseccomp
|
||||||
license: LGPL2.1
|
license: LGPL2.1
|
||||||
|
maintainers:
|
||||||
|
- [email protected]
|
||||||
architecture: any
|
architecture: any
|
||||||
depends: ["glibc"]
|
|
||||||
make_depends: ["valgrind"]
|
|
||||||
type: source
|
type: source
|
||||||
|
depends:
|
||||||
|
- glibc
|
||||||
|
make_depends:
|
||||||
|
- python-cython
|
||||||
|
- gperf
|
||||||
|
- python3=3.14.*
|
||||||
|
- python-build
|
||||||
|
- python-installer
|
||||||
|
- python-setuptools
|
||||||
|
- python-wheel
|
||||||
|
check_depends:
|
||||||
|
- valgrind
|
||||||
|
downloads:
|
||||||
|
- url: https://github.com/seccomp/libseccomp/releases/download/v${BPM_PKG_VERSION}/libseccomp-${BPM_PKG_VERSION}.tar.gz
|
||||||
|
extract_to: ${BPM_SOURCE}
|
||||||
|
extract_strip_components: 1
|
||||||
|
checksum: 83b6085232d1588c379dc9b9cae47bb37407cf262e6e74993c61ba72d2a784dc
|
||||||
|
split_packages:
|
||||||
|
- name: libseccomp
|
||||||
|
- name: python-libseccomp
|
||||||
|
description: Python module for libseccomp
|
||||||
|
depends:
|
||||||
|
- glibc
|
||||||
|
- python3=3.14.*
|
||||||
|
|||||||
@@ -2,21 +2,15 @@
|
|||||||
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
# 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
|
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
||||||
|
|
||||||
DOWNLOAD="https://github.com/seccomp/libseccomp/releases/download/v${BPM_PKG_VERSION}/libseccomp-${BPM_PKG_VERSION}.tar.gz"
|
|
||||||
FILENAME="${DOWNLOAD##*/}"
|
|
||||||
|
|
||||||
# The prepare function is executed in the root of the temp directory
|
|
||||||
# This function is used for downloading files and putting them into the correct location
|
|
||||||
prepare() {
|
|
||||||
wget "$DOWNLOAD"
|
|
||||||
tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE"
|
|
||||||
}
|
|
||||||
|
|
||||||
# The build function is executed in the source directory
|
# The build function is executed in the source directory
|
||||||
# This function is used to compile the source code
|
# This function is used to compile the source code
|
||||||
build() {
|
build() {
|
||||||
./configure --prefix=/usr --disable-static
|
./configure --prefix=/usr
|
||||||
make
|
make
|
||||||
|
|
||||||
|
# Build python module
|
||||||
|
cd src/python
|
||||||
|
VERSION_RELEASE=${BPM_PKG_VERSION} CPPFLAGS="$CPPFLAGS -I${BPM_SOURCE}/include" python -m build --wheel --no-isolation
|
||||||
}
|
}
|
||||||
|
|
||||||
# The check function is executed in the source directory
|
# The check function is executed in the source directory
|
||||||
@@ -27,9 +21,17 @@ check() {
|
|||||||
|
|
||||||
# The package function is executed in the source directory
|
# The package function is executed in the source directory
|
||||||
# This function is used to move the compiled files into the output directory
|
# This function is used to move the compiled files into the output directory
|
||||||
package() {
|
package_libseccomp() {
|
||||||
make DESTDIR="$BPM_OUTPUT" install
|
make DESTDIR="$BPM_OUTPUT" install
|
||||||
|
|
||||||
# Install package license
|
# Install package license
|
||||||
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/libseccomp/LICENSE
|
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/libseccomp/LICENSE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
package_python-libseccomp() {
|
||||||
|
cd src/python
|
||||||
|
VERSION_RELEASE=${BPM_PKG_VERSION} python -m installer --destdir="$BPM_OUTPUT" dist/*.whl
|
||||||
|
|
||||||
|
# Install package license
|
||||||
|
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/libseccomp/LICENSE
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user