Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "TCP / IP networking and traffic control utilities" |
| 2 | DESCRIPTION = "Iproute2 is a collection of utilities for controlling \ |
| 3 | TCP / IP networking and traffic control in Linux. Of the utilities ip \ |
| 4 | and tc are the most important. ip controls IPv4 and IPv6 \ |
| 5 | configuration and tc stands for traffic control." |
| 6 | HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2" |
| 7 | SECTION = "base" |
| 8 | LICENSE = "GPLv2+" |
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ |
| 10 | file://ip/ip.c;beginline=3;endline=8;md5=689d691d0410a4b64d3899f8d6e31817" |
| 11 | |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame] | 12 | DEPENDS = "flex-native bison-native iptables libcap" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 13 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 14 | inherit update-alternatives bash-completion pkgconfig |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 15 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 16 | CLEANBROKEN = "1" |
| 17 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 18 | PACKAGECONFIG ??= "tipc elf devlink" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 19 | PACKAGECONFIG[tipc] = ",,libmnl," |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame] | 20 | PACKAGECONFIG[elf] = ",,elfutils," |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 21 | PACKAGECONFIG[devlink] = ",,libmnl," |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 22 | PACKAGECONFIG[rdma] = ",,libmnl," |
| 23 | |
| 24 | IPROUTE2_MAKE_SUBDIRS = "lib tc ip bridge misc genl ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc rdma', d)}" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 25 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 26 | EXTRA_OEMAKE = "\ |
| 27 | CC='${CC}' \ |
| 28 | KERNEL_INCLUDE=${STAGING_INCDIR} \ |
| 29 | DOCDIR=${docdir}/iproute2 \ |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 30 | SUBDIRS='${IPROUTE2_MAKE_SUBDIRS}' \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 31 | SBINDIR='${base_sbindir}' \ |
| 32 | LIBDIR='${libdir}' \ |
| 33 | " |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 34 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 35 | do_configure:append () { |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 36 | sh configure ${STAGING_INCDIR} |
| 37 | # Explicitly disable ATM support |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 38 | sed -i -e '/TC_CONFIG_ATM/d' config.mk |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 39 | } |
| 40 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 41 | do_install () { |
| 42 | oe_runmake DESTDIR=${D} install |
| 43 | mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2 |
| 44 | install -d ${D}${datadir} |
| 45 | mv ${D}/share/* ${D}${datadir}/ || true |
| 46 | rm ${D}/share -rf || true |
| 47 | } |
| 48 | |
| 49 | # The .so files in iproute2-tc are modules, not traditional libraries |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 50 | INSANE_SKIP:${PN}-tc = "dev-so" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 51 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 52 | IPROUTE2_PACKAGES =+ "\ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 53 | ${PN}-devlink \ |
| 54 | ${PN}-genl \ |
| 55 | ${PN}-ifstat \ |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 56 | ${PN}-ip \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 57 | ${PN}-lnstat \ |
| 58 | ${PN}-nstat \ |
| 59 | ${PN}-rtacct \ |
| 60 | ${PN}-ss \ |
| 61 | ${PN}-tc \ |
| 62 | ${PN}-tipc \ |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 63 | ${PN}-rdma \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 64 | " |
| 65 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 66 | PACKAGE_BEFORE_PN = "${IPROUTE2_PACKAGES}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 67 | RDEPENDS:${PN} += "${PN}-ip" |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 68 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 69 | FILES:${PN}-tc = "${base_sbindir}/tc* \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 70 | ${libdir}/tc/*.so" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 71 | FILES:${PN}-lnstat = "${base_sbindir}/lnstat \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 72 | ${base_sbindir}/ctstat \ |
| 73 | ${base_sbindir}/rtstat" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 74 | FILES:${PN}-ifstat = "${base_sbindir}/ifstat" |
| 75 | FILES:${PN}-ip = "${base_sbindir}/ip.${PN} ${sysconfdir}/iproute2" |
| 76 | FILES:${PN}-genl = "${base_sbindir}/genl" |
| 77 | FILES:${PN}-rtacct = "${base_sbindir}/rtacct" |
| 78 | FILES:${PN}-nstat = "${base_sbindir}/nstat" |
| 79 | FILES:${PN}-ss = "${base_sbindir}/ss" |
| 80 | FILES:${PN}-tipc = "${base_sbindir}/tipc" |
| 81 | FILES:${PN}-devlink = "${base_sbindir}/devlink" |
| 82 | FILES:${PN}-rdma = "${base_sbindir}/rdma" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 83 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 84 | ALTERNATIVE:${PN}-ip = "ip" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 85 | ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}" |
| 86 | ALTERNATIVE_LINK_NAME[ip] = "${base_sbindir}/ip" |
| 87 | ALTERNATIVE_PRIORITY = "100" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 88 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 89 | ALTERNATIVE:${PN}-tc = "tc" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 90 | ALTERNATIVE_LINK_NAME[tc] = "${base_sbindir}/tc" |
| 91 | ALTERNATIVE_PRIORITY_${PN}-tc = "100" |