chan-sccp-b: remove old multiple makefiles, introduce build variants
authorJiri Slachta <slachta@cesnet.cz>
Mon, 16 Mar 2015 10:44:21 +0000 (11:44 +0100)
committerJiri Slachta <slachta@cesnet.cz>
Mon, 16 Mar 2015 10:44:21 +0000 (11:44 +0100)
Signed-off-by: Jiri Slachta <slachta@cesnet.cz>
net/asterisk-1.8.x-chan-sccp-b/Makefile [deleted file]
net/asterisk-1.8.x-chan-sccp-b/files/sccp.openwrt.conf [deleted file]
net/asterisk-11.x-chan-sccp-b/Makefile [deleted file]
net/asterisk-11.x-chan-sccp-b/files/sccp.openwrt.conf [deleted file]
net/chan-sccp-b/Makefile [new file with mode: 0644]
net/chan-sccp-b/files/sccp.conf [new file with mode: 0644]

diff --git a/net/asterisk-1.8.x-chan-sccp-b/Makefile b/net/asterisk-1.8.x-chan-sccp-b/Makefile
deleted file mode 100644 (file)
index 13a2637..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# Copyright (C) 2014 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:=asterisk18-chan-sccp-b
-PKG_REV:=5845
-PKG_VERSION:=v4.2-r$(PKG_REV)
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://svn.code.sf.net/p/chan-sccp-b/code/tags/openwrt
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=$(PKG_REV)
-PKG_SOURCE_PROTO:=svn
-
-PKG_FIXUP:=autoreconf -fi
-
-PKG_LICENSE:=GPL-1.0
-PKG_LICENSE_FILES:=COPYING LICENSE
-PKG_MAINTAINER:=Jiri Slachta <slachta@cesnet.cz>
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/asterisk18-chan-sccp-b
-  SUBMENU:=Telephony
-  SECTION:=net
-  CATEGORY:=Network
-  TITLE:=SCCP channel provider support
-  URL:=http://chan-sccp-b.sourceforge.net/
-  DEPENDS:=asterisk18 +libltdl
-endef
-
-define Package/asterisk18-chan-sccp-b/description
- SCCP channel provider for asterisk. It delivers extended functionality for SCCP phones over chan_skinny delivered
- by asterisk by default.
-endef
-
-define Build/Configure
-       $(call Build/Configure/Default,--with-asterisk=$(STAGING_DIR)/usr/include/asterisk-1.8)
-endef
-
-define Build/Compile
-       $(MAKE) -C "$(PKG_BUILD_DIR)" \
-               CFLAGS="$(CFLAGS) -I$(PKG_BUILD_DIR)/src -DLOW_MEMORY" \
-               DESTDIR="$(PKG_INSTALL_DIR)" \
-               all install
-endef
-
-define Package/asterisk18-chan-sccp-b/conffiles
-/etc/asterisk/sccp.conf
-endef
-
-define Package/asterisk18-chan-sccp-b/install
-       $(INSTALL_DIR) $(1)/etc/asterisk
-       $(CP) ./files/sccp.openwrt.conf $(1)/etc/asterisk/sccp.conf
-       $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_sccp.so $(1)/usr/lib/asterisk/modules/
-endef
-
-$(eval $(call BuildPackage,asterisk18-chan-sccp-b))
diff --git a/net/asterisk-1.8.x-chan-sccp-b/files/sccp.openwrt.conf b/net/asterisk-1.8.x-chan-sccp-b/files/sccp.openwrt.conf
deleted file mode 100644 (file)
index c59f4cd..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-[general]
-servername = Openwrt
-keepalive = 60
-debug = core
-context = default
-dateformat = D/M/Y
-bindaddr = 192.168.1.1
-port = 2000
-disallow=all
-allow=ulaw
-allow=alaw
-allow=gsm
-firstdigittimeout = 16
-digittimeout = 6
-autoanswer_ring_time = 1
-musicclass=default
-language=en
-deny=0.0.0.0/0.0.0.0
-permit=192.168.1.0/255.255.255.0
-protocolversion=17
-
-hotline_enabled=yes
-hotline_context=default
-hotline_extension=111
-
-[SEP001122334455]
-type = device
-description = Phone Number One
-devicetype = 7940
-button = line, 111
-button = line, 113@01:shared
-button = speeddial,Phone 2 Line 1, 112, 112@hint
-
-[SEP00a1a2a3a4a5]
-type = device
-description = Phone Number Two
-devicetype = 7960
-button = line, 112
-button = line, 113@01:shared
-button = speeddial,Phone 1 Line 1, 111, 111@hint
-
-[111]
-id = 1000
-type = line
-pin = 1234
-label = Phone 1 Line 1
-description = Line 111
-mailbox = 10111
-cid_name = Phone 1 CID
-cid_num = 111
-accountcode=79111
-callgroup=1
-pickupgroup=1
-context = default
-incominglimit = 2
-vmnum = 600
-trnsfvm = 1000
-
-[112]
-id = 1001
-type = line
-pin = 1234
-label = Phone 2 Line 1
-description = Line 112
-mailbox = 10112
-cid_name = Phone 2 CID
-cid_num = 112
-accountcode=79112
-callgroup=1
-pickupgroup=1
-context = default
-incominglimit = 2
-vmnum = 600
-trnsfvm = 1000
-
-[113]
-id = 1002
-type = line
-pin = 1234
-label = SharedLine 1
-description = Line 113
-mailbox = 10113
-cid_name = Shared
-cid_num = 113
-accountcode=79113
-incominglimit = 2
-vmnum = 600
-trnsfvm = 1000
-
diff --git a/net/asterisk-11.x-chan-sccp-b/Makefile b/net/asterisk-11.x-chan-sccp-b/Makefile
deleted file mode 100644 (file)
index bf75648..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# Copyright (C) 2015 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:=asterisk11-chan-sccp-b
-PKG_REV:=5845
-PKG_VERSION:=v4.2-r$(PKG_REV)
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://svn.code.sf.net/p/chan-sccp-b/code/tags/openwrt
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=$(PKG_REV)
-PKG_SOURCE_PROTO:=svn
-
-PKG_FIXUP:=autoreconf -fi
-
-PKG_LICENSE:=GPL-1.0
-PKG_LICENSE_FILES:=COPYRIGHT LICENSE
-PKG_MAINTAINER:=Jiri Slachta <slachta@cesnet.cz>
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/asterisk11-chan-sccp-b
-  SUBMENU:=Telephony
-  SECTION:=net
-  CATEGORY:=Network
-  TITLE:=SCCP channel provider support
-  URL:=http://chan-sccp-b.sourceforge.net/
-  DEPENDS:=asterisk11 +libltdl
-endef
-
-define Package/asterisk11-chan-sccp-b/description
- SCCP channel provider for asterisk. It delivers extended functionality for SCCP phones over chan_skinny delivered
- by asterisk by default.
-endef
-
-define Build/Configure
-       $(call Build/Configure/Default,--with-asterisk=$(STAGING_DIR)/usr/include/asterisk-11)
-endef
-
-define Build/Compile
-       $(MAKE) -C "$(PKG_BUILD_DIR)" \
-               CFLAGS="$(CFLAGS) -I$(PKG_BUILD_DIR)/src -DLOW_MEMORY" \
-               DESTDIR="$(PKG_INSTALL_DIR)" \
-               all install
-endef
-
-define Package/asterisk11-chan-sccp-b/conffiles
-/etc/asterisk/sccp.conf
-endef
-
-define Package/asterisk11-chan-sccp-b/install
-       $(INSTALL_DIR) $(1)/etc/asterisk
-       $(CP) ./files/sccp.openwrt.conf $(1)/etc/asterisk/sccp.conf
-       $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_sccp.so $(1)/usr/lib/asterisk/modules/
-endef
-
-$(eval $(call BuildPackage,asterisk11-chan-sccp-b))
diff --git a/net/asterisk-11.x-chan-sccp-b/files/sccp.openwrt.conf b/net/asterisk-11.x-chan-sccp-b/files/sccp.openwrt.conf
deleted file mode 100644 (file)
index c59f4cd..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-[general]
-servername = Openwrt
-keepalive = 60
-debug = core
-context = default
-dateformat = D/M/Y
-bindaddr = 192.168.1.1
-port = 2000
-disallow=all
-allow=ulaw
-allow=alaw
-allow=gsm
-firstdigittimeout = 16
-digittimeout = 6
-autoanswer_ring_time = 1
-musicclass=default
-language=en
-deny=0.0.0.0/0.0.0.0
-permit=192.168.1.0/255.255.255.0
-protocolversion=17
-
-hotline_enabled=yes
-hotline_context=default
-hotline_extension=111
-
-[SEP001122334455]
-type = device
-description = Phone Number One
-devicetype = 7940
-button = line, 111
-button = line, 113@01:shared
-button = speeddial,Phone 2 Line 1, 112, 112@hint
-
-[SEP00a1a2a3a4a5]
-type = device
-description = Phone Number Two
-devicetype = 7960
-button = line, 112
-button = line, 113@01:shared
-button = speeddial,Phone 1 Line 1, 111, 111@hint
-
-[111]
-id = 1000
-type = line
-pin = 1234
-label = Phone 1 Line 1
-description = Line 111
-mailbox = 10111
-cid_name = Phone 1 CID
-cid_num = 111
-accountcode=79111
-callgroup=1
-pickupgroup=1
-context = default
-incominglimit = 2
-vmnum = 600
-trnsfvm = 1000
-
-[112]
-id = 1001
-type = line
-pin = 1234
-label = Phone 2 Line 1
-description = Line 112
-mailbox = 10112
-cid_name = Phone 2 CID
-cid_num = 112
-accountcode=79112
-callgroup=1
-pickupgroup=1
-context = default
-incominglimit = 2
-vmnum = 600
-trnsfvm = 1000
-
-[113]
-id = 1002
-type = line
-pin = 1234
-label = SharedLine 1
-description = Line 113
-mailbox = 10113
-cid_name = Shared
-cid_num = 113
-accountcode=79113
-incominglimit = 2
-vmnum = 600
-trnsfvm = 1000
-
diff --git a/net/chan-sccp-b/Makefile b/net/chan-sccp-b/Makefile
new file mode 100644 (file)
index 0000000..09ce0b2
--- /dev/null
@@ -0,0 +1,106 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015 Cesnet, z.s.p.o.
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=chan-sccp-b
+PKG_REV:=5845
+PKG_VERSION:=v4.2-r$(PKG_REV)
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://svn.code.sf.net/p/chan-sccp-b/code/tags/openwrt
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=$(PKG_REV)
+PKG_SOURCE_PROTO:=svn
+
+PKG_FIXUP:=autoreconf -fi
+
+PKG_LICENSE:=GPL-1.0
+PKG_LICENSE_FILES:=COPYING LICENSE
+PKG_MAINTAINER:=Jiri Slachta <slachta@cesnet.cz>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/chan-sccp-b/Default
+  SUBMENU:=Telephony
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=SCCP channel provider support
+  URL:=http://chan-sccp-b.sourceforge.net/
+  DEPENDS:= +libltdl
+endef
+
+define Package/asterisk18-chan-sccp-b
+$(call Package/chan-sccp-b/Default)
+  DEPENDS+= asterisk18
+  VARIANT:=asterisk18
+endef
+
+define Package/asterisk13-chan-sccp-b
+$(call Package/chan-sccp-b/Default)
+  DEPENDS+= asterisk13
+  VARIANT:=asterisk13
+endef
+
+define Package/asterisk11-chan-sccp-b
+$(call Package/chan-sccp-b/Default)
+  DEPENDS+= asterisk11 
+  VARIANT:=asterisk11
+endef
+
+define Package/description/Default
+ SCCP channel provider for asterisk. It delivers extended functionality for SCCP phones over chan_skinny delivered
+ by asterisk by default.
+endef
+
+Package/asterisk18-chan-sccp-b/description = $(Package/description/Default)
+Package/asterisk11-chan-sccp-b/description = $(Package/description/Default)
+Package/asterisk13-chan-sccp-b/description = $(Package/description/Default)
+
+ifeq ($(BUILD_VARIANT),asterisk13)
+  CONFIGURE_ARGS += --with-asterisk=$(STAGING_DIR)/usr/include/asterisk-13
+endif
+
+ifeq ($(BUILD_VARIANT),asterisk11)
+  CONFIGURE_ARGS += --with-asterisk=$(STAGING_DIR)/usr/include/asterisk-11
+endif
+
+ifeq ($(BUILD_VARIANT),asterisk18)
+  CONFIGURE_ARGS += --with-asterisk=$(STAGING_DIR)/usr/include/asterisk-1.8
+endif
+
+define Package/conffiles/Default
+/etc/asterisk/sccp.conf
+endef
+
+Package/asterisk18-chan-sccp-b/conffiles = $(Package/conffiles/Default)
+Package/asterisk11-chan-sccp-b/conffiles = $(Package/conffiles/Default)
+Package/asterisk13-chan-sccp-b/conffiles = $(Package/conffiles/Default)
+
+define Build/Compile
+       $(MAKE) -C "$(PKG_BUILD_DIR)" \
+               CFLAGS="$(CFLAGS) -I$(PKG_BUILD_DIR)/src -DLOW_MEMORY" \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               all install
+endef
+
+define Package/Install/Default
+       $(INSTALL_DIR) $(1)/etc/asterisk
+       $(CP) ./files/sccp.conf $(1)/etc/asterisk/sccp.conf
+       $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_sccp.so $(1)/usr/lib/asterisk/modules/
+endef
+
+Package/asterisk18-chan-sccp-b/install = $(Package/Install/Default)
+Package/asterisk11-chan-sccp-b/install = $(Package/Install/Default)
+Package/asterisk13-chan-sccp-b/install = $(Package/Install/Default)
+
+$(eval $(call BuildPackage,asterisk18-chan-sccp-b))
+$(eval $(call BuildPackage,asterisk11-chan-sccp-b))
+$(eval $(call BuildPackage,asterisk13-chan-sccp-b))
diff --git a/net/chan-sccp-b/files/sccp.conf b/net/chan-sccp-b/files/sccp.conf
new file mode 100644 (file)
index 0000000..0317b96
--- /dev/null
@@ -0,0 +1,90 @@
+[general]
+servername = Openwrt
+keepalive = 60
+debug = core
+context = default
+dateformat = D/M/Y
+binaddr = ::
+bindaddr = 192.168.1.1
+port = 2000
+disallow = all
+allow = ulaw 
+allow = alaw
+allow = gsm
+firstdigittimeout = 16
+digittimeout = 6
+autoanswer_ring_time = 1
+musicclass = default
+language = en
+deny = 0.0.0.0/0.0.0.0
+permit = internal
+protocolversion = 17
+
+hotline_enabled = yes
+hotline_context = default
+hotline_extension = 111
+
+[SEP001122334455]
+type = device
+description = Phone Number One
+devicetype = 7940
+button = line, 111
+button = line, 113@01:shared
+button = speeddial,Phone 2 Line 1, 112, 112@hint
+
+[SEP00a1a2a3a4a5]
+type = device
+description = Phone Number Two
+devicetype = 7960
+button = line, 112
+button = line, 113@01:shared
+button = speeddial,Phone 1 Line 1, 111, 111@hint
+
+[111]
+id = 1000
+type = line
+pin = 1234
+label = Phone 1 Line 1
+description = Line 111
+mailbox = 10111
+cid_name = Phone 1 CID
+cid_num = 111
+accountcode=79111
+callgroup=1
+pickupgroup=1
+context = default
+incominglimit = 2
+vmnum = 600
+trnsfvm = 1000
+
+[112]
+id = 1001
+type = line
+pin = 1234
+label = Phone 2 Line 1
+description = Line 112
+mailbox = 10112
+cid_name = Phone 2 CID
+cid_num = 112
+accountcode=79112
+callgroup=1
+pickupgroup=1
+context = default
+incominglimit = 2
+vmnum = 600
+trnsfvm = 1000
+
+[113]
+id = 1002
+type = line
+pin = 1234
+label = SharedLine 1
+description = Line 113
+mailbox = 10113
+cid_name = Shared
+cid_num = 113
+accountcode=79113
+incominglimit = 2
+vmnum = 600
+trnsfvm = 1000
+