2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2003-06-04 20:36:51 +02:00
|
|
|
#
|
|
|
|
# iproute2
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2003-06-04 20:36:51 +02:00
|
|
|
|
2015-07-07 12:31:55 +02:00
|
|
|
IPROUTE2_VERSION = 4.1.1
|
2013-09-06 08:14:15 +02:00
|
|
|
IPROUTE2_SOURCE = iproute2-$(IPROUTE2_VERSION).tar.xz
|
2011-12-05 14:00:42 +01:00
|
|
|
IPROUTE2_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/net/iproute2
|
2015-07-07 12:31:55 +02:00
|
|
|
IPROUTE2_DEPENDENCIES = host-bison host-flex host-pkgconf \
|
|
|
|
$(if $(BR2_PACKAGE_LIBMNL),libmnl)
|
2012-08-13 22:02:39 +02:00
|
|
|
IPROUTE2_LICENSE = GPLv2
|
|
|
|
IPROUTE2_LICENSE_FILES = COPYING
|
2013-03-23 23:26:36 +01:00
|
|
|
|
2011-01-28 15:46:50 +01:00
|
|
|
# If both iproute2 and busybox are selected, make certain we win
|
|
|
|
# the fight over who gets to have their utils actually installed.
|
|
|
|
ifeq ($(BR2_PACKAGE_BUSYBOX),y)
|
|
|
|
IPROUTE2_DEPENDENCIES += busybox
|
|
|
|
endif
|
|
|
|
|
2011-01-10 18:41:25 +01:00
|
|
|
# If we've got iptables enable xtables support for tc
|
2015-05-21 08:07:45 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_IPTABLES)x$(BR2_STATIC_LIBS),yx)
|
2011-01-10 18:41:25 +01:00
|
|
|
IPROUTE2_DEPENDENCIES += iptables
|
|
|
|
define IPROUTE2_WITH_IPTABLES
|
|
|
|
# Makefile is busted so it never passes IPT_LIB_DIR properly
|
|
|
|
$(SED) "s/-DIPT/-DXT/" $(IPROUTE2_DIR)/tc/Makefile
|
|
|
|
endef
|
2012-11-03 16:50:51 +01:00
|
|
|
else
|
|
|
|
define IPROUTE2_WITH_IPTABLES
|
|
|
|
# em_ipset needs xtables, but configure misdetects it
|
|
|
|
echo "TC_CONFIG_IPSET:=n" >>$(IPROUTE2_DIR)/Config
|
2015-05-21 08:07:45 +02:00
|
|
|
echo "TC_CONFIG_XT:=n" >>$(IPROUTE2_DIR)/Config
|
2012-11-03 16:50:51 +01:00
|
|
|
endef
|
2011-01-10 18:41:25 +01:00
|
|
|
endif
|
|
|
|
|
2014-04-28 12:20:27 +02:00
|
|
|
# arpd needs BerkeleyDB and links against pthread
|
|
|
|
ifeq ($(BR2_PACKAGE_BERKELEYDB_COMPAT185)$(BR2_TOOLCHAIN_HAS_THREADS),yy)
|
2013-12-02 01:28:33 +01:00
|
|
|
IPROUTE2_DEPENDENCIES += berkeleydb
|
|
|
|
else
|
|
|
|
define IPROUTE2_DISABLE_ARPD
|
|
|
|
$(SED) "/^TARGETS=/s: arpd : :" $(IPROUTE2_DIR)/misc/Makefile
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
|
|
|
# ifcfg needs bash
|
|
|
|
ifeq ($(BR2_PACKAGE_BASH),)
|
|
|
|
define IPROUTE2_REMOVE_IFCFG
|
|
|
|
rm -f $(TARGET_DIR)/sbin/ifcfg
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
2010-09-23 14:53:23 +02:00
|
|
|
define IPROUTE2_CONFIGURE_CMDS
|
2012-11-03 09:21:25 +01:00
|
|
|
$(SED) 's/gcc/$$CC $$CFLAGS/g' $(@D)/configure
|
|
|
|
cd $(@D) && $(TARGET_CONFIGURE_OPTS) ./configure
|
2013-12-02 01:28:33 +01:00
|
|
|
$(IPROUTE2_DISABLE_ARPD)
|
2011-01-10 18:41:25 +01:00
|
|
|
$(IPROUTE2_WITH_IPTABLES)
|
2015-06-29 14:45:54 +02:00
|
|
|
$(IPROUTE2_DISABLE_TIPC)
|
2010-09-23 14:53:23 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define IPROUTE2_BUILD_CMDS
|
2011-07-22 17:27:29 +02:00
|
|
|
$(SED) 's/$$(CCOPTS)//' $(@D)/netem/Makefile
|
2015-05-21 17:32:24 +02:00
|
|
|
$(TARGET_MAKE_ENV) LDFLAGS="$(TARGET_LDFLAGS)" $(MAKE) \
|
2013-12-02 01:28:33 +01:00
|
|
|
DBM_INCLUDE="$(STAGING_DIR)/usr/include" \
|
2015-05-07 09:20:12 +02:00
|
|
|
CCOPTS="$(TARGET_CFLAGS) -D_GNU_SOURCE" \
|
|
|
|
SHARED_LIBS="$(if $(BR2_STATIC_LIBS),n,y)" -C $(@D)
|
2010-09-23 14:53:23 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define IPROUTE2_INSTALL_TARGET_CMDS
|
2013-03-23 23:26:36 +01:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" \
|
|
|
|
SBINDIR=/sbin \
|
2010-09-23 14:53:23 +02:00
|
|
|
DOCDIR=/usr/share/doc/iproute2-$(IPROUTE2_VERSION) \
|
|
|
|
MANDIR=/usr/share/man install
|
2013-12-02 01:28:33 +01:00
|
|
|
$(IPROUTE2_REMOVE_IFCFG)
|
2010-09-23 14:53:23 +02:00
|
|
|
endef
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(generic-package))
|