blob: fc31b8444ee94779342b9a6e672e6fdef997b336 [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"
8LICENSE = "GPLv2+"
9LIC_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
Brad Bishopf3f93bb2019-10-16 14:33:32 -040018PACKAGECONFIG ??= "tipc elf"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050019PACKAGECONFIG[tipc] = ",,libmnl,"
Brad Bishopf3f93bb2019-10-16 14:33:32 -040020PACKAGECONFIG[elf] = ",,elfutils,"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050021
Brad Bishopc342db32019-05-15 21:57:59 -040022EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl \
23 ${@bb.utils.contains('PACKAGECONFIG', 'tipc', 'tipc', '', d)}' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050024
Patrick Williamsf1e5d692016-03-30 15:21:19 -050025do_configure_append () {
26 sh configure ${STAGING_INCDIR}
27 # Explicitly disable ATM support
Brad Bishop316dfdd2018-06-25 12:45:53 -040028 sed -i -e '/TC_CONFIG_ATM/d' config.mk
Patrick Williamsf1e5d692016-03-30 15:21:19 -050029}
30
Patrick Williamsc124f4f2015-09-15 14:41:29 -050031do_install () {
32 oe_runmake DESTDIR=${D} install
33 mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2
34 install -d ${D}${datadir}
35 mv ${D}/share/* ${D}${datadir}/ || true
36 rm ${D}/share -rf || true
37}
38
39# The .so files in iproute2-tc are modules, not traditional libraries
40INSANE_SKIP_${PN}-tc = "dev-so"
41
Brad Bishopc342db32019-05-15 21:57:59 -040042PACKAGES =+ "${PN}-tc \
43 ${PN}-lnstat \
44 ${PN}-ifstat \
45 ${PN}-genl \
46 ${PN}-rtacct \
47 ${PN}-nstat \
48 ${PN}-ss \
49 ${@bb.utils.contains('PACKAGECONFIG', 'tipc', '${PN}-tipc', '', d)}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050050FILES_${PN}-tc = "${base_sbindir}/tc* \
51 ${libdir}/tc/*.so"
Brad Bishopc342db32019-05-15 21:57:59 -040052FILES_${PN}-lnstat = "${base_sbindir}/lnstat \
53 ${base_sbindir}/ctstat \
54 ${base_sbindir}/rtstat"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050055FILES_${PN}-ifstat = "${base_sbindir}/ifstat"
56FILES_${PN}-genl = "${base_sbindir}/genl"
57FILES_${PN}-rtacct = "${base_sbindir}/rtacct"
58FILES_${PN}-nstat = "${base_sbindir}/nstat"
59FILES_${PN}-ss = "${base_sbindir}/ss"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050060FILES_${PN}-tipc = "${base_sbindir}/tipc"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050061
62ALTERNATIVE_${PN} = "ip"
63ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}"
64ALTERNATIVE_LINK_NAME[ip] = "${base_sbindir}/ip"
65ALTERNATIVE_PRIORITY = "100"
Brad Bishop19323692019-04-05 15:28:33 -040066
67ALTERNATIVE_${PN}-tc = "tc"
68ALTERNATIVE_LINK_NAME[tc] = "${base_sbindir}/tc"
69ALTERNATIVE_PRIORITY_${PN}-tc = "100"