aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-filter/libnftnl/libnftnl_1.2.3.bb
blob: ab55767fee03648ffe816bd5370e7159da644492 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
SUMMARY = "Library for low-level interaction with nftables Netlink's API over libmnl"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=79808397c3355f163c012616125c9e26"
SECTION = "libs"

SRC_URI = "git://git.netfilter.org/libnftnl;branch=master \
           file://0001-configure.ac-Add-serial-tests.patch \
           file://run-ptest \
           "
SRCREV = "817c8b66f1ea8c223b7513d4cd7bff525d8a0a9f"

S = "${WORKDIR}/git"

inherit autotools pkgconfig ptest

DEPENDS = "libmnl"
RDEPENDS:${PN}-ptest += " bash python3-core make"

TESTDIR = "tests"

do_compile_ptest() {
    cp -rf ${S}/build-aux .
    oe_runmake buildtest-TESTS
}

do_install_ptest() {
    cp -rf ${B}/build-aux ${D}${PTEST_PATH}
    install -d ${D}${PTEST_PATH}/${TESTDIR}
    cp -rf ${B}/${TESTDIR}/Makefile ${D}${PTEST_PATH}/${TESTDIR}

    # the binaries compiled in ${TESTDIR} will look for a compiler to
    # use, which will cause failures. Substitute the binaries in
    # ${TESTDIR}/.libs instead
    cp -rf ${B}/${TESTDIR}/.libs/* ${D}${PTEST_PATH}/${TESTDIR}

    # Alter the Makefile so that it does not try and rebuild anything in
    # other nonexistent paths before running the actual tests
    sed -i 's/^Makefile/_Makefile/'  ${D}${PTEST_PATH}/${TESTDIR}/Makefile
}