blob: 478e5f4289ee4013804d71a4295d70acc21c55b1 [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001SUMMARY = "interface to seccomp filtering mechanism"
Andrew Geissler517393d2023-01-13 08:55:19 -06002DESCRIPTION = "The libseccomp library provides an easy to use, platform independent, interface to the Linux Kernel's syscall filtering mechanism: seccomp."
Andrew Geissler595f6302022-01-24 19:11:47 +00003HOMEPAGE = "https://github.com/seccomp/libseccomp"
4SECTION = "security"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00005LICENSE = "LGPL-2.1-only"
Andrew Geissler78b72792022-06-14 06:47:25 -05006LIC_FILES_CHKSUM = "file://LICENSE;md5=7c13b3376cea0ce68d2d2da0a1b3a72c"
Andrew Geissler595f6302022-01-24 19:11:47 +00007
8DEPENDS += "gperf-native"
9
Patrick Williams169d7bc2024-01-05 11:33:25 -060010SRCREV = "f0b04ab0b4fc0bc2cde6da1f407b4a487fe6d78f"
Andrew Geissler595f6302022-01-24 19:11:47 +000011
12SRC_URI = "git://github.com/seccomp/libseccomp.git;branch=release-2.5;protocol=https \
13 file://run-ptest \
14 "
15
16S = "${WORKDIR}/git"
17
18inherit autotools-brokensep pkgconfig ptest features_check
19
Patrick Williams44b3caf2024-04-12 16:51:14 -050020inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)}
21
Andrew Geissler595f6302022-01-24 19:11:47 +000022REQUIRED_DISTRO_FEATURES = "seccomp"
23
24PACKAGECONFIG ??= ""
Patrick Williams44b3caf2024-04-12 16:51:14 -050025PACKAGECONFIG[python] = "--enable-python, --disable-python, python3-cython-native"
Andrew Geissler595f6302022-01-24 19:11:47 +000026
27DISABLE_STATIC = ""
28
29do_compile_ptest() {
30 oe_runmake -C tests check-build
31}
32
33do_install_ptest() {
34 install -d ${D}${PTEST_PATH}/tests
35 install -d ${D}${PTEST_PATH}/tools
36 for file in $(find tests/* -executable -type f); do
37 install -m 744 ${S}/${file} ${D}/${PTEST_PATH}/tests
38 done
39 for file in $(find tests/*.tests -type f); do
40 install -m 744 ${S}/${file} ${D}/${PTEST_PATH}/tests
41 done
Andrew Geissler78b72792022-06-14 06:47:25 -050042 for file in $(find tests/*.pfc -type f); do
43 install -m 644 ${S}/${file} ${D}/${PTEST_PATH}/tests
44 done
45 install -m 644 ${S}/tests/valgrind_test.supp ${D}/${PTEST_PATH}/tests
Andrew Geissler595f6302022-01-24 19:11:47 +000046 for file in $(find tools/* -executable -type f); do
47 install -m 744 ${S}/${file} ${D}/${PTEST_PATH}/tools
48 done
49 # Overwrite libtool wrappers with real executables
50 for file in $(find tools/.libs/* -executable -type f); do
51 install -m 744 ${S}/${file} ${D}/${PTEST_PATH}/tools
52 done
Patrick Williams44b3caf2024-04-12 16:51:14 -050053 # fix python shebang
54 sed -i -e 's@cmd /usr/bin/env python @cmd /usr/bin/env python3 @' ${D}/${PTEST_PATH}/tests/regression
55 sed -i -e 's@^#!/usr/bin/env python$@#!/usr/bin/env python3@' ${D}/${PTEST_PATH}/tests/*.py
Andrew Geissler595f6302022-01-24 19:11:47 +000056}
57
Patrick Williams44b3caf2024-04-12 16:51:14 -050058FILES:${PN} = "${bindir} ${libdir}/${BPN}.so* ${PYTHON_SITEPACKAGES_DIR}/"
Andrew Geissler595f6302022-01-24 19:11:47 +000059FILES:${PN}-dbg += "${libdir}/${PN}/tests/.debug/* ${libdir}/${PN}/tools/.debug"
60
Patrick Williams44b3caf2024-04-12 16:51:14 -050061RDEPENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3', '', d)}"
Andrew Geissler595f6302022-01-24 19:11:47 +000062RDEPENDS:${PN}-ptest = "coreutils bash"