From: Sebastian Kemper Date: Tue, 16 Jan 2018 19:35:59 +0000 (+0100) Subject: asterisk-g72x: fix variant build X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c0f85ec888014988cee25e393a7cf8e2b68959bd;p=feed%2Ftelephony.git asterisk-g72x: fix variant build Currently variant building isn't working properly because PKG_BUILD_DIR is not set. This commit fixes that. It also cleans up the Makefile, making it much simpler. The cleanups are already in master. Signed-off-by: Sebastian Kemper --- diff --git a/net/asterisk-g72x/Makefile b/net/asterisk-g72x/Makefile index 0f9578a..1aeff1f 100644 --- a/net/asterisk-g72x/Makefile +++ b/net/asterisk-g72x/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=asterisk-g72x PKG_VERSION:=1.3 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=asterisk-g72x-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://asterisk.hosting.lv/src/ @@ -23,6 +23,8 @@ PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILES:=README.md PKG_MAINTAINER:=Alex Samorukov +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + include $(INCLUDE_DIR)/package.mk define Package/asterisk-g72x/Default @@ -53,36 +55,20 @@ endef Package/asterisk11-codec-g729/description = $(Package/description/Default) Package/asterisk13-codec-g729/description = $(Package/description/Default) +CONFIGURE_ARGS += \ + --with-bcg729 \ + --enable-shared + ifeq ($(BUILD_VARIANT),asterisk11) - MAKE_ARGS:= \ - CC="$(TARGET_CC)" \ - LD="$(TARGET_LD)" \ - CFLAGS="$(TARGET_CFLAGS) -DASTERISK_VERSION_NUM=110000 -DLOW_MEMORY -D_XOPEN_SOURCE=600 $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/asterisk-11/include -DHAVE_CONFIG_H -I. -fPIC" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" - - CONFIGURE_ARGS+=\ +CONFIGURE_ARGS += \ --with-asterisk-includes=$(STAGING_DIR)/usr/include/asterisk-11/include \ - --with-asterisk100 \ - --with-bcg729 \ - --enable-shared \ - $(MAKE_ARGS) + --with-asterisk100 endif ifeq ($(BUILD_VARIANT),asterisk13) - MAKE_ARGS:= \ - CC="$(TARGET_CC)" \ - LD="$(TARGET_LD)" \ - CFLAGS="$(TARGET_CFLAGS) -DASTERISK_VERSION_NUM=130000 -DLOW_MEMORY -D_XOPEN_SOURCE=600 $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/asterisk-13/include -DHAVE_CONFIG_H -I. -fPIC" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" - - CONFIGURE_ARGS+=\ +CONFIGURE_ARGS += \ --with-asterisk-includes=$(STAGING_DIR)/usr/include/asterisk-13/include \ - --with-asterisk130 \ - --with-bcg729 \ - --enable-shared \ - $(MAKE_ARGS) + --with-asterisk130 endif define Package/Install/Default