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 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 12 | LICENSE = "LGPL-2.1-only" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 13 | LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" |
| 14 | |
| 15 | DEPENDS = "flex-native bison-native" |
| 16 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 17 | SRC_URI = "${GITHUB_BASE_URI}/download/${BPN}${@d.getVar('PV').replace('.','_')}/${BP}.tar.gz \ |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 18 | file://enable-serial-tests.patch \ |
| 19 | file://run-ptest \ |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 20 | " |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 21 | |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 22 | SRC_URI[sha256sum] = "9fe43ccbeeea72c653bdcf8c93332583135cda46a79507bfd0a483bb57f65939" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 23 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 24 | GITHUB_BASE_URI = "https://github.com/thom311/${BPN}/releases" |
| 25 | UPSTREAM_CHECK_REGEX = "releases/tag/libnl(?P<pver>.+)" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 26 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 27 | inherit autotools pkgconfig ptest github-releases |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 28 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 29 | FILES:${PN} = "${libdir}/libnl-3.so.* \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 30 | ${libdir}/libnl.so.* \ |
| 31 | ${sysconfdir}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 32 | RREPLACES:${PN} = "libnl2" |
| 33 | RCONFLICTS:${PN} = "libnl2" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 34 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 35 | FILES:${PN}-dev += "${libdir}/libnl/cli/*/*.la" |
| 36 | FILES:${PN}-staticdev += "${libdir}/libnl/cli/*/*.a" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 37 | |
| 38 | 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] | 39 | FILES:${PN}-cli = "${libdir}/libnl-cli-3.so.* \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 40 | ${libdir}/libnl/cli/*/*.so \ |
| 41 | ${bindir}/genl-ctrl-list \ |
| 42 | ${bindir}/idiag-socket-details \ |
| 43 | ${bindir}/nf-* \ |
| 44 | ${bindir}/nl-*" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 45 | FILES:${PN}-genl = "${libdir}/libnl-genl-3.so.* \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 46 | ${libdir}/libnl-genl.so.*" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 47 | FILES:${PN}-idiag = "${libdir}/libnl-idiag-3.so.*" |
| 48 | FILES:${PN}-nf = "${libdir}/libnl-nf-3.so.*" |
| 49 | FILES:${PN}-route = "${libdir}/libnl-route-3.so.*" |
| 50 | FILES:${PN}-xfrm = "${libdir}/libnl-xfrm-3.so.*" |
| 51 | RREPLACES:${PN}-genl = "libnl-genl2" |
| 52 | RCONFLICTS:${PN}-genl = "libnl-genl2" |
Andrew Geissler | 475cb72 | 2020-07-10 16:00:51 -0500 | [diff] [blame] | 53 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 54 | RDEPENDS:${PN}-ptest += "libcheck" |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 55 | RRECOMMENDS:${PN}-ptest += "kernel-module-dummy kernel-module-bonding" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 56 | DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'libcheck', '', d)}" |
| 57 | |
| 58 | # make sure the tests don't link against wrong so file |
| 59 | EXTRA_OECONF += "${@bb.utils.contains('PTEST_ENABLED', '1', '--disable-rpath', '', d)}" |
| 60 | |
| 61 | do_compile_ptest() { |
| 62 | # hack to remove the call to `make runtest-TESTS` |
| 63 | sed -i 's/$(MAKE) $(AM_MAKEFLAGS) runtest-TESTS//g' Makefile |
| 64 | oe_runmake check |
| 65 | } |
| 66 | |
| 67 | do_install_ptest(){ |
| 68 | # legacy? tests are also installed, but ptest-runner will not run them |
| 69 | # upstream are not running these tests in their CI pipeline |
| 70 | # issue opened https://github.com/thom311/libnl/issues/270 |
| 71 | install -m 0755 tests/.libs/* ${D}${PTEST_PATH}/ |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 72 | # contains build paths |
| 73 | rm ${D}${PTEST_PATH}/*.la |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 74 | } |
| 75 | |
Andrew Geissler | 475cb72 | 2020-07-10 16:00:51 -0500 | [diff] [blame] | 76 | BBCLASSEXTEND = "native nativesdk" |