blob: b1bcc1434c7a9ea6ba5520385c901b795decb34a [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "TCP / IP networking and traffic control utilities"
2DESCRIPTION = "Iproute2 is a collection of utilities for controlling \
3TCP / IP networking and traffic control in Linux. Of the utilities ip \
4and tc are the most important. ip controls IPv4 and IPv6 \
5configuration and tc stands for traffic control."
6HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2"
7SECTION = "base"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00008LICENSE = "GPL-2.0-or-later"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05009LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
10 file://ip/ip.c;beginline=3;endline=8;md5=689d691d0410a4b64d3899f8d6e31817"
11
Brad Bishopf3f93bb2019-10-16 14:33:32 -040012DEPENDS = "flex-native bison-native iptables libcap"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050013
Brad Bishop6e60e8b2018-02-01 10:27:11 -050014inherit update-alternatives bash-completion pkgconfig
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015
Brad Bishop316dfdd2018-06-25 12:45:53 -040016CLEANBROKEN = "1"
17
Andrew Geissler82c905d2020-04-13 13:39:40 -050018PACKAGECONFIG ??= "tipc elf devlink"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050019PACKAGECONFIG[tipc] = ",,libmnl,"
Brad Bishopf3f93bb2019-10-16 14:33:32 -040020PACKAGECONFIG[elf] = ",,elfutils,"
Andrew Geissler82c905d2020-04-13 13:39:40 -050021PACKAGECONFIG[devlink] = ",,libmnl,"
Andrew Geisslerd1e89492021-02-12 15:35:20 -060022PACKAGECONFIG[rdma] = ",,libmnl,"
23
24IPROUTE2_MAKE_SUBDIRS = "lib tc ip bridge misc genl ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc rdma', d)}"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050025
Andrew Geissler82c905d2020-04-13 13:39:40 -050026EXTRA_OEMAKE = "\
27 CC='${CC}' \
28 KERNEL_INCLUDE=${STAGING_INCDIR} \
29 DOCDIR=${docdir}/iproute2 \
Andrew Geisslerd1e89492021-02-12 15:35:20 -060030 SUBDIRS='${IPROUTE2_MAKE_SUBDIRS}' \
Andrew Geissler82c905d2020-04-13 13:39:40 -050031 SBINDIR='${base_sbindir}' \
32 LIBDIR='${libdir}' \
33"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050034
Patrick Williams213cb262021-08-07 19:21:33 -050035do_configure:append () {
Patrick Williamsf1e5d692016-03-30 15:21:19 -050036 sh configure ${STAGING_INCDIR}
37 # Explicitly disable ATM support
Brad Bishop316dfdd2018-06-25 12:45:53 -040038 sed -i -e '/TC_CONFIG_ATM/d' config.mk
Patrick Williamsf1e5d692016-03-30 15:21:19 -050039}
40
Patrick Williamsc124f4f2015-09-15 14:41:29 -050041do_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 Williams213cb262021-08-07 19:21:33 -050050INSANE_SKIP:${PN}-tc = "dev-so"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050051
Andrew Geisslerd1e89492021-02-12 15:35:20 -060052IPROUTE2_PACKAGES =+ "\
Andrew Geissler82c905d2020-04-13 13:39:40 -050053 ${PN}-devlink \
54 ${PN}-genl \
55 ${PN}-ifstat \
Andrew Geisslerd1e89492021-02-12 15:35:20 -060056 ${PN}-ip \
Andrew Geissler82c905d2020-04-13 13:39:40 -050057 ${PN}-lnstat \
58 ${PN}-nstat \
59 ${PN}-rtacct \
60 ${PN}-ss \
61 ${PN}-tc \
62 ${PN}-tipc \
Andrew Geisslerd1e89492021-02-12 15:35:20 -060063 ${PN}-rdma \
Andrew Geissler82c905d2020-04-13 13:39:40 -050064"
65
Andrew Geisslerd1e89492021-02-12 15:35:20 -060066PACKAGE_BEFORE_PN = "${IPROUTE2_PACKAGES}"
Patrick Williams213cb262021-08-07 19:21:33 -050067RDEPENDS:${PN} += "${PN}-ip"
Andrew Geisslerd1e89492021-02-12 15:35:20 -060068
Patrick Williams213cb262021-08-07 19:21:33 -050069FILES:${PN}-tc = "${base_sbindir}/tc* \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050070 ${libdir}/tc/*.so"
Patrick Williams213cb262021-08-07 19:21:33 -050071FILES:${PN}-lnstat = "${base_sbindir}/lnstat \
Brad Bishopc342db32019-05-15 21:57:59 -040072 ${base_sbindir}/ctstat \
73 ${base_sbindir}/rtstat"
Patrick Williams213cb262021-08-07 19:21:33 -050074FILES:${PN}-ifstat = "${base_sbindir}/ifstat"
75FILES:${PN}-ip = "${base_sbindir}/ip.${PN} ${sysconfdir}/iproute2"
76FILES:${PN}-genl = "${base_sbindir}/genl"
77FILES:${PN}-rtacct = "${base_sbindir}/rtacct"
78FILES:${PN}-nstat = "${base_sbindir}/nstat"
79FILES:${PN}-ss = "${base_sbindir}/ss"
80FILES:${PN}-tipc = "${base_sbindir}/tipc"
81FILES:${PN}-devlink = "${base_sbindir}/devlink"
82FILES:${PN}-rdma = "${base_sbindir}/rdma"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050083
Patrick Williams213cb262021-08-07 19:21:33 -050084ALTERNATIVE:${PN}-ip = "ip"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050085ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}"
86ALTERNATIVE_LINK_NAME[ip] = "${base_sbindir}/ip"
87ALTERNATIVE_PRIORITY = "100"
Brad Bishop19323692019-04-05 15:28:33 -040088
Patrick Williams213cb262021-08-07 19:21:33 -050089ALTERNATIVE:${PN}-tc = "tc"
Brad Bishop19323692019-04-05 15:28:33 -040090ALTERNATIVE_LINK_NAME[tc] = "${base_sbindir}/tc"
91ALTERNATIVE_PRIORITY_${PN}-tc = "100"