iproute2: always use -DHAVE_SETNS, since the old uclibc is gone now
[openwrt/staging/yousong.git] / package / network / utils / iproute2 / Makefile
index 56d2897e2a6b92fa327632e0eaaf598434d88216..e5015dbdfc25856bcc8766342ea6eb7521beada2 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=iproute2
-PKG_VERSION:=3.19.0
-PKG_RELEASE:=1
+PKG_VERSION:=4.0.0
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://kernel.org/pub/linux/utils/net/iproute2/
-PKG_MD5SUM:=237083a1e3c388cde7a115a5724dc72a
+PKG_MD5SUM:=3adc263ade4ee76c35032e8f50b54108
 PKG_BUILD_PARALLEL:=1
 PKG_LICENSE:=GPL-2.0
 
@@ -39,10 +39,6 @@ endef
 
 Package/ip-full=$(call Package/iproute2/Default,full,Full)
 
-define Package/ip/conffiles
-/etc/iproute2/rt_tables
-endef
-
 define Package/ip-$(BUILD_VARIANT)/conffiles
 $(Package/ip/conffiles)
 endef
@@ -82,22 +78,14 @@ define Build/Configure
                > $(PKG_BUILD_DIR)/include/SNAPSHOT.h
 endef
 
-ifdef CONFIG_USE_EGLIBC
-  ifndef CONFIG_EGLIBC_VERSION_2_13
-    TARGET_CFLAGS += -DHAVE_SETNS
-  endif
-endif
-ifdef CONFIG_USE_MUSL
-  TARGET_CFLAGS += -DHAVE_SETNS
-endif
-
+TARGET_CFLAGS += -DHAVE_SETNS
 TARGET_CFLAGS += -ffunction-sections -fdata-sections
 
 MAKE_FLAGS += \
        EXTRA_CCOPTS="$(TARGET_CFLAGS) -I../include -I$(STAGING_DIR)/usr/include/libnl-tiny" \
        KERNEL_INCLUDE="$(LINUX_DIR)/include" \
        SHARED_LIBS="" \
-       LDFLAGS="-Wl,--gc-sections" \
+       LDFLAGS="$(TARGET_LDFLAGS) -Wl,--gc-sections" \
        IP_CONFIG_TINY=$(IP_CONFIG_TINY) \
        FPIC="$(FPIC)"
 
@@ -113,14 +101,13 @@ define Build/InstallDev
 endef
 
 define Package/ip/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_DIR) $(1)/etc/iproute2
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/iproute2/rt_tables $(1)/etc/iproute2
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/usr/bin/
 endef
 
-define Package/ip-$(BUILD_VARIANT)/install
-       $(Package/ip/install)
+define Package/ip-full/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/usr/sbin/
 endef
 
 define Package/tc/install