blob: ab55767fee03648ffe816bd5370e7159da644492 [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"
Andrew Geissler595f6302022-01-24 19:11:47 +00005
Andrew Geissler595f6302022-01-24 19:11:47 +00006SRC_URI = "git://git.netfilter.org/libnftnl;branch=master \
Andrew Geissler595f6302022-01-24 19:11:47 +00007 file://0001-configure.ac-Add-serial-tests.patch \
8 file://run-ptest \
9 "
Patrick Williams8dd68482022-10-04 07:57:18 -050010SRCREV = "817c8b66f1ea8c223b7513d4cd7bff525d8a0a9f"
Andrew Geissler595f6302022-01-24 19:11:47 +000011
12S = "${WORKDIR}/git"
13
14inherit autotools pkgconfig ptest
15
Patrick Williams8dd68482022-10-04 07:57:18 -050016DEPENDS = "libmnl"
Andrew Geissler595f6302022-01-24 19:11:47 +000017RDEPENDS:${PN}-ptest += " bash python3-core make"
Patrick Williams8dd68482022-10-04 07:57:18 -050018
Andrew Geissler595f6302022-01-24 19:11:47 +000019TESTDIR = "tests"
20
21do_compile_ptest() {
22 cp -rf ${S}/build-aux .
23 oe_runmake buildtest-TESTS
24}
Patrick Williams8dd68482022-10-04 07:57:18 -050025
Andrew Geissler595f6302022-01-24 19:11:47 +000026do_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}