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 <sebastian_ml@gmx.net>
This commit is contained in:
Sebastian Kemper 2017-09-27 15:27:12 +02:00
parent df172b998a
commit ea4c9664ec

View file

@ -26,6 +26,7 @@ PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/version.mk
define Package/asterisk13/install/module define Package/asterisk13/install/module
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
@ -280,10 +281,25 @@ define Build/Compile
$(call Build/Compile/Default,all install samples) $(call Build/Compile/Default,all install samples)
endef 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 define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/asterisk-13/include/asterisk/ $(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/asterisk/
$(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk.h $(1)/usr/include/asterisk-13/include/ $(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 endef
$(eval $(call BuildPackage,asterisk13)) $(eval $(call BuildPackage,asterisk13))