blob: af3aa41040198b893dfac7a590f8d6bdd59ad48f [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 Geissler90fd73c2021-03-05 15:25:55 -060017SRC_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 \
Andrew Geisslerd5838332022-05-27 11:33:10 -050021 file://fa7f97f8982544c4fcb403893bae6701230d5165.patch \
Andrew Geissler90fd73c2021-03-05 15:25:55 -060022 "
23
Andrew Geisslerd5838332022-05-27 11:33:10 -050024SRC_URI[sha256sum] = "532155fd011e5a805bd67121b87a01c757e2bb24112ac17e69cb86013b970009"
Brad Bishop316dfdd2018-06-25 12:45:53 -040025
Andrew Geissler90fd73c2021-03-05 15:25:55 -060026
Brad Bishop316dfdd2018-06-25 12:45:53 -040027UPSTREAM_CHECK_URI = "https://github.com/thom311/${BPN}/releases"
28
Andrew Geissler90fd73c2021-03-05 15:25:55 -060029inherit autotools pkgconfig ptest
Brad Bishop316dfdd2018-06-25 12:45:53 -040030
Patrick Williams213cb262021-08-07 19:21:33 -050031FILES:${PN} = "${libdir}/libnl-3.so.* \
Brad Bishop316dfdd2018-06-25 12:45:53 -040032 ${libdir}/libnl.so.* \
33 ${sysconfdir}"
Patrick Williams213cb262021-08-07 19:21:33 -050034RREPLACES:${PN} = "libnl2"
35RCONFLICTS:${PN} = "libnl2"
Andrew Geissler90fd73c2021-03-05 15:25:55 -060036
Patrick Williams213cb262021-08-07 19:21:33 -050037FILES:${PN}-dev += "${libdir}/libnl/cli/*/*.la"
38FILES:${PN}-staticdev += "${libdir}/libnl/cli/*/*.a"
Brad Bishop316dfdd2018-06-25 12:45:53 -040039
40PACKAGES += "${PN}-cli ${PN}-genl ${PN}-idiag ${PN}-nf ${PN}-route ${PN}-xfrm"
Patrick Williams213cb262021-08-07 19:21:33 -050041FILES:${PN}-cli = "${libdir}/libnl-cli-3.so.* \
Brad Bishop316dfdd2018-06-25 12:45:53 -040042 ${libdir}/libnl/cli/*/*.so \
43 ${bindir}/genl-ctrl-list \
44 ${bindir}/idiag-socket-details \
45 ${bindir}/nf-* \
46 ${bindir}/nl-*"
Patrick Williams213cb262021-08-07 19:21:33 -050047FILES:${PN}-genl = "${libdir}/libnl-genl-3.so.* \
Brad Bishop316dfdd2018-06-25 12:45:53 -040048 ${libdir}/libnl-genl.so.*"
Patrick Williams213cb262021-08-07 19:21:33 -050049FILES:${PN}-idiag = "${libdir}/libnl-idiag-3.so.*"
50FILES:${PN}-nf = "${libdir}/libnl-nf-3.so.*"
51FILES:${PN}-route = "${libdir}/libnl-route-3.so.*"
52FILES:${PN}-xfrm = "${libdir}/libnl-xfrm-3.so.*"
53RREPLACES:${PN}-genl = "libnl-genl2"
54RCONFLICTS:${PN}-genl = "libnl-genl2"
Andrew Geissler475cb722020-07-10 16:00:51 -050055
Patrick Williams213cb262021-08-07 19:21:33 -050056RDEPENDS:${PN}-ptest += "libcheck"
Andrew Geisslerd5838332022-05-27 11:33:10 -050057RRECOMMENDS:${PN}-ptest += "kernel-module-dummy kernel-module-bonding"
Andrew Geissler90fd73c2021-03-05 15:25:55 -060058DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'libcheck', '', d)}"
59
60# make sure the tests don't link against wrong so file
61EXTRA_OECONF += "${@bb.utils.contains('PTEST_ENABLED', '1', '--disable-rpath', '', d)}"
62
63do_compile_ptest() {
64 # hack to remove the call to `make runtest-TESTS`
65 sed -i 's/$(MAKE) $(AM_MAKEFLAGS) runtest-TESTS//g' Makefile
66 oe_runmake check
67}
68
69do_install_ptest(){
70 # legacy? tests are also installed, but ptest-runner will not run them
71 # upstream are not running these tests in their CI pipeline
72 # issue opened https://github.com/thom311/libnl/issues/270
73 install -m 0755 tests/.libs/* ${D}${PTEST_PATH}/
Andrew Geisslerd5838332022-05-27 11:33:10 -050074 # contains build paths
75 rm ${D}${PTEST_PATH}/*.la
Andrew Geissler90fd73c2021-03-05 15:25:55 -060076}
77
Andrew Geissler475cb722020-07-10 16:00:51 -050078BBCLASSEXTEND = "native nativesdk"