diff options
Diffstat (limited to 'meta/recipes-support/libseccomp/libseccomp_2.6.0.bb')
| -rw-r--r-- | meta/recipes-support/libseccomp/libseccomp_2.6.0.bb | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/meta/recipes-support/libseccomp/libseccomp_2.6.0.bb b/meta/recipes-support/libseccomp/libseccomp_2.6.0.bb new file mode 100644 index 0000000000..949799fc82 --- /dev/null +++ b/meta/recipes-support/libseccomp/libseccomp_2.6.0.bb | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | SUMMARY = "interface to seccomp filtering mechanism" | ||
| 2 | DESCRIPTION = "The libseccomp library provides an easy to use, platform independent, interface to the Linux Kernel's syscall filtering mechanism: seccomp." | ||
| 3 | HOMEPAGE = "https://github.com/seccomp/libseccomp" | ||
| 4 | SECTION = "security" | ||
| 5 | LICENSE = "LGPL-2.1-only" | ||
| 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=7c13b3376cea0ce68d2d2da0a1b3a72c" | ||
| 7 | |||
| 8 | DEPENDS += "gperf-native" | ||
| 9 | |||
| 10 | SRCREV = "c7c0caed1d04292500ed4b9bb386566053eb9775" | ||
| 11 | |||
| 12 | SRC_URI = "git://github.com/seccomp/libseccomp.git;branch=release-2.6;protocol=https \ | ||
| 13 | file://run-ptest \ | ||
| 14 | " | ||
| 15 | |||
| 16 | S = "${WORKDIR}/git" | ||
| 17 | |||
| 18 | inherit autotools-brokensep pkgconfig ptest features_check | ||
| 19 | |||
| 20 | inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)} | ||
| 21 | |||
| 22 | REQUIRED_DISTRO_FEATURES = "seccomp" | ||
| 23 | |||
| 24 | PACKAGECONFIG ??= "" | ||
| 25 | PACKAGECONFIG[python] = "--enable-python, --disable-python, python3-cython-native" | ||
| 26 | |||
| 27 | DISABLE_STATIC = "" | ||
| 28 | |||
| 29 | do_compile_ptest() { | ||
| 30 | oe_runmake -C tests check-build | ||
| 31 | } | ||
| 32 | |||
| 33 | do_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 | ||
| 42 | 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 | ||
| 46 | 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 | ||
| 53 | # 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 | ||
| 56 | } | ||
| 57 | |||
| 58 | FILES:${PN} = "${bindir} ${libdir}/${BPN}.so* ${PYTHON_SITEPACKAGES_DIR}/" | ||
| 59 | FILES:${PN}-dbg += "${libdir}/${PN}/tests/.debug/* ${libdir}/${PN}/tools/.debug" | ||
| 60 | |||
| 61 | RDEPENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3', '', d)}" | ||
| 62 | RDEPENDS:${PN}-ptest = "coreutils bash" | ||
