chan-lantiq: revert previous commit
authorSebastian Kemper <sebastian_ml@gmx.net>
Sun, 3 Dec 2017 15:40:18 +0000 (16:40 +0100)
committerSebastian Kemper <sebastian_ml@gmx.net>
Sun, 3 Dec 2017 15:42:14 +0000 (16:42 +0100)
The hack does not work on the buildbots. In the SDK the other packages'
Makefiles and patch directories aren't available, hence the hack fails.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
net/asterisk-chan-lantiq/Makefile

index c5e24163477d8480d77f8ab0641edb4f4a96dc5b..2ab0e804501b7b086eac0d37766097ef190fe3cd 100644 (file)
@@ -20,38 +20,6 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSI
 
 include $(INCLUDE_DIR)/package.mk
 
-LTQ_DIR:=$(TOPDIR)/package/kernel/lantiq
-
-VMMC_PATH:=$(LTQ_DIR)/ltq-vmmc
-TAPI_PATH:=$(LTQ_DIR)/ltq-tapi
-IFXOS_PATH:=$(LTQ_DIR)/ltq-ifxos
-
-LTQ_MIRROR:=https://mirror2.openwrt.org/sources
-
-IFXOS_HASH:=$(shell cat $(IFXOS_PATH)/Makefile | sed -n '/^PKG_HASH:=/s///p')
-IFXOS_VERSION:=$(shell cat $(IFXOS_PATH)/Makefile | sed -n '/^PKG_VERSION:=/s///p')
-IFXOS:=lib_ifxos-$(IFXOS_VERSION)
-IFXOS_ARCHIVE:=$(IFXOS).tar.gz
-
-TAPI_HASH:=$(shell cat $(TAPI_PATH)/Makefile | sed -n '/^PKG_HASH:=/s///p')
-TAPI_VERSION:=$(shell cat $(TAPI_PATH)/Makefile | sed -n '/^PKG_VERSION:=/s///p')
-TAPI:=drv_tapi-$(TAPI_VERSION)
-TAPI_ARCHIVE:=$(TAPI).tar.bz2
-
-VMMC_HASH:=$(shell cat $(VMMC_PATH)/Makefile | sed -n '/^PKG_HASH:=/s///p')
-VMMC_VERSION:=$(shell cat $(VMMC_PATH)/Makefile | sed -n '/^PKG_VERSION:=/s///p')
-VMMC:=drv_vmmc-$(VMMC_VERSION)
-VMMC_ARCHIVE:=$(VMMC).tar.bz2
-
-define Download/files
-define Download/$(1)
-  FILE:=$(2)
-  HASH:=$(3)
-  URL:=$(4)
-endef
-$$(eval $$(call Download,$(1)))
-endef
-
 define Download/github
 define Download/$(PKG_NAME)
   VERSION:=$(1)
@@ -69,7 +37,7 @@ define Package/$(PKG_NAME)/Default
   CATEGORY:=Network
   TITLE:=Lantiq channel driver
   URL:=https://github.com/kochstefan/asterisk_channel_lantiq
-  DEPENDS:=@mips
+  DEPENDS:=kmod-ltq-vmmc
 endef
 
 define Package/asterisk13-$(PKG_NAME)
@@ -103,23 +71,6 @@ endef
 
 Package/asterisk13-$(PKG_NAME)/install = $(Package/Install/Default)
 
-define Package/postinst/Default
-#!/bin/sh
-if [ -z "$${IPKG_INSTROOT}" ]; then
-  echo
-  echo "o-------------------------------------------------------------------o"
-  echo "| chan-lantiq note                                                  |"
-  echo "o-------------------------------------------------------------------o"
-  echo "| Install kmod-ltq-vmmc if you want to use this Asterisk module.    |"
-  echo "| Unfortunately the dependency could not be added to the package.   |"
-  echo "o-------------------------------------------------------------=^_^=-o"
-  echo
-fi
-exit 0
-endef
-
-Package/asterisk13-$(PKG_NAME)/postinst = $(Package/postinst/Default)
-
 ifeq ($(BUILD_VARIANT),asterisk13)
 CHAN_LANTIQ_AST_INCLUDES:=-I$(STAGING_DIR)/usr/include/asterisk-13/include
 CHAN_LANTIQ_VERSION:=$(LANTIQ_AST13_VERSION)
@@ -130,26 +81,6 @@ define Build/Prepare
        $(TAR) --extract --no-same-owner --no-same-permissions --xz \
                --file=$(DL_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)-$(CHAN_LANTIQ_VERSION).tar.xz \
                --directory=$(PKG_BUILD_DIR)
-       $(eval $(call Download/files,ltq-ifxos,$(IFXOS_ARCHIVE),$(IFXOS_HASH),$(LTQ_MIRROR)))
-       $(eval $(call Download/files,ltq-tapi,$(TAPI_ARCHIVE),$(TAPI_HASH),$(LTQ_MIRROR)))
-       $(eval $(call Download/files,ltq-vmmc,$(VMMC_ARCHIVE),$(VMMC_HASH),$(LTQ_MIRROR)))
-       $(TAR) --extract --no-same-owner --no-same-permissions --gzip \
-               --file=$(DL_DIR)/$(IFXOS_ARCHIVE) \
-               --directory=$(PKG_BUILD_DIR)
-       $(TAR) --extract --no-same-owner --no-same-permissions --bzip \
-               --file=$(DL_DIR)/$(TAPI_ARCHIVE) \
-               --directory=$(PKG_BUILD_DIR)
-       $(TAR) --extract --no-same-owner --no-same-permissions --bzip \
-               --file=$(DL_DIR)/$(VMMC_ARCHIVE) \
-               --directory=$(PKG_BUILD_DIR)
-       $(call PatchDir,$(PKG_BUILD_DIR)/$(IFXOS),$(IFXOS_PATH)/patches)
-       $(call PatchDir,$(PKG_BUILD_DIR)/$(TAPI),$(TAPI_PATH)/patches)
-       $(call PatchDir,$(PKG_BUILD_DIR)/$(VMMC),$(VMMC_PATH)/patches)
-       $(INSTALL_DIR) $(PKG_BUILD_DIR)/include
-       $(CP) $(PKG_BUILD_DIR)/$(IFXOS)/src/include $(PKG_BUILD_DIR)/include/ifxos
-       $(CP) $(PKG_BUILD_DIR)/$(TAPI)/include $(PKG_BUILD_DIR)/include/drv_tapi
-       $(CP) $(PKG_BUILD_DIR)/$(VMMC)/include $(PKG_BUILD_DIR)/include/drv_vmmc
-       cd $(PKG_BUILD_DIR)/include/drv_tapi && $(LN) ../ifxos/ifx_types.h .
        $(CP) ./files/default.exports \
                $(PKG_BUILD_DIR)/$(PKG_NAME)/src/channels/chan_lantiq.exports
 endef
@@ -157,8 +88,6 @@ endef
 define Build/Configure
 endef
 
-# Mark our includes as a system directory, because that's where they would
-# normally be. Not doing so results in redefinition warnings.
 define Build/Compile
        cd $(PKG_BUILD_DIR)/$(PKG_NAME)/src/channels && \
        $(TARGET_CC) -o chan_lantiq.o -c chan_lantiq.c -MD -MT chan_lantiq.o \
@@ -166,7 +95,6 @@ define Build/Compile
                $(TARGET_CFLAGS) \
                $(CHAN_LANTIQ_AST_INCLUDES) \
                $(TARGET_CPPFLAGS) \
-               -isystem $(PKG_BUILD_DIR)/include \
                -Wall -Wstrict-prototypes -Wmissing-prototypes \
                -Wmissing-declarations $(FPIC) -DAST_MODULE=\"chan_lantiq\" && \
        $(TARGET_CC) -o chan_lantiq.so -pthread $(TARGET_LDFLAGS) -shared \