[arch-commits] Commit in libseccomp/trunk (PKGBUILD)

Levente Polyak anthraxx at archlinux.org
Tue Jul 21 20:56:52 UTC 2020


    Date: Tuesday, July 21, 2020 @ 20:56:51
  Author: anthraxx
Revision: 392340

upgpkg: libseccomp 2.5.0-2: adding python bindings

Modified:
  libseccomp/trunk/PKGBUILD

----------+
 PKGBUILD |   27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-07-21 20:31:18 UTC (rev 392339)
+++ PKGBUILD	2020-07-21 20:56:51 UTC (rev 392340)
@@ -3,9 +3,10 @@
 # Contributor: Daniel Micay <danielmicay at gmail.com>
 # Contributor: Patryk Kowalczyk < patryk at kowalczyk dot ws>
 
-pkgname=libseccomp
+pkgbase=libseccomp
+pkgname=(libseccomp python-libseccomp)
 pkgver=2.5.0
-pkgrel=1
+pkgrel=2
 pkgdesc='Enhanced seccomp library'
 arch=('x86_64')
 license=('LGPL2.1')
@@ -12,8 +13,7 @@
 url="https://github.com/seccomp/libseccomp"
 depends=('glibc')
 checkdepends=('valgrind')
-makedepends=('gperf')
-provides=('libseccomp.so')
+makedepends=('gperf' 'cython' 'python-setuptools')
 source=(https://github.com/seccomp/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz{,.asc})
 sha256sums=('1ffa7038d2720ad191919816db3479295a4bcca1ec14e02f672539f4983014f3'
             'SKIP')
@@ -25,25 +25,34 @@
 )
 
 prepare() {
-  cd ${pkgname}-${pkgver}
+  cd ${pkgbase}-${pkgver}
   autoreconf -fiv
 }
 
 build() {
-  cd ${pkgname}-${pkgver}
+  cd ${pkgbase}-${pkgver}
   ./configure --prefix=/usr
   make
+  cd src/python
+  env VERSION_RELEASE=${pkgver} python setup.py build
 }
 
 check() {
-  cd ${pkgname}-${pkgver}
+  cd ${pkgbase}-${pkgver}
   make check
 }
 
-package() {
-  cd ${pkgname}-${pkgver}
+package_libseccomp() {
+  provides=('libseccomp.so')
+  cd ${pkgbase}-${pkgver}
   make DESTDIR="${pkgdir}" install
   install -Dm 644 CHANGELOG README.md SECURITY.md -t "${pkgdir}/usr/share/doc/${pkgname}"
 }
 
+package_python-libseccomp() {
+  depends=('python' 'libseccomp.so')
+  cd ${pkgbase}-${pkgver}/src/python
+  env VERSION_RELEASE=${pkgver} python setup.py install --root="${pkgdir}" --prefix=/usr -O1 --skip-build
+}
+
 # vim: ts=2 sw=2 et:



More information about the arch-commits mailing list