asterisk-chan-lantiq: avoid VARIANTs 320/head
authorSebastian Kemper <sebastian_ml@gmx.net>
Sun, 15 Apr 2018 15:29:40 +0000 (17:29 +0200)
committerSebastian Kemper <sebastian_ml@gmx.net>
Sun, 15 Apr 2018 15:34:21 +0000 (17:34 +0200)
chan-lantiq currently is still not built by the build bots. Split the
package in two, one for Asterisk 13, the other for 15, to avoid a VARIANT
build. Maybe the build bots do not support nonshared VARIANT builds.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
net/asterisk-13.x-chan-lantiq/Makefile [new file with mode: 0644]
net/asterisk-13.x-chan-lantiq/files/default.exports [new file with mode: 0644]
net/asterisk-15.x-chan-lantiq/Makefile [new file with mode: 0644]
net/asterisk-15.x-chan-lantiq/files/default.exports [new file with mode: 0644]
net/asterisk-chan-lantiq/Makefile [deleted file]
net/asterisk-chan-lantiq/files/default.exports [deleted file]

diff --git a/net/asterisk-13.x-chan-lantiq/Makefile b/net/asterisk-13.x-chan-lantiq/Makefile
new file mode 100644 (file)
index 0000000..a2fc266
--- /dev/null
@@ -0,0 +1,77 @@
+#
+# Copyright (C) 2018 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=asterisk13-chan-lantiq
+PKG_VERSION:=20180215
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://github.com/kochstefan/asterisk_channel_lantiq.git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=f0d7ca7df8e5df802c5bcb79643e3bdc3956c190
+PKG_MIRROR_HASH:=aaf5ce87a2e23b801318add79eaaa1b7c4a8aa497ca8e2a71ef5d452a7595a73
+PKG_SOURCE_PROTO:=git
+
+PKG_LICENSE:=GPL-2.0
+
+PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
+
+PKG_FLAGS:=nonshared
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/$(PKG_NAME)
+  SUBMENU:=Telephony
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=Lantiq channel driver
+  URL:=https://github.com/kochstefan/asterisk_channel_lantiq
+  DEPENDS:=asterisk13 +kmod-ltq-vmmc
+endef
+
+define Package/$(PKG_NAME)/description
+An implementation of a Lantiq TAPI channel driver for Asterisk 13.
+endef
+
+define Package/$(PKG_NAME)/conffiles
+/etc/asterisk/lantiq.conf
+endef
+
+define Build/Prepare
+       $(call Build/Prepare/Default)
+       $(INSTALL_DATA) ./files/default.exports \
+               $(PKG_BUILD_DIR)/src/channels/chan_lantiq.exports
+endef
+
+define Build/Compile
+       cd $(PKG_BUILD_DIR)/src/channels && \
+       $(TARGET_CC) -o chan_lantiq.o -c chan_lantiq.c -MD -MT chan_lantiq.o \
+               -MF .chan_lantiq.o.d -MP -pthread \
+               $(TARGET_CFLAGS) -DAST_MODULE_SELF_SYM=__internal_chan_lantiq_self \
+               -I$(STAGING_DIR)/usr/include/asterisk-13/include \
+               $(TARGET_CPPFLAGS) \
+               -Wall -Wstrict-prototypes -Wmissing-prototypes \
+               -Wmissing-declarations $(FPIC) -DAST_MODULE=\"chan_lantiq\" && \
+       $(TARGET_CC) -o chan_lantiq.so -pthread $(TARGET_LDFLAGS) -shared \
+               -Wl,--version-script,chan_lantiq.exports,--warn-common \
+               chan_lantiq.o
+endef
+
+define Package/$(PKG_NAME)/install
+       $(INSTALL_DIR) $(1)/etc/asterisk
+       $(INSTALL_CONF) \
+               $(PKG_BUILD_DIR)/src/configs/samples/lantiq.conf.sample \
+               $(1)/etc/asterisk/lantiq.conf
+       $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
+       $(INSTALL_BIN) \
+               $(PKG_BUILD_DIR)/src/channels/chan_lantiq.so \
+               $(1)/usr/lib/asterisk/modules
+endef
+
+$(eval $(call BuildPackage,$(PKG_NAME)))
diff --git a/net/asterisk-13.x-chan-lantiq/files/default.exports b/net/asterisk-13.x-chan-lantiq/files/default.exports
new file mode 100644 (file)
index 0000000..6d9344d
--- /dev/null
@@ -0,0 +1,8 @@
+{
+       global:
+               /* See main/asterisk.exports.in for an explanation why this is
+                * needed. */
+               _IO_stdin_used;
+       local:
+               *;
+};
diff --git a/net/asterisk-15.x-chan-lantiq/Makefile b/net/asterisk-15.x-chan-lantiq/Makefile
new file mode 100644 (file)
index 0000000..8527c4c
--- /dev/null
@@ -0,0 +1,77 @@
+#
+# Copyright (C) 2018 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=asterisk15-chan-lantiq
+PKG_VERSION:=20180215
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://github.com/kochstefan/asterisk_channel_lantiq.git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=c9d68dd06fcd46ac7985df45f8c2b8833e658f8e
+PKG_MIRROR_HASH:=8666c18b24adf9da3ddf12306fcf0a8b4f56860c256b172bd0ba5c2a7a3ab25e
+PKG_SOURCE_PROTO:=git
+
+PKG_LICENSE:=GPL-2.0
+
+PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
+
+PKG_FLAGS:=nonshared
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/$(PKG_NAME)
+  SUBMENU:=Telephony
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=Lantiq channel driver
+  URL:=https://github.com/kochstefan/asterisk_channel_lantiq
+  DEPENDS:=asterisk15 +kmod-ltq-vmmc
+endef
+
+define Package/$(PKG_NAME)/description
+An implementation of a Lantiq TAPI channel driver for Asterisk 15.
+endef
+
+define Package/$(PKG_NAME)/conffiles
+/etc/asterisk/lantiq.conf
+endef
+
+define Build/Prepare
+       $(call Build/Prepare/Default)
+       $(INSTALL_DATA) ./files/default.exports \
+               $(PKG_BUILD_DIR)/src/channels/chan_lantiq.exports
+endef
+
+define Build/Compile
+       cd $(PKG_BUILD_DIR)/src/channels && \
+       $(TARGET_CC) -o chan_lantiq.o -c chan_lantiq.c -MD -MT chan_lantiq.o \
+               -MF .chan_lantiq.o.d -MP -pthread \
+               $(TARGET_CFLAGS) -DAST_MODULE_SELF_SYM=__internal_chan_lantiq_self \
+               -I$(STAGING_DIR)/usr/include/asterisk-15/include \
+               $(TARGET_CPPFLAGS) \
+               -Wall -Wstrict-prototypes -Wmissing-prototypes \
+               -Wmissing-declarations $(FPIC) -DAST_MODULE=\"chan_lantiq\" && \
+       $(TARGET_CC) -o chan_lantiq.so -pthread $(TARGET_LDFLAGS) -shared \
+               -Wl,--version-script,chan_lantiq.exports,--warn-common \
+               chan_lantiq.o
+endef
+
+define Package/$(PKG_NAME)/install
+       $(INSTALL_DIR) $(1)/etc/asterisk
+       $(INSTALL_CONF) \
+               $(PKG_BUILD_DIR)/src/configs/samples/lantiq.conf.sample \
+               $(1)/etc/asterisk/lantiq.conf
+       $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
+       $(INSTALL_BIN) \
+               $(PKG_BUILD_DIR)/src/channels/chan_lantiq.so \
+               $(1)/usr/lib/asterisk/modules
+endef
+
+$(eval $(call BuildPackage,$(PKG_NAME)))
diff --git a/net/asterisk-15.x-chan-lantiq/files/default.exports b/net/asterisk-15.x-chan-lantiq/files/default.exports
new file mode 100644 (file)
index 0000000..6d9344d
--- /dev/null
@@ -0,0 +1,8 @@
+{
+       global:
+               /* See main/asterisk.exports.in for an explanation why this is
+                * needed. */
+               _IO_stdin_used;
+       local:
+               *;
+};
diff --git a/net/asterisk-chan-lantiq/Makefile b/net/asterisk-chan-lantiq/Makefile
deleted file mode 100644 (file)
index c8d0b75..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-#
-# Copyright (C) 2017 - 2018 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=chan-lantiq
-PKG_VERSION:=20180215
-PKG_RELEASE:=1
-
-LANTIQ_AST13_VERSION:=f0d7ca7df8e5df802c5bcb79643e3bdc3956c190
-LANTIQ_AST15_VERSION:=c9d68dd06fcd46ac7985df45f8c2b8833e658f8e
-
-PKG_LICENSE:=GPL-2.0
-PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
-
-PKG_FLAGS:=nonshared
-
-include $(INCLUDE_DIR)/package.mk
-
-define Download/github
-define Download/$(PKG_NAME)
-  VERSION:=$(1)
-  SUBDIR:=$(PKG_NAME)
-  FILE:=$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)-$(1).tar.xz
-  URL:=https://github.com/kochstefan/asterisk_channel_lantiq.git
-  PROTO:=git
-endef
-$$(eval $$(call Download,chan-lantiq))
-endef
-
-define Package/$(PKG_NAME)/Default
-  SUBMENU:=Telephony
-  SECTION:=net
-  CATEGORY:=Network
-  TITLE:=Lantiq channel driver
-  URL:=https://github.com/kochstefan/asterisk_channel_lantiq
-  DEPENDS:=+kmod-ltq-vmmc
-endef
-
-define Package/asterisk13-$(PKG_NAME)
-$(call Package/$(PKG_NAME)/Default)
-  DEPENDS+=asterisk13
-  VARIANT:=asterisk13
-endef
-
-define Package/asterisk15-$(PKG_NAME)
-$(call Package/$(PKG_NAME)/Default)
-  DEPENDS+=asterisk15
-  VARIANT:=asterisk15
-endef
-
-define Package/description/Default
-An implementation of a Lantiq TAPI channel driver for Asterisk.
-endef
-
-Package/asterisk13-$(PKG_NAME)/description = $(Package/description/Default)
-Package/asterisk15-$(PKG_NAME)/description = $(Package/description/Default)
-
-define Package/conffiles/Default
-/etc/asterisk/lantiq.conf
-endef
-
-Package/asterisk13-$(PKG_NAME)/conffiles = $(Package/conffiles/Default)
-Package/asterisk15-$(PKG_NAME)/conffiles = $(Package/conffiles/Default)
-
-define Package/Install/Default
-       $(INSTALL_DIR) $(1)/etc/asterisk
-       $(INSTALL_CONF) \
-               $(PKG_BUILD_DIR)/$(PKG_NAME)/src/configs/samples/lantiq.conf.sample \
-               $(1)/etc/asterisk/lantiq.conf
-       $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
-       $(INSTALL_BIN) \
-               $(PKG_BUILD_DIR)/$(PKG_NAME)/src/channels/chan_lantiq.so \
-               $(1)/usr/lib/asterisk/modules
-endef
-
-Package/asterisk13-$(PKG_NAME)/install = $(Package/Install/Default)
-Package/asterisk15-$(PKG_NAME)/install = $(Package/Install/Default)
-
-ifeq ($(BUILD_VARIANT),asterisk13)
-CHAN_LANTIQ_AST_INCLUDES:=-I$(STAGING_DIR)/usr/include/asterisk-13/include
-CHAN_LANTIQ_VERSION:=$(LANTIQ_AST13_VERSION)
-endif
-
-ifeq ($(BUILD_VARIANT),asterisk15)
-CHAN_LANTIQ_AST_INCLUDES:=-I$(STAGING_DIR)/usr/include/asterisk-15/include
-CHAN_LANTIQ_VERSION:=$(LANTIQ_AST15_VERSION)
-endif
-
-define Build/Prepare
-       $(eval $(call Download/github,$(CHAN_LANTIQ_VERSION)))
-       $(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)
-       $(CP) ./files/default.exports \
-               $(PKG_BUILD_DIR)/$(PKG_NAME)/src/channels/chan_lantiq.exports
-endef
-
-define Build/Configure
-endef
-
-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 \
-               -MF .chan_lantiq.o.d -MP -pthread \
-               $(TARGET_CFLAGS) -DAST_MODULE_SELF_SYM=__internal_chan_lantiq_self \
-               $(CHAN_LANTIQ_AST_INCLUDES) \
-               $(TARGET_CPPFLAGS) \
-               -Wall -Wstrict-prototypes -Wmissing-prototypes \
-               -Wmissing-declarations $(FPIC) -DAST_MODULE=\"chan_lantiq\" && \
-       $(TARGET_CC) -o chan_lantiq.so -pthread $(TARGET_LDFLAGS) -shared \
-               -Wl,--version-script,chan_lantiq.exports,--warn-common \
-               chan_lantiq.o
-endef
-
-$(eval $(call BuildPackage,asterisk13-$(PKG_NAME)))
-$(eval $(call BuildPackage,asterisk15-$(PKG_NAME)))
diff --git a/net/asterisk-chan-lantiq/files/default.exports b/net/asterisk-chan-lantiq/files/default.exports
deleted file mode 100644 (file)
index 6d9344d..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-       global:
-               /* See main/asterisk.exports.in for an explanation why this is
-                * needed. */
-               _IO_stdin_used;
-       local:
-               *;
-};