blob: ef286a6429d9d0c531b91ae6452a5346011e3b91 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001SUMMARY = "A library for applications dealing with netlink sockets"
Andrew Geissler90fd73c2021-03-05 15:25:55 -06002DESCRIPTION = "The libnl suite is a collection of libraries providing \
3APIs to netlink protocol based Linux kernel interfaces. libnl is the core \
4library implementing the fundamentals required to use the netlink protocol \
5such as socket handling, message construction and parsing, and sending \
6and receiving of data."
Brad Bishop316dfdd2018-06-25 12:45:53 -04007HOMEPAGE = "http://www.infradead.org/~tgr/libnl/"
8SECTION = "libs/network"
9
10PE = "1"
11
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000012LICENSE = "LGPL-2.1-only"
Brad Bishop316dfdd2018-06-25 12:45:53 -040013LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
14
15DEPENDS = "flex-native bison-native"
16
Andrew Geissler87f5cff2022-09-30 13:13:31 -050017SRC_URI = "${GITHUB_BASE_URI}/download/${BPN}${@d.getVar('PV').replace('.','_')}/${BP}.tar.gz \
Andrew Geissler90fd73c2021-03-05 15:25:55 -060018 file://enable-serial-tests.patch \
19 file://run-ptest \
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050020 "
Andrew Geissler90fd73c2021-03-05 15:25:55 -060021
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050022SRC_URI[sha256sum] = "9fe43ccbeeea72c653bdcf8c93332583135cda46a79507bfd0a483bb57f65939"
Brad Bishop316dfdd2018-06-25 12:45:53 -040023
Andrew Geissler87f5cff2022-09-30 13:13:31 -050024GITHUB_BASE_URI = "https://github.com/thom311/${BPN}/releases"
25UPSTREAM_CHECK_REGEX = "releases/tag/libnl(?P<pver>.+)"
Andrew Geissler90fd73c2021-03-05 15:25:55 -060026
Andrew Geissler87f5cff2022-09-30 13:13:31 -050027inherit autotools pkgconfig ptest github-releases
Brad Bishop316dfdd2018-06-25 12:45:53 -040028
Patrick Williams213cb262021-08-07 19:21:33 -050029FILES:${PN} = "${libdir}/libnl-3.so.* \
Brad Bishop316dfdd2018-06-25 12:45:53 -040030 ${libdir}/libnl.so.* \
31 ${sysconfdir}"
Patrick Williams213cb262021-08-07 19:21:33 -050032RREPLACES:${PN} = "libnl2"
33RCONFLICTS:${PN} = "libnl2"
Andrew Geissler90fd73c2021-03-05 15:25:55 -060034
Patrick Williams213cb262021-08-07 19:21:33 -050035FILES:${PN}-dev += "${libdir}/libnl/cli/*/*.la"
36FILES:${PN}-staticdev += "${libdir}/libnl/cli/*/*.a"
Brad Bishop316dfdd2018-06-25 12:45:53 -040037
38PACKAGES += "${PN}-cli ${PN}-genl ${PN}-idiag ${PN}-nf ${PN}-route ${PN}-xfrm"
Patrick Williams213cb262021-08-07 19:21:33 -050039FILES:${PN}-cli = "${libdir}/libnl-cli-3.so.* \
Brad Bishop316dfdd2018-06-25 12:45:53 -040040 ${libdir}/libnl/cli/*/*.so \
41 ${bindir}/genl-ctrl-list \
42 ${bindir}/idiag-socket-details \
43 ${bindir}/nf-* \
44 ${bindir}/nl-*"
Patrick Williams213cb262021-08-07 19:21:33 -050045FILES:${PN}-genl = "${libdir}/libnl-genl-3.so.* \
Brad Bishop316dfdd2018-06-25 12:45:53 -040046 ${libdir}/libnl-genl.so.*"
Patrick Williams213cb262021-08-07 19:21:33 -050047FILES:${PN}-idiag = "${libdir}/libnl-idiag-3.so.*"
48FILES:${PN}-nf = "${libdir}/libnl-nf-3.so.*"
49FILES:${PN}-route = "${libdir}/libnl-route-3.so.*"
50FILES:${PN}-xfrm = "${libdir}/libnl-xfrm-3.so.*"
51RREPLACES:${PN}-genl = "libnl-genl2"
52RCONFLICTS:${PN}-genl = "libnl-genl2"
Andrew Geissler475cb722020-07-10 16:00:51 -050053
Patrick Williams213cb262021-08-07 19:21:33 -050054RDEPENDS:${PN}-ptest += "libcheck"
Andrew Geisslerd5838332022-05-27 11:33:10 -050055RRECOMMENDS:${PN}-ptest += "kernel-module-dummy kernel-module-bonding"
Andrew Geissler90fd73c2021-03-05 15:25:55 -060056DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'libcheck', '', d)}"
57
58# make sure the tests don't link against wrong so file
59EXTRA_OECONF += "${@bb.utils.contains('PTEST_ENABLED', '1', '--disable-rpath', '', d)}"
60
61do_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
67do_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 Geisslerd5838332022-05-27 11:33:10 -050072 # contains build paths
73 rm ${D}${PTEST_PATH}/*.la
Andrew Geissler90fd73c2021-03-05 15:25:55 -060074}
75
Andrew Geissler475cb722020-07-10 16:00:51 -050076BBCLASSEXTEND = "native nativesdk"