blob: d72871767f9c89a857c2e9e4881746a907fa34cf [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 Bishop1a4b7ee2018-12-16 17:11:34 -080012DEPENDS = "flex-native bison-native iptables elfutils 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 Bishopd7bf8c12018-02-25 22:55:05 -050018PACKAGECONFIG ??= "tipc"
19PACKAGECONFIG[tipc] = ",,libmnl,"
20
Brad Bishopc342db32019-05-15 21:57:59 -040021EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl \
22 ${@bb.utils.contains('PACKAGECONFIG', 'tipc', 'tipc', '', d)}' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050023
Patrick Williamsf1e5d692016-03-30 15:21:19 -050024do_configure_append () {
25 sh configure ${STAGING_INCDIR}
26 # Explicitly disable ATM support
Brad Bishop316dfdd2018-06-25 12:45:53 -040027 sed -i -e '/TC_CONFIG_ATM/d' config.mk
Patrick Williamsf1e5d692016-03-30 15:21:19 -050028}
29
Patrick Williamsc124f4f2015-09-15 14:41:29 -050030do_install () {
31 oe_runmake DESTDIR=${D} install
32 mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2
33 install -d ${D}${datadir}
34 mv ${D}/share/* ${D}${datadir}/ || true
35 rm ${D}/share -rf || true
36}
37
38# The .so files in iproute2-tc are modules, not traditional libraries
39INSANE_SKIP_${PN}-tc = "dev-so"
40
Brad Bishopc342db32019-05-15 21:57:59 -040041PACKAGES =+ "${PN}-tc \
42 ${PN}-lnstat \
43 ${PN}-ifstat \
44 ${PN}-genl \
45 ${PN}-rtacct \
46 ${PN}-nstat \
47 ${PN}-ss \
48 ${@bb.utils.contains('PACKAGECONFIG', 'tipc', '${PN}-tipc', '', d)}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050049FILES_${PN}-tc = "${base_sbindir}/tc* \
50 ${libdir}/tc/*.so"
Brad Bishopc342db32019-05-15 21:57:59 -040051FILES_${PN}-lnstat = "${base_sbindir}/lnstat \
52 ${base_sbindir}/ctstat \
53 ${base_sbindir}/rtstat"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050054FILES_${PN}-ifstat = "${base_sbindir}/ifstat"
55FILES_${PN}-genl = "${base_sbindir}/genl"
56FILES_${PN}-rtacct = "${base_sbindir}/rtacct"
57FILES_${PN}-nstat = "${base_sbindir}/nstat"
58FILES_${PN}-ss = "${base_sbindir}/ss"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050059FILES_${PN}-tipc = "${base_sbindir}/tipc"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050060
61ALTERNATIVE_${PN} = "ip"
62ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}"
63ALTERNATIVE_LINK_NAME[ip] = "${base_sbindir}/ip"
64ALTERNATIVE_PRIORITY = "100"
Brad Bishop19323692019-04-05 15:28:33 -040065
66ALTERNATIVE_${PN}-tc = "tc"
67ALTERNATIVE_LINK_NAME[tc] = "${base_sbindir}/tc"
68ALTERNATIVE_PRIORITY_${PN}-tc = "100"