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 | |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame] | 12 | DEPENDS = "flex-native bison-native iptables libcap" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame] | 18 | PACKAGECONFIG ??= "tipc elf" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 19 | PACKAGECONFIG[tipc] = ",,libmnl," |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame] | 20 | PACKAGECONFIG[elf] = ",,elfutils," |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 21 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 22 | EXTRA_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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 24 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 25 | do_configure_append () { |
| 26 | sh configure ${STAGING_INCDIR} |
| 27 | # Explicitly disable ATM support |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 28 | sed -i -e '/TC_CONFIG_ATM/d' config.mk |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 29 | } |
| 30 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 31 | do_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 |
| 40 | INSANE_SKIP_${PN}-tc = "dev-so" |
| 41 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 42 | PACKAGES =+ "${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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 50 | FILES_${PN}-tc = "${base_sbindir}/tc* \ |
| 51 | ${libdir}/tc/*.so" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 52 | FILES_${PN}-lnstat = "${base_sbindir}/lnstat \ |
| 53 | ${base_sbindir}/ctstat \ |
| 54 | ${base_sbindir}/rtstat" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 55 | FILES_${PN}-ifstat = "${base_sbindir}/ifstat" |
| 56 | FILES_${PN}-genl = "${base_sbindir}/genl" |
| 57 | FILES_${PN}-rtacct = "${base_sbindir}/rtacct" |
| 58 | FILES_${PN}-nstat = "${base_sbindir}/nstat" |
| 59 | FILES_${PN}-ss = "${base_sbindir}/ss" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 60 | FILES_${PN}-tipc = "${base_sbindir}/tipc" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 61 | |
| 62 | ALTERNATIVE_${PN} = "ip" |
| 63 | ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}" |
| 64 | ALTERNATIVE_LINK_NAME[ip] = "${base_sbindir}/ip" |
| 65 | ALTERNATIVE_PRIORITY = "100" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 66 | |
| 67 | ALTERNATIVE_${PN}-tc = "tc" |
| 68 | ALTERNATIVE_LINK_NAME[tc] = "${base_sbindir}/tc" |
| 69 | ALTERNATIVE_PRIORITY_${PN}-tc = "100" |