Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [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 = "GPL-2.0-or-later" |
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ |
| 10 | file://ip/ip.c;beginline=3;endline=8;md5=689d691d0410a4b64d3899f8d6e31817" |
| 11 | |
| 12 | DEPENDS = "flex-native bison-native iptables libcap" |
| 13 | |
| 14 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \ |
| 15 | file://0001-libc-compat.h-add-musl-workaround.patch \ |
| 16 | " |
| 17 | |
| 18 | SRC_URI[sha256sum] = "5ce12a0fec6b212725ef218735941b2dab76244db7e72646a76021b0537b43ab" |
| 19 | |
| 20 | inherit update-alternatives bash-completion pkgconfig |
| 21 | |
| 22 | PACKAGECONFIG ??= "tipc elf devlink" |
| 23 | PACKAGECONFIG[tipc] = ",,libmnl," |
| 24 | PACKAGECONFIG[elf] = ",,elfutils," |
| 25 | PACKAGECONFIG[devlink] = ",,libmnl," |
| 26 | PACKAGECONFIG[rdma] = ",,libmnl," |
| 27 | PACKAGECONFIG[selinux] = ",,libselinux" |
| 28 | |
| 29 | IPROUTE2_MAKE_SUBDIRS = "lib tc ip bridge misc genl ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc rdma', d)}" |
| 30 | |
| 31 | # CFLAGS are computed in Makefile and reference CCOPTS |
| 32 | # |
| 33 | EXTRA_OEMAKE = "\ |
| 34 | CC='${CC}' \ |
| 35 | KERNEL_INCLUDE=${STAGING_INCDIR} \ |
| 36 | DOCDIR=${docdir}/iproute2 \ |
| 37 | SUBDIRS='${IPROUTE2_MAKE_SUBDIRS}' \ |
| 38 | SBINDIR='${base_sbindir}' \ |
| 39 | LIBDIR='${libdir}' \ |
| 40 | CCOPTS='${CFLAGS}' \ |
| 41 | " |
| 42 | |
| 43 | do_configure:append () { |
| 44 | sh configure ${STAGING_INCDIR} |
| 45 | # Explicitly disable ATM support |
| 46 | sed -i -e '/TC_CONFIG_ATM/d' config.mk |
| 47 | } |
| 48 | |
| 49 | do_install () { |
| 50 | oe_runmake DESTDIR=${D} install |
| 51 | mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2 |
| 52 | install -d ${D}${datadir} |
| 53 | mv ${D}/share/* ${D}${datadir}/ || true |
| 54 | rm ${D}/share -rf || true |
| 55 | } |
| 56 | |
| 57 | # The .so files in iproute2-tc are modules, not traditional libraries |
| 58 | INSANE_SKIP:${PN}-tc = "dev-so" |
| 59 | |
| 60 | IPROUTE2_PACKAGES =+ "\ |
| 61 | ${PN}-devlink \ |
| 62 | ${PN}-genl \ |
| 63 | ${PN}-ifstat \ |
| 64 | ${PN}-ip \ |
| 65 | ${PN}-lnstat \ |
| 66 | ${PN}-nstat \ |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 67 | ${PN}-routel \ |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 68 | ${PN}-rtacct \ |
| 69 | ${PN}-ss \ |
| 70 | ${PN}-tc \ |
| 71 | ${PN}-tipc \ |
| 72 | ${PN}-rdma \ |
| 73 | " |
| 74 | |
| 75 | PACKAGE_BEFORE_PN = "${IPROUTE2_PACKAGES}" |
| 76 | RDEPENDS:${PN} += "${PN}-ip" |
| 77 | |
| 78 | FILES:${PN}-tc = "${base_sbindir}/tc* \ |
| 79 | ${libdir}/tc/*.so" |
| 80 | FILES:${PN}-lnstat = "${base_sbindir}/lnstat \ |
| 81 | ${base_sbindir}/ctstat \ |
| 82 | ${base_sbindir}/rtstat" |
| 83 | FILES:${PN}-ifstat = "${base_sbindir}/ifstat" |
| 84 | FILES:${PN}-ip = "${base_sbindir}/ip.${PN} ${sysconfdir}/iproute2" |
| 85 | FILES:${PN}-genl = "${base_sbindir}/genl" |
| 86 | FILES:${PN}-rtacct = "${base_sbindir}/rtacct" |
| 87 | FILES:${PN}-nstat = "${base_sbindir}/nstat" |
| 88 | FILES:${PN}-ss = "${base_sbindir}/ss" |
| 89 | FILES:${PN}-tipc = "${base_sbindir}/tipc" |
| 90 | FILES:${PN}-devlink = "${base_sbindir}/devlink" |
| 91 | FILES:${PN}-rdma = "${base_sbindir}/rdma" |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 92 | FILES:${PN}-routel = "${base_sbindir}/routel" |
| 93 | |
| 94 | RDEPENDS:${PN}-routel = "python3-core" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 95 | |
| 96 | ALTERNATIVE:${PN}-ip = "ip" |
| 97 | ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}" |
| 98 | ALTERNATIVE_LINK_NAME[ip] = "${base_sbindir}/ip" |
| 99 | ALTERNATIVE_PRIORITY = "100" |
| 100 | |
| 101 | ALTERNATIVE:${PN}-tc = "tc" |
| 102 | ALTERNATIVE_LINK_NAME[tc] = "${base_sbindir}/tc" |
| 103 | ALTERNATIVE_PRIORITY_${PN}-tc = "100" |