developer | 7e3f865 | 2024-02-19 15:54:17 +0800 | [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 | " |
| 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] = "ff942dd9828d7d1f867f61fe72ce433078c31e5d8e4a78e20f02cb5892e8841d" |
| 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 | CONF_USR_DIR='${libdir}/iproute2' \ |
| 40 | LIBDIR='${libdir}' \ |
| 41 | CCOPTS='${CFLAGS}' \ |
| 42 | " |
| 43 | |
| 44 | do_configure:append () { |
| 45 | sh configure ${STAGING_INCDIR} |
| 46 | # Explicitly disable ATM support |
| 47 | sed -i -e '/TC_CONFIG_ATM/d' config.mk |
| 48 | } |
| 49 | |
| 50 | do_install () { |
| 51 | oe_runmake DESTDIR=${D} install |
| 52 | mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2 |
| 53 | install -d ${D}${datadir} |
| 54 | mv ${D}/share/* ${D}${datadir}/ || true |
| 55 | rm ${D}/share -rf || true |
| 56 | } |
| 57 | |
| 58 | # The .so files in iproute2-tc are modules, not traditional libraries |
| 59 | INSANE_SKIP:${PN}-tc = "dev-so" |
| 60 | |
| 61 | IPROUTE2_PACKAGES =+ "\ |
| 62 | ${PN}-devlink \ |
| 63 | ${PN}-genl \ |
| 64 | ${PN}-ifstat \ |
| 65 | ${PN}-ip \ |
| 66 | ${PN}-lnstat \ |
| 67 | ${PN}-nstat \ |
| 68 | ${PN}-routel \ |
| 69 | ${PN}-rtacct \ |
| 70 | ${PN}-ss \ |
| 71 | ${PN}-tc \ |
| 72 | ${PN}-tipc \ |
| 73 | ${PN}-rdma \ |
| 74 | " |
| 75 | |
| 76 | PACKAGE_BEFORE_PN = "${IPROUTE2_PACKAGES}" |
| 77 | RDEPENDS:${PN} += "${PN}-ip" |
| 78 | |
| 79 | FILES:${PN}-tc = "${base_sbindir}/tc* \ |
| 80 | ${libdir}/tc/*.so" |
| 81 | FILES:${PN}-lnstat = "${base_sbindir}/lnstat \ |
| 82 | ${base_sbindir}/ctstat \ |
| 83 | ${base_sbindir}/rtstat" |
| 84 | FILES:${PN}-ifstat = "${base_sbindir}/ifstat" |
| 85 | FILES:${PN}-ip = "${base_sbindir}/ip.* ${libdir}/iproute2" |
| 86 | FILES:${PN}-genl = "${base_sbindir}/genl" |
| 87 | FILES:${PN}-rtacct = "${base_sbindir}/rtacct" |
| 88 | FILES:${PN}-nstat = "${base_sbindir}/nstat" |
| 89 | FILES:${PN}-ss = "${base_sbindir}/ss" |
| 90 | FILES:${PN}-tipc = "${base_sbindir}/tipc" |
| 91 | FILES:${PN}-devlink = "${base_sbindir}/devlink" |
| 92 | FILES:${PN}-rdma = "${base_sbindir}/rdma" |
| 93 | FILES:${PN}-routel = "${base_sbindir}/routel" |
| 94 | |
| 95 | RDEPENDS:${PN}-routel = "python3-core" |
| 96 | |
| 97 | ALTERNATIVE:${PN}-ip = "ip" |
| 98 | ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}" |
| 99 | ALTERNATIVE_LINK_NAME[ip] = "${base_sbindir}/ip" |
| 100 | ALTERNATIVE_PRIORITY = "100" |
| 101 | |
| 102 | ALTERNATIVE:${PN}-tc = "tc" |
| 103 | ALTERNATIVE_LINK_NAME[tc] = "${base_sbindir}/tc" |
| 104 | ALTERNATIVE_PRIORITY_${PN}-tc = "100" |