mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-02-07 00:42:07 +01:00
67 lines
1.9 KiB
Plaintext
67 lines
1.9 KiB
Plaintext
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
|
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
|
|
# Contributor: Dan Williams <dan@ma.ssive.co>
|
|
pkgname=libseccomp
|
|
pkgver=2.5.1
|
|
pkgrel=2
|
|
pkgdesc="An interface to the Linux Kernel's syscall filtering mechanism"
|
|
url="https://github.com/seccomp/libseccomp"
|
|
arch="all"
|
|
license="LGPL-2.1-or-later"
|
|
depends_dev="linux-headers"
|
|
makedepends="$depends_dev gperf cython python3 python3-dev"
|
|
checkdepends="bash"
|
|
subpackages="$pkgname-static $pkgname-dev $pkgname-doc py3-$pkgname:py3"
|
|
source="https://github.com/seccomp/libseccomp/releases/download/v$pkgver/libseccomp-$pkgver.tar.gz
|
|
remove-redefinition-prctl.patch
|
|
"
|
|
|
|
case "$CARCH" in
|
|
mips*) options="$options !check";;
|
|
esac
|
|
|
|
# secfixes:
|
|
# 2.4.0-r0:
|
|
# - CVE-2019-9893
|
|
|
|
build() {
|
|
./configure \
|
|
--build=$CBUILD \
|
|
--host=$CHOST \
|
|
--prefix=/usr \
|
|
--sysconfdir=/etc \
|
|
--mandir=/usr/share/man \
|
|
--infodir=/usr/share/info \
|
|
--enable-python \
|
|
--enable-static \
|
|
--localstatedir=/var
|
|
make
|
|
}
|
|
|
|
check() {
|
|
# commit be65b26b67099be2b2b4890d736dbd1ad15adf36 adapted to new kernel 5.x syscalls
|
|
# as long as we are at 4.19 kernel, we need this change
|
|
case "$CARCH" in
|
|
ppc64le|s390x) rm -f tests/36-sim-ipc_syscalls.tests \
|
|
tests/37-sim-ipc_syscalls_be.tests;;
|
|
esac
|
|
# fix python shebang
|
|
sed -i -e 's@cmd /usr/bin/env python @cmd /usr/bin/env python3 @' tests/regression
|
|
sed -i -e 's@^#!/usr/bin/env python$@#!/usr/bin/env python3@' tests/*.py
|
|
make check
|
|
}
|
|
|
|
package() {
|
|
make DESTDIR="$pkgdir" install
|
|
}
|
|
|
|
py3() {
|
|
pkgdesc="Python 3 bindings for $pkgname"
|
|
depends="$depends $pkgname python3"
|
|
|
|
amove usr/lib/python3*
|
|
}
|
|
|
|
sha512sums="2be80a6323f9282dbeae8791724e5778b32e2382b2a3d1b0f77366371ec4072ea28128204f675cce101c091c0420d12c497e1a9ccbb7dc5bcbf61bfd777160af libseccomp-2.5.1.tar.gz
|
|
f2c31dcafdc9a1ad78e32e76b75e1c1603071eaa3f979e1f2483b879a34ad07e0a4ef3642196a695415cdf81e1ed2bf325175872fb4e203ef9d0e668c287493f remove-redefinition-prctl.patch"
|