From 07b74591945dea02f235b7cad74a81d715cee0d5 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Thu, 11 Jan 2018 20:28:18 +0100 Subject: [PATCH] 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 --- net/asterisk-g72x/Makefile | 50 ++++++++++---------------------------- 1 file changed, 13 insertions(+), 37 deletions(-) diff --git a/net/asterisk-g72x/Makefile b/net/asterisk-g72x/Makefile index 1422719..44de964 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:=1 +PKG_RELEASE:=2 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 @@ -60,52 +62,26 @@ Package/asterisk18-codec-g729/description = $(Package/description/Default) 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),asterisk18) - 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-1.8/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-1.8/include \ - --with-asterisk18 \ - --with-bcg729 \ - --enable-shared \ - $(MAKE_ARGS) + --with-asterisk18 endif 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 -- 2.30.2