Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [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 = "GPLv2+" |
| 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 elfutils" |
| 13 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 14 | inherit update-alternatives bash-completion pkgconfig |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 15 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 16 | CLEANBROKEN = "1" |
| 17 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 18 | PACKAGECONFIG ??= "tipc" |
| 19 | PACKAGECONFIG[tipc] = ",,libmnl," |
| 20 | |
| 21 | EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl ${@bb.utils.contains('PACKAGECONFIG', 'tipc', 'tipc', '', d)}' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 22 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 23 | do_configure_append () { |
| 24 | sh configure ${STAGING_INCDIR} |
| 25 | # Explicitly disable ATM support |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 26 | sed -i -e '/TC_CONFIG_ATM/d' config.mk |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 27 | } |
| 28 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 29 | do_install () { |
| 30 | oe_runmake DESTDIR=${D} install |
| 31 | mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2 |
| 32 | install -d ${D}${datadir} |
| 33 | mv ${D}/share/* ${D}${datadir}/ || true |
| 34 | rm ${D}/share -rf || true |
| 35 | } |
| 36 | |
| 37 | # The .so files in iproute2-tc are modules, not traditional libraries |
| 38 | INSANE_SKIP_${PN}-tc = "dev-so" |
| 39 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 40 | PACKAGES =+ "${PN}-tc ${PN}-lnstat ${PN}-ifstat ${PN}-genl ${PN}-rtacct ${PN}-nstat ${PN}-ss ${@bb.utils.contains('PACKAGECONFIG', 'tipc', '${PN}-tipc', '', d)}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 41 | FILES_${PN}-tc = "${base_sbindir}/tc* \ |
| 42 | ${libdir}/tc/*.so" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 43 | FILES_${PN}-lnstat = "${base_sbindir}/lnstat ${base_sbindir}/ctstat ${base_sbindir}/rtstat" |
| 44 | FILES_${PN}-ifstat = "${base_sbindir}/ifstat" |
| 45 | FILES_${PN}-genl = "${base_sbindir}/genl" |
| 46 | FILES_${PN}-rtacct = "${base_sbindir}/rtacct" |
| 47 | FILES_${PN}-nstat = "${base_sbindir}/nstat" |
| 48 | FILES_${PN}-ss = "${base_sbindir}/ss" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 49 | FILES_${PN}-tipc = "${base_sbindir}/tipc" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 50 | |
| 51 | ALTERNATIVE_${PN} = "ip" |
| 52 | ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}" |
| 53 | ALTERNATIVE_LINK_NAME[ip] = "${base_sbindir}/ip" |
| 54 | ALTERNATIVE_PRIORITY = "100" |