1 ################################################################################
5 ################################################################################
7 IPROUTE2_VERSION
= 4.0.0
8 IPROUTE2_SOURCE
= iproute2-
$(IPROUTE2_VERSION
).
tar.xz
9 IPROUTE2_SITE
= $(BR2_KERNEL_MIRROR
)/linux
/utils
/net
/iproute2
10 IPROUTE2_DEPENDENCIES
= host-bison host-flex host-pkgconf
11 IPROUTE2_LICENSE
= GPLv2
12 IPROUTE2_LICENSE_FILES
= COPYING
14 # If both iproute2 and busybox are selected, make certain we win
15 # the fight over who gets to have their utils actually installed.
16 ifeq ($(BR2_PACKAGE_BUSYBOX
),y
)
17 IPROUTE2_DEPENDENCIES
+= busybox
20 # If we've got iptables enable xtables support for tc
21 ifeq ($(BR2_PACKAGE_IPTABLES
)x
$(BR2_STATIC_LIBS
),yx
)
22 IPROUTE2_DEPENDENCIES
+= iptables
23 define IPROUTE2_WITH_IPTABLES
24 # Makefile is busted so it never passes IPT_LIB_DIR properly
25 $(SED
) "s/-DIPT/-DXT/" $(IPROUTE2_DIR
)/tc
/Makefile
28 define IPROUTE2_WITH_IPTABLES
29 # em_ipset needs xtables, but configure misdetects it
30 echo
"TC_CONFIG_IPSET:=n" >>$(IPROUTE2_DIR
)/Config
31 echo
"TC_CONFIG_XT:=n" >>$(IPROUTE2_DIR
)/Config
35 # arpd needs BerkeleyDB and links against pthread
36 ifeq ($(BR2_PACKAGE_BERKELEYDB_COMPAT185
)$(BR2_TOOLCHAIN_HAS_THREADS
),yy
)
37 IPROUTE2_DEPENDENCIES
+= berkeleydb
39 define IPROUTE2_DISABLE_ARPD
40 $(SED
) "/^TARGETS=/s: arpd : :" $(IPROUTE2_DIR
)/misc
/Makefile
45 ifeq ($(BR2_PACKAGE_BASH
),)
46 define IPROUTE2_REMOVE_IFCFG
47 rm -f
$(TARGET_DIR
)/sbin
/ifcfg
51 define IPROUTE2_CONFIGURE_CMDS
52 $(SED
) 's/gcc/$$CC $$CFLAGS/g' $(@D
)/configure
53 cd
$(@D
) && $(TARGET_CONFIGURE_OPTS
) .
/configure
54 $(IPROUTE2_DISABLE_ARPD
)
55 $(IPROUTE2_WITH_IPTABLES
)
58 define IPROUTE2_BUILD_CMDS
59 $(SED
) 's/$$(CCOPTS)//' $(@D
)/netem
/Makefile
60 $(TARGET_MAKE_ENV
) LDFLAGS
="$(TARGET_LDFLAGS)" $(MAKE
) \
61 DBM_INCLUDE
="$(STAGING_DIR)/usr/include" \
62 CCOPTS
="$(TARGET_CFLAGS) -D_GNU_SOURCE" \
63 SHARED_LIBS
="$(if $(BR2_STATIC_LIBS),n,y)" -C
$(@D
)
66 define IPROUTE2_INSTALL_TARGET_CMDS
67 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
) DESTDIR
="$(TARGET_DIR)" \
69 DOCDIR
=/usr
/share
/doc
/iproute2-
$(IPROUTE2_VERSION
) \
70 MANDIR
=/usr
/share
/man
install
71 $(IPROUTE2_REMOVE_IFCFG
)
74 $(eval
$(generic-package
))