From 49b2889dd8bda1f56ae605738decea448bd2ca8e Mon Sep 17 00:00:00 2001 From: xhaa123 Date: Sun, 3 Nov 2024 21:55:59 +0800 Subject: [PATCH] libseccomp 2.5.5-2 --- PKGBUILD | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index fb60c5c..1f76ca3 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -4,34 +4,49 @@ # then please put 'unknown'. # Maintainer: Future Linux Team -pkgname=libseccomp +pkgname=(libseccomp python-libseccomp) +pkgbase=libseccomp pkgver=2.5.5 -pkgrel=1 +pkgrel=2 pkgdesc="Enhanced seccomp library" arch=('x86_64') url="https://github.com/seccomp/libseccomp" license=('LGPL2.1') -depends=('glibc') -makedepends=('gperf') -source=(https://github.com/seccomp/libseccomp/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz) +depends=('glibc' 'python') +makedepends=('gperf' 'python-cython' 'python-setuptools') +source=(https://github.com/seccomp/libseccomp/releases/download/v${pkgver}/${pkgbase}-${pkgver}.tar.gz) sha256sums=(248a2c8a4d9b9858aa6baf52712c34afefcf9c9e94b76dce02c1c9aa25fb3375) prepare() { - cd ${pkgname}-${pkgver} + cd ${pkgbase}-${pkgver} autoreconf -fiv } build() { - cd ${pkgname}-${pkgver} + cd ${pkgbase}-${pkgver} - ${CONFIGURE} --disable-static + #${CONFIGURE} --disable-static + ${CONFIGURE} make + + ( + cd src/python + env VERSION_RELEASE=${pkgver} python3 setup.py build + ) } package_libseccomp() { - cd ${pkgname}-${pkgver} + cd ${pkgbase}-${pkgver} make DESTDIR=${pkgdir} install } + +package_python-libseccomp() { + depends=('python') + + cd ${pkgbase}-${pkgver}/src/python + + env VERSION_RELEASE=${pkgver} python3 setup.py install --root=${pkgdir} --prefix=/usr -O1 --skip-build +}