blob: ede35e76244b66af67aac040e50f244143a0d922 [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001SUMMARY = "Library for low-level interaction with nftables Netlink's API over libmnl"
2LICENSE = "GPL-2.0-only"
3LIC_FILES_CHKSUM = "file://COPYING;md5=79808397c3355f163c012616125c9e26"
4SECTION = "libs"
5
6SRC_URI = "git://git.netfilter.org/libnftnl;branch=master \
7 file://0001-configure.ac-Add-serial-tests.patch \
8 file://run-ptest \
9 "
10SRCREV = "141cc997755dd91e94dd64c5497f2a23bd9a894c"
11
12S = "${WORKDIR}/git"
13
14inherit autotools pkgconfig ptest
15
16DEPENDS = "libmnl"
17RDEPENDS:${PN}-ptest += " bash python3-core make"
18
19TESTDIR = "tests"
20
21do_compile_ptest() {
22 cp -rf ${S}/build-aux .
23 oe_runmake buildtest-TESTS
24}
25
26do_install_ptest() {
27 cp -rf ${B}/build-aux ${D}${PTEST_PATH}
28 install -d ${D}${PTEST_PATH}/${TESTDIR}
29 cp -rf ${B}/${TESTDIR}/Makefile ${D}${PTEST_PATH}/${TESTDIR}
30
31 # the binaries compiled in ${TESTDIR} will look for a compiler to
32 # use, which will cause failures. Substitute the binaries in
33 # ${TESTDIR}/.libs instead
34 cp -rf ${B}/${TESTDIR}/.libs/* ${D}${PTEST_PATH}/${TESTDIR}
35
36 # Alter the Makefile so that it does not try and rebuild anything in
37 # other nonexistent paths before running the actual tests
38 sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
39}