From 8fc851f0d5d4a06365fb4b38d8d77ad2a191ba3a Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Thu, 23 Nov 2017 18:01:02 +0100 Subject: [PATCH 1/2] chan-sccp: update to latest commit - Update to latest commit to get support for Asterisk 15 - Upstream renamed the project from chan-sccp-b to chan-sccp. This commit updates the OpenWrt Makefile accordingly. - Move the directory from chan-sccp-b to asterisk-chan-sccp (follow the naming of the other channel drivers' directories). - OpenWrt Asterisk13 is mistaken for Asterisk15 because it has the iostream patch applied, fix this with workaround in autoconf script. - Update upstream URL to the github page. - Update description of the package. Signed-off-by: Sebastian Kemper --- .../Makefile | 37 ++++++++++++------- .../files/extconfig.conf.sccp_sample | 0 .../files/res_config_sqlite3.conf.sccp_sample | 0 .../files/sccp.conf | 0 .../files/sccp.conf.realtime_sample | 0 .../files/sccp_sqlite3.sql | 0 .../01-prevent-extra-optimization.patch | 6 +-- 7 files changed, 26 insertions(+), 17 deletions(-) rename net/{chan-sccp-b => asterisk-chan-sccp}/Makefile (71%) rename net/{chan-sccp-b => asterisk-chan-sccp}/files/extconfig.conf.sccp_sample (100%) rename net/{chan-sccp-b => asterisk-chan-sccp}/files/res_config_sqlite3.conf.sccp_sample (100%) rename net/{chan-sccp-b => asterisk-chan-sccp}/files/sccp.conf (100%) rename net/{chan-sccp-b => asterisk-chan-sccp}/files/sccp.conf.realtime_sample (100%) rename net/{chan-sccp-b => asterisk-chan-sccp}/files/sccp_sqlite3.sql (100%) rename net/{chan-sccp-b => asterisk-chan-sccp}/patches/01-prevent-extra-optimization.patch (75%) diff --git a/net/chan-sccp-b/Makefile b/net/asterisk-chan-sccp/Makefile similarity index 71% rename from net/chan-sccp-b/Makefile rename to net/asterisk-chan-sccp/Makefile index 1adf42b..c72beb3 100644 --- a/net/chan-sccp-b/Makefile +++ b/net/asterisk-chan-sccp/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=chan-sccp-b -PKG_VERSION:=v4.3.0-20170814 +PKG_NAME:=chan-sccp +PKG_VERSION:=v4.3.0-20171123 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://github.com/chan-sccp/chan-sccp.git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=016fee3a96b09d5404757f7b178af2e349e55bcc +PKG_SOURCE_VERSION:=ed272e974897f075573a358d169e5c77889f5905 PKG_SOURCE_PROTO:=git PKG_FIXUP:=autoreconf @@ -38,29 +38,30 @@ TARGET_LDFLAGS+= \ -L$(STAGING_DIR)/usr/lib/libiconv-full/lib -liconv endif -define Package/chan-sccp-b/Default +define Package/chan-sccp/Default SUBMENU:=Telephony SECTION:=net CATEGORY:=Network - TITLE:=SCCP channel provider support - URL:=http://chan-sccp-b.sourceforge.net/ + TITLE:=SCCP channel support + URL:=https://github.com/chan-sccp/chan-sccp DEPENDS:=+USE_UCLIBC:libiconv-full +libltdl PKG_BUILD_DEPENDS:=libiconv endef -define Package/asterisk13-chan-sccp-b -$(call Package/chan-sccp-b/Default) +define Package/asterisk13-chan-sccp +$(call Package/chan-sccp/Default) DEPENDS+= asterisk13 VARIANT:=asterisk13 CONFLICTS:=asterisk13-chan-skinny 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. +Replacement for the SCCP channel driver (chan_skinny) in Asterisk. +Extended features include shared lines, presence / BLF, customizable +feature buttons and custom device state. endef -Package/asterisk13-chan-sccp-b/description = $(Package/description/Default) +Package/asterisk13-chan-sccp/description = $(Package/description/Default) CONFIGURE_ARGS += \ --disable-debug \ @@ -80,7 +81,15 @@ define Package/conffiles/Default /etc/asterisk/sccp.conf.realtime_sample endef -Package/asterisk13-chan-sccp-b/conffiles = $(Package/conffiles/Default) +Package/asterisk13-chan-sccp/conffiles = $(Package/conffiles/Default) + +define Build/Prepare + $(call Build/Prepare/Default) +ifeq ($(BUILD_VARIANT),asterisk13) + $(SED) 's|asterisk/iostream.h|asterisk/iostream.404|' \ + $(PKG_BUILD_DIR)/autoconf/asterisk.m4 +endif +endef define Package/Install/Default $(INSTALL_DIR) $(1)/etc/asterisk @@ -93,6 +102,6 @@ define Package/Install/Default $(INSTALL_DATA) ./files/sccp.conf.realtime_sample $(1)/etc/asterisk/sccp.conf.realtime_sample endef -Package/asterisk13-chan-sccp-b/install = $(Package/Install/Default) +Package/asterisk13-chan-sccp/install = $(Package/Install/Default) -$(eval $(call BuildPackage,asterisk13-chan-sccp-b)) +$(eval $(call BuildPackage,asterisk13-chan-sccp)) diff --git a/net/chan-sccp-b/files/extconfig.conf.sccp_sample b/net/asterisk-chan-sccp/files/extconfig.conf.sccp_sample similarity index 100% rename from net/chan-sccp-b/files/extconfig.conf.sccp_sample rename to net/asterisk-chan-sccp/files/extconfig.conf.sccp_sample diff --git a/net/chan-sccp-b/files/res_config_sqlite3.conf.sccp_sample b/net/asterisk-chan-sccp/files/res_config_sqlite3.conf.sccp_sample similarity index 100% rename from net/chan-sccp-b/files/res_config_sqlite3.conf.sccp_sample rename to net/asterisk-chan-sccp/files/res_config_sqlite3.conf.sccp_sample diff --git a/net/chan-sccp-b/files/sccp.conf b/net/asterisk-chan-sccp/files/sccp.conf similarity index 100% rename from net/chan-sccp-b/files/sccp.conf rename to net/asterisk-chan-sccp/files/sccp.conf diff --git a/net/chan-sccp-b/files/sccp.conf.realtime_sample b/net/asterisk-chan-sccp/files/sccp.conf.realtime_sample similarity index 100% rename from net/chan-sccp-b/files/sccp.conf.realtime_sample rename to net/asterisk-chan-sccp/files/sccp.conf.realtime_sample diff --git a/net/chan-sccp-b/files/sccp_sqlite3.sql b/net/asterisk-chan-sccp/files/sccp_sqlite3.sql similarity index 100% rename from net/chan-sccp-b/files/sccp_sqlite3.sql rename to net/asterisk-chan-sccp/files/sccp_sqlite3.sql diff --git a/net/chan-sccp-b/patches/01-prevent-extra-optimization.patch b/net/asterisk-chan-sccp/patches/01-prevent-extra-optimization.patch similarity index 75% rename from net/chan-sccp-b/patches/01-prevent-extra-optimization.patch rename to net/asterisk-chan-sccp/patches/01-prevent-extra-optimization.patch index 19079c9..c6dc4ac 100644 --- a/net/chan-sccp-b/patches/01-prevent-extra-optimization.patch +++ b/net/asterisk-chan-sccp/patches/01-prevent-extra-optimization.patch @@ -1,9 +1,9 @@ --- a/autoconf/extra.m4 +++ b/autoconf/extra.m4 -@@ -472,17 +472,6 @@ AC_DEFUN([CS_ENABLE_OPTIMIZATION], [ +@@ -491,17 +491,6 @@ AC_DEFUN([CS_ENABLE_OPTIMIZATION], [ + ], SUPPORTED_CFLAGS) ]) - CPPFLAGS_saved="${CPPFLAGS_saved} -D_FORTIFY_SOURCE=2" - GDB_FLAGS="" + AC_SUBST([strip_binaries]) - ], [ - CFLAGS_saved="`echo ${CFLAGS_saved} |sed -e 's/\-O[0-9]\ \?//g' -e 's/[^|\ ]\-g[$|\ ]//g'`" - optimize_flag="-O0" From 59917a3b12de544fc78c78ce93254f74e67192d1 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Thu, 23 Nov 2017 18:11:29 +0100 Subject: [PATCH 2/2] chan-sccp: add Asterisk 15 variant Define a variant for Asterisk 15. Signed-off-by: Sebastian Kemper --- net/asterisk-chan-sccp/Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/net/asterisk-chan-sccp/Makefile b/net/asterisk-chan-sccp/Makefile index c72beb3..0dcf5ea 100644 --- a/net/asterisk-chan-sccp/Makefile +++ b/net/asterisk-chan-sccp/Makefile @@ -55,6 +55,13 @@ $(call Package/chan-sccp/Default) CONFLICTS:=asterisk13-chan-skinny endef +define Package/asterisk15-chan-sccp +$(call Package/chan-sccp/Default) + DEPENDS+= asterisk15 + VARIANT:=asterisk15 + CONFLICTS:=asterisk15-chan-skinny +endef + define Package/description/Default Replacement for the SCCP channel driver (chan_skinny) in Asterisk. Extended features include shared lines, presence / BLF, customizable @@ -62,6 +69,7 @@ feature buttons and custom device state. endef Package/asterisk13-chan-sccp/description = $(Package/description/Default) +Package/asterisk15-chan-sccp/description = $(Package/description/Default) CONFIGURE_ARGS += \ --disable-debug \ @@ -73,6 +81,10 @@ ifeq ($(BUILD_VARIANT),asterisk13) CONFIGURE_ARGS += --with-asterisk=$(STAGING_DIR)/usr/include/asterisk-13 endif +ifeq ($(BUILD_VARIANT),asterisk15) + CONFIGURE_ARGS += --with-asterisk=$(STAGING_DIR)/usr/include/asterisk-15 +endif + define Package/conffiles/Default /etc/asterisk/sccp.conf /etc/asterisk/extconfig.conf.sccp_sample @@ -82,6 +94,7 @@ define Package/conffiles/Default endef Package/asterisk13-chan-sccp/conffiles = $(Package/conffiles/Default) +Package/asterisk15-chan-sccp/conffiles = $(Package/conffiles/Default) define Build/Prepare $(call Build/Prepare/Default) @@ -103,5 +116,7 @@ define Package/Install/Default endef Package/asterisk13-chan-sccp/install = $(Package/Install/Default) +Package/asterisk15-chan-sccp/install = $(Package/Install/Default) $(eval $(call BuildPackage,asterisk13-chan-sccp)) +$(eval $(call BuildPackage,asterisk15-chan-sccp))