Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | SUMMARY = "A library for applications dealing with netlink sockets" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 2 | DESCRIPTION = "The libnl suite is a collection of libraries providing \ |
| 3 | APIs to netlink protocol based Linux kernel interfaces. libnl is the core \ |
| 4 | library implementing the fundamentals required to use the netlink protocol \ |
| 5 | such as socket handling, message construction and parsing, and sending \ |
| 6 | and receiving of data." |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 7 | HOMEPAGE = "http://www.infradead.org/~tgr/libnl/" |
| 8 | SECTION = "libs/network" |
| 9 | |
| 10 | PE = "1" |
| 11 | |
| 12 | LICENSE = "LGPLv2.1" |
| 13 | LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" |
| 14 | |
| 15 | DEPENDS = "flex-native bison-native" |
| 16 | |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 17 | SRC_URI = " \ |
| 18 | https://github.com/thom311/${BPN}/releases/download/${BPN}${@d.getVar('PV').replace('.','_')}/${BP}.tar.gz \ |
| 19 | file://enable-serial-tests.patch \ |
| 20 | file://run-ptest \ |
| 21 | " |
| 22 | |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 23 | SRC_URI[md5sum] = "74ba57b1b1d6f9f92268aa8141d8e8e4" |
| 24 | SRC_URI[sha256sum] = "352133ec9545da76f77e70ccb48c9d7e5324d67f6474744647a7ed382b5e05fa" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 25 | |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 26 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 27 | UPSTREAM_CHECK_URI = "https://github.com/thom311/${BPN}/releases" |
| 28 | |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 29 | inherit autotools pkgconfig ptest |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 30 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 31 | FILES:${PN} = "${libdir}/libnl-3.so.* \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 32 | ${libdir}/libnl.so.* \ |
| 33 | ${sysconfdir}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 34 | RREPLACES:${PN} = "libnl2" |
| 35 | RCONFLICTS:${PN} = "libnl2" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 36 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 37 | FILES:${PN}-dev += "${libdir}/libnl/cli/*/*.la" |
| 38 | FILES:${PN}-staticdev += "${libdir}/libnl/cli/*/*.a" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 39 | |
| 40 | PACKAGES += "${PN}-cli ${PN}-genl ${PN}-idiag ${PN}-nf ${PN}-route ${PN}-xfrm" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 41 | FILES:${PN}-cli = "${libdir}/libnl-cli-3.so.* \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 42 | ${libdir}/libnl/cli/*/*.so \ |
| 43 | ${bindir}/genl-ctrl-list \ |
| 44 | ${bindir}/idiag-socket-details \ |
| 45 | ${bindir}/nf-* \ |
| 46 | ${bindir}/nl-*" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 47 | FILES:${PN}-genl = "${libdir}/libnl-genl-3.so.* \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 48 | ${libdir}/libnl-genl.so.*" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 49 | FILES:${PN}-idiag = "${libdir}/libnl-idiag-3.so.*" |
| 50 | FILES:${PN}-nf = "${libdir}/libnl-nf-3.so.*" |
| 51 | FILES:${PN}-route = "${libdir}/libnl-route-3.so.*" |
| 52 | FILES:${PN}-xfrm = "${libdir}/libnl-xfrm-3.so.*" |
| 53 | RREPLACES:${PN}-genl = "libnl-genl2" |
| 54 | RCONFLICTS:${PN}-genl = "libnl-genl2" |
Andrew Geissler | 475cb72 | 2020-07-10 16:00:51 -0500 | [diff] [blame] | 55 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 56 | RDEPENDS:${PN}-ptest += "libcheck" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 57 | DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'libcheck', '', d)}" |
| 58 | |
| 59 | # make sure the tests don't link against wrong so file |
| 60 | EXTRA_OECONF += "${@bb.utils.contains('PTEST_ENABLED', '1', '--disable-rpath', '', d)}" |
| 61 | |
| 62 | do_compile_ptest() { |
| 63 | # hack to remove the call to `make runtest-TESTS` |
| 64 | sed -i 's/$(MAKE) $(AM_MAKEFLAGS) runtest-TESTS//g' Makefile |
| 65 | oe_runmake check |
| 66 | } |
| 67 | |
| 68 | do_install_ptest(){ |
| 69 | # legacy? tests are also installed, but ptest-runner will not run them |
| 70 | # upstream are not running these tests in their CI pipeline |
| 71 | # issue opened https://github.com/thom311/libnl/issues/270 |
| 72 | install -m 0755 tests/.libs/* ${D}${PTEST_PATH}/ |
| 73 | } |
| 74 | |
Andrew Geissler | 475cb72 | 2020-07-10 16:00:51 -0500 | [diff] [blame] | 75 | BBCLASSEXTEND = "native nativesdk" |