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