From ea4c9664ecf59550e14016d2333f3c78e417c34f Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Wed, 27 Sep 2017 15:27:12 +0200 Subject: [PATCH] asterisk-13.x: Store headers for chan-lantiq Store asterisk headers in $(DL_DIR) so chan-lantiq can access them during the target specific build phase. The headers are tarred up for "mips_24kc" only because that is currently the only used arch for all chan-lantiq targets. Store one archive for each combination of asterisk version (e.g. 13) and branch (using $(VERSION_NUMBER)). The latter makes sure that a release build doesn't overwrite the header archive of a master snapshot build and vice vera. Signed-off-by: Sebastian Kemper --- net/asterisk-13.x/Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/net/asterisk-13.x/Makefile b/net/asterisk-13.x/Makefile index 92fe9fa..c2e628d 100644 --- a/net/asterisk-13.x/Makefile +++ b/net/asterisk-13.x/Makefile @@ -26,6 +26,7 @@ PKG_MAINTAINER:=Jiri Slachta include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/version.mk define Package/asterisk13/install/module $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules @@ -280,10 +281,25 @@ define Build/Compile $(call Build/Compile/Default,all install samples) endef +# Tar up the headers for chan-lantiq and store them in $(DL_DIR). This is a +# workaround for a hen and egg problem: chan-lantiq is a nonshared (target +# specific) package. It depends on both kernel module and asterisk headers. But +# the build bots will not build shared packages (e.g. asterisk) when building +# the target specific packages because the shared packages are not selected by +# CONFIG_ALL_NONSHARED=y. + +# The workaround stores the asterisk headers in $(DL_DIR) where chan-lantiq can +# access them. + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/asterisk-13/include/asterisk/ $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk/*.h $(1)/usr/include/asterisk-13/include/asterisk/ $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk.h $(1)/usr/include/asterisk-13/include/ +ifeq ($(CONFIG_TARGET_ARCH_PACKAGES),"mips_24kc") + $(TAR) --create --xz \ + --file=$(DL_DIR)/$(PKG_NAME)-$(call qstrip,$(CONFIG_TARGET_ARCH_PACKAGES))-headers-for-chan-lantiq-$(VERSION_NUMBER).tar.xz \ + --directory=$(PKG_INSTALL_DIR)/usr include +endif endef $(eval $(call BuildPackage,asterisk13)) -- 2.30.2