summaryrefslogtreecommitdiff
path: root/package/network/utils/iproute2/Makefile
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-07-21 11:22:09 +0100
committerJo-Philipp Wich <jo@mein.io>2018-07-25 15:49:05 +0200
commit2725ad8de47d4c9e39b466ce2dfe9d7953d40145 (patch)
tree2198fb91715d3af73ef5f8b7dccabceed973d419 /package/network/utils/iproute2/Makefile
parent28d4e55432701a3db2068c357b515fc1b5e44794 (diff)
downloadmtk-20170518-2725ad8de47d4c9e39b466ce2dfe9d7953d40145.zip
mtk-20170518-2725ad8de47d4c9e39b466ce2dfe9d7953d40145.tar.gz
mtk-20170518-2725ad8de47d4c9e39b466ce2dfe9d7953d40145.tar.bz2
iproute2: merge upstream CAKE support
Add upstream support for CAKE into iproute2 and conditionally enable it depending on the build environment we're running under. When running with SDK=1 and CONFIG_BUILDBOT=y we assume that we're invoked by the release package builder at http://release-builds.lede-project.org/17.01/packages/ and produce shared iproute2 executables with legacy CAKE support for older released kernels. When not running under the release package builder environment, produce nonshared packages using the new, upstream CAKE support suitable for the latest kernel. Depending on the environment, suffix the PKG_RELEASE field with either "-cake-legacy" or "-cake-upstream" to ensure that the nonshared packages are preferred by opkg for newer builds. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'package/network/utils/iproute2/Makefile')
-rw-r--r--package/network/utils/iproute2/Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile
index 1f566f0..a260aa4 100644
--- a/package/network/utils/iproute2/Makefile
+++ b/package/network/utils/iproute2/Makefile
@@ -19,6 +19,10 @@ PKG_LICENSE:=GPL-2.0
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+USE_CAKE:=$(if $(filter 1y,$(SDK)$(CONFIG_BUILDBOT)),cake-legacy,cake-upstream)
+PKG_FLAGS:=$(if $(filter cake-upstream,$(USE_CAKE)),nonshared)
+PKG_RELEASE:=$(PKG_RELEASE)-$(USE_CAKE)
+
include $(INCLUDE_DIR)/package.mk
define Package/iproute2/Default
@@ -70,6 +74,14 @@ ifeq ($(BUILD_VARIANT),tiny)
IP_CONFIG_TINY:=y
endif
+PATCH_DIR:=$(PKG_BUILD_DIR)/openwrt-patches
+
+define Build/Patch
+ $(INSTALL_DIR) $(PATCH_DIR)
+ $(CP) ./patches/* ./patches-$(USE_CAKE)/* $(PATCH_DIR)/
+ $(call Build/Patch/Default)
+endef
+
define Build/Configure
$(SED) "s,-I/usr/include/db3,," $(PKG_BUILD_DIR)/Makefile
$(SED) "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_DIR)/include," \