From 21e64474a41ce4ba0a9c66ed2a74d99f9a814adf Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Mon, 5 Feb 2018 21:42:18 +0100 Subject: [PATCH 1/5] freeswitch-stable: remove --disable-silent-rules Remove this switch as the logs grow quite big with this level of verbosity. Signed-off-by: Sebastian Kemper --- net/freeswitch-stable/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/net/freeswitch-stable/Makefile b/net/freeswitch-stable/Makefile index f0ca8c0..9695a76 100644 --- a/net/freeswitch-stable/Makefile +++ b/net/freeswitch-stable/Makefile @@ -676,7 +676,6 @@ endef CONFIGURE_ARGS+= \ --srcdir=$(PKG_BUILD_DIR) \ --disable-dependency-tracking \ - --disable-silent-rules \ --disable-static \ --disable-system-xmlrpc-c \ --enable-core-libedit-support \ From d82451ec02950c6376339171cea2c462572dd113 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Mon, 5 Feb 2018 22:50:08 +0100 Subject: [PATCH 2/5] freeswitch-stable: redo FreeTDM handling This commit renames libfreetdm to libfreetdm-stable. Also the depends are changed to what they actually are, i.e. there is no depend on freeswitch-stable anymore (libfreetdm.so is a standalone libary). The FreeTDM modules get the same treatment. Signed-off-by: Sebastian Kemper --- net/freeswitch-stable/Makefile | 104 +++++++++++++++++---------------- 1 file changed, 54 insertions(+), 50 deletions(-) diff --git a/net/freeswitch-stable/Makefile b/net/freeswitch-stable/Makefile index 9695a76..4a34b82 100644 --- a/net/freeswitch-stable/Makefile +++ b/net/freeswitch-stable/Makefile @@ -75,7 +75,10 @@ FS_STABLE_SYSCONF_DIR:=/etc FS_STABLE_TLS_DIR:=$(FS_STABLE_SYSCONF_DIR)/$(PRG_NAME)/tls FS_STABLE_TZ_DIR:=$(FS_STABLE_DATA_DIR)/tz -FS_STABLE_FTMOD_AVAILABLE:= \ +FTDM:=freetdm +PKG_LIBFTDM:=lib$(FTDM)-stable + +LIBFTDM_FTMOD_AVAILABLE:= \ analog \ analog_em \ libpri \ @@ -160,7 +163,7 @@ FS_STABLE_MOD_AVAILABLE:= \ expr \ fifo \ format_cdr \ - freetdm \ + $(FTDM) \ fsk \ fsv \ g723_1 \ @@ -254,11 +257,9 @@ FS_STABLE_MOD_AVAILABLE:= \ yaml \ yuv -LIBFTDM:=libfreetdm - PKG_CONFIG_DEPENDS:= \ + $(patsubst %,CONFIG_PACKAGE_$(PKG_LIBFTDM)-ftmod-%,$(LIBFTDM_FTMOD_AVAILABLE)) \ $(patsubst %,CONFIG_PACKAGE_$(PKG_NAME)-%,$(FS_STABLE_MISC_AVAILABLE)) \ - $(patsubst %,CONFIG_PACKAGE_$(PKG_NAME)-ftmod-%,$(FS_STABLE_FTMOD_AVAILABLE)) \ $(patsubst %,CONFIG_PACKAGE_$(PKG_NAME)-mod-%,$(FS_STABLE_MOD_AVAILABLE)) \ CONFIG_FS_STABLE_WITH_DEBUG \ CONFIG_FS_STABLE_WITH_FREETYPE \ @@ -273,7 +274,7 @@ PKG_CONFIG_DEPENDS:= \ CONFIG_FS_STABLE_WITH_VPX \ CONFIG_FS_STABLE_WITH_ZRTP \ CONFIG_LIBC \ - CONFIG_PACKAGE_$(LIBFTDM) \ + CONFIG_PACKAGE_$(PKG_LIBFTDM) \ CONFIG_SOFT_FLOAT include $(INCLUDE_DIR)/package.mk @@ -324,7 +325,7 @@ define Package/$(PKG_NAME)/install/dir done endef -define Package/$(PKG_NAME)/install/ftmod +define Package/$(PKG_LIBFTDM)/install/ftmod $(INSTALL_DIR) $(1)$(FS_STABLE_MOD_DIR) $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(FS_STABLE_MOD_DIR)/ftmod_$(2).so \ $(1)$(FS_STABLE_MOD_DIR) @@ -342,22 +343,43 @@ define Package/$(PKG_NAME)/install/mod $(1)$(FS_STABLE_MOD_DIR) endef -define Package/$(LIBFTDM) - CATEGORY:=Libraries - DEPENDS:=$(PKG_NAME) +define Package/$(PKG_LIBFTDM)/Default SECTION:=libs + CATEGORY:=Libraries SUBMENU:=Telephony - TITLE:=TDM signaling and media API URL:=https://www.$(PRG_NAME).org endef -define Package/$(LIBFTDM)/description -Provides a unified interface to hardware TDM cards and ss7 stacks for -FreeSWITCH. +define Package/$(PKG_LIBFTDM) +$(call Package/$(PKG_LIBFTDM)/Default) + DEPENDS:= + TITLE:=TDM signaling and media API + MENU:=1 + URL:=https://www.$(PRG_NAME).org endef -define Package/$(LIBFTDM)/install -$(call Package/$(PKG_NAME)/install/lib,$(1),$(LIBFTDM)) +define Package/$(PKG_LIBFTDM)/description +Provides a unified interface to hardware TDM cards and SS7 stacks. +endef + +define Package/$(PKG_LIBFTDM)/install +$(call Package/$(PKG_NAME)/install/lib,$(1),lib$(FTDM)) +endef + +define Package/$(PKG_LIBFTDM)/FTModule +define Package/$(PKG_LIBFTDM)-ftmod-$(1) +$(call Package/$(PKG_LIBFTDM)/Default) + DEPENDS:=PACKAGE_$(PKG_LIBFTDM)-ftmod-$(1):$(PKG_LIBFTDM) \ + $(patsubst +%,+PACKAGE_$(PKG_LIBFTDM)-ftmod-$(1):%,$(4)) + TITLE:=$(2) FreeTDM module +endef +define Package/$(PKG_LIBFTDM)-ftmod-$(1)/description +$(subst \n,$(newline),$(3)) +endef +define Package/$(PKG_LIBFTDM)-ftmod-$(1)/install +$(call Package/$(PKG_LIBFTDM)/install/ftmod,$$(1),$(1)) +endef +$$(eval $$(call BuildPackage,$(PKG_LIBFTDM)-ftmod-$(1))) endef define Package/$(PKG_NAME)/config @@ -568,24 +590,6 @@ endef $$(eval $$(call BuildPackage,$(PKG_NAME)-example-$(1))) endef -define Package/$(PKG_NAME)/FTModule -define Package/$(PKG_NAME)-ftmod-$(1) -$(call Package/$(PKG_NAME)/Default) - DEPENDS := \ - $(PKG_NAME) \ - $(patsubst +%,+PACKAGE_$(PKG_NAME)-ftmod-$(1):%,$(4)) \ - +PACKAGE_$(PKG_NAME)-ftmod-$(1):$(LIBFTDM) - TITLE:=$(2) FreeTDM module -endef -define Package/$(PKG_NAME)-ftmod-$(1)/description -$(subst \n,$(newline),$(3)) -endef -define Package/$(PKG_NAME)-ftmod-$(1)/install -$(call Package/$(PKG_NAME)/install/ftmod,$$(1),$(1)) -endef -$$(eval $$(call BuildPackage,$(PKG_NAME)-ftmod-$(1))) -endef - define Package/$(PKG_NAME)/Language define Package/$(PKG_NAME)-lang-$(1) $(call Package/$(PKG_NAME)/Default) @@ -698,8 +702,8 @@ CONFIGURE_ARGS+= \ $(if $(CONFIG_FS_STABLE_WITH_ODBC),--with-odbc="$(STAGING_DIR)/usr") \ $(if $(CONFIG_FS_STABLE_WITH_PGSQL),,--without-pgsql) \ $(if $(CONFIG_FS_STABLE_WITH_PNG),,--without-png) \ - $(if $(CONFIG_PACKAGE_$(PKG_NAME)-ftmod-libpri),--with-libpri="$(STAGING_DIR)/usr",--without-libpri) \ - $(if $(CONFIG_PACKAGE_$(PKG_NAME)-ftmod-pritap),--with-pritap,--without-pritap) + $(if $(CONFIG_PACKAGE_$(PKG_LIBFTDM)-ftmod-libpri),--with-libpri="$(STAGING_DIR)/usr",--without-libpri) \ + $(if $(CONFIG_PACKAGE_$(PKG_LIBFTDM)-ftmod-pritap),--with-pritap,--without-pritap) ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-python-esl)$(CONFIG_PACKAGE_$(PKG_NAME)-mod-python),) CONFIGURE_ARGS+= \ @@ -996,9 +1000,9 @@ endef define Build/Compile $(call Build/Compile/Default) # FreeTDM is only compiled/installed automatically if mod_freetdm is selected -ifneq ($(CONFIG_PACKAGE_$(LIBFTDM)),) +ifneq ($(CONFIG_PACKAGE_$(PKG_LIBFTDM)),) ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-freetdm),) - $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/freetdm) + $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/$(FTDM)) endif endif ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl),) @@ -1011,9 +1015,9 @@ endef define Build/Install $(call Build/Install/Default) -ifneq ($(CONFIG_PACKAGE_$(LIBFTDM)),) +ifneq ($(CONFIG_PACKAGE_$(PKG_LIBFTDM)),) ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-freetdm),) - $(call Build/Install/Default,-C $(PKG_BUILD_DIR)/libs/freetdm install) + $(call Build/Install/Default,-C $(PKG_BUILD_DIR)/libs/$(FTDM) install) endif endif ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl),) @@ -1032,15 +1036,15 @@ define Build/InstallDev $(INSTALL_DATA) \ $(PKG_INSTALL_DIR)$(FS_STABLE_PKGCONFIG_DIR)/$(PRG_NAME).pc \ $(1)$(FS_STABLE_PKGCONFIG_DIR) -ifneq ($(CONFIG_PACKAGE_$(LIBFTDM)),) +ifneq ($(CONFIG_PACKAGE_$(PKG_LIBFTDM)),) $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)$(FS_STABLE_PKGCONFIG_DIR)/freetdm.pc \ + $(PKG_INSTALL_DIR)$(FS_STABLE_PKGCONFIG_DIR)/$(FTDM).pc \ $(1)$(FS_STABLE_PKGCONFIG_DIR) $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include endif endef -$(eval $(call BuildPackage,$(LIBFTDM))) +$(eval $(call BuildPackage,$(PKG_LIBFTDM))) $(eval $(call BuildPackage,$(PKG_NAME))) $(eval $(call BuildPackage,$(PKG_NAME)-misc-hotplug)) $(eval $(call BuildPackage,$(PKG_NAME)-misc-perl-esl)) @@ -1071,12 +1075,12 @@ $(eval $(call Package/$(PKG_NAME)/Example,vanilla)) # 4 - Module dependencies ################################ -$(eval $(call Package/$(PKG_NAME)/FTModule,analog,Analog,Offers generic FXO/FXS support for any type of card supported by FreeTDM.,)) -$(eval $(call Package/$(PKG_NAME)/FTModule,analog_em,Analog EM,Offers generic E&M signaling for any type of card supported by FreeTDM.,)) -$(eval $(call Package/$(PKG_NAME)/FTModule,libpri,LibPRI,Offers support for PRI lines using the open source libpri stack for any\ntype of card supported by FreeTDM. Supports both PRI and BRI signalling.,+libpri @!aarch64)) -$(eval $(call Package/$(PKG_NAME)/FTModule,pritap,PRI tapping,This module is used to tap PRI lines.,+$(PKG_NAME)-ftmod-libpri)) -$(eval $(call Package/$(PKG_NAME)/FTModule,skel,Skeleton,ftmod_skel is an example module.,)) -$(eval $(call Package/$(PKG_NAME)/FTModule,zt,DAHDI I/O,This module supports the DAHDI interface. The DAHDI interface is used by\nseveral hardware vendors.,)) +$(eval $(call Package/$(PKG_LIBFTDM)/FTModule,analog,Analog,Offers generic FXO/FXS support for any type of card supported by FreeTDM.,)) +$(eval $(call Package/$(PKG_LIBFTDM)/FTModule,analog_em,Analog EM,Offers generic E&M signaling for any type of card supported by FreeTDM.,)) +$(eval $(call Package/$(PKG_LIBFTDM)/FTModule,libpri,LibPRI,Offers support for PRI lines using the open source libpri stack for any\ntype of card supported by FreeTDM. Supports both PRI and BRI signalling.,+libpri @!aarch64)) +$(eval $(call Package/$(PKG_LIBFTDM)/FTModule,pritap,PRI tapping,This module is used to tap PRI lines.,+$(PKG_LIBFTDM)-ftmod-libpri)) +$(eval $(call Package/$(PKG_LIBFTDM)/FTModule,skel,Skeleton,ftmod_skel is an example module.,)) +$(eval $(call Package/$(PKG_LIBFTDM)/FTModule,zt,DAHDI I/O,This module supports the DAHDI interface. The DAHDI interface is used by\nseveral hardware vendors.,)) ################################ # FreeSWITCH language files @@ -1163,7 +1167,7 @@ $(eval $(call Package/$(PKG_NAME)/Module,event_zmq,ZMQ event,ZMQ event module.,) $(eval $(call Package/$(PKG_NAME)/Module,expr,Expr,This module adds expr support for expression evaluation.,)) $(eval $(call Package/$(PKG_NAME)/Module,fifo,FIFO,This module adds a first-in first-out queue system.,)) $(eval $(call Package/$(PKG_NAME)/Module,format_cdr,Multiformat CDR,A superset of mod_json_cdr and mod_xml_cdr.,)) -$(eval $(call Package/$(PKG_NAME)/Module,freetdm,FreeTDM endpoint,This module is the glue between FreeSWITCH and FreeTDM.,+$(LIBFTDM))) +$(eval $(call Package/$(PKG_NAME)/Module,$(FTDM),FreeTDM endpoint,This module is the glue between FreeSWITCH and FreeTDM.,+$(PKG_LIBFTDM))) $(eval $(call Package/$(PKG_NAME)/Module,fsk,FSK,This module adds frequency-shift keying support which can be used to\nsend and receive caller ID.,)) $(eval $(call Package/$(PKG_NAME)/Module,fsv,FSV,This module provides dialplan applications for recording and playing\nvideos.,)) $(eval $(call Package/$(PKG_NAME)/Module,g723_1,G.723.1 passthrough,G.723.1 codec passthrough.,)) From abacde6dd6072ccf63d2089671b0928b8984a395 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Mon, 5 Feb 2018 22:57:40 +0100 Subject: [PATCH 3/5] freeswitch-stable: move the config define Signed-off-by: Sebastian Kemper --- net/freeswitch-stable/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/freeswitch-stable/Makefile b/net/freeswitch-stable/Makefile index 4a34b82..b811f14 100644 --- a/net/freeswitch-stable/Makefile +++ b/net/freeswitch-stable/Makefile @@ -343,6 +343,10 @@ define Package/$(PKG_NAME)/install/mod $(1)$(FS_STABLE_MOD_DIR) endef +define Package/$(PKG_NAME)/config + source "$(SOURCE)/Config.in" +endef + define Package/$(PKG_LIBFTDM)/Default SECTION:=libs CATEGORY:=Libraries @@ -382,10 +386,6 @@ endef $$(eval $$(call BuildPackage,$(PKG_LIBFTDM)-ftmod-$(1))) endef -define Package/$(PKG_NAME)/config - source "$(SOURCE)/Config.in" -endef - define Package/$(PKG_NAME)/Default SUBMENU:=Telephony SECTION:=net From 584c9841f37603069ae49047e180151da03cee96 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Mon, 5 Feb 2018 23:04:15 +0100 Subject: [PATCH 4/5] freeswitch-stable: tidy up the Build defines This commit changes Build/Compile, Build/Install and Build/InstallDev to prevent building/installing items that are not selected. I.e. when freeswitch-stable is not selected, only libfreetdm-stable gets built. Signed-off-by: Sebastian Kemper --- net/freeswitch-stable/Makefile | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/net/freeswitch-stable/Makefile b/net/freeswitch-stable/Makefile index b811f14..e13b508 100644 --- a/net/freeswitch-stable/Makefile +++ b/net/freeswitch-stable/Makefile @@ -998,12 +998,12 @@ endif endef define Build/Compile - $(call Build/Compile/Default) -# FreeTDM is only compiled/installed automatically if mod_freetdm is selected +# Compile FreeTDM first ifneq ($(CONFIG_PACKAGE_$(PKG_LIBFTDM)),) -ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-freetdm),) $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/$(FTDM)) endif +ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)),) + $(call Build/Compile/Default) endif ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl),) $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl perlmod) @@ -1014,11 +1014,12 @@ endif endef define Build/Install - $(call Build/Install/Default) +# Again, FreeTDM first ifneq ($(CONFIG_PACKAGE_$(PKG_LIBFTDM)),) -ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-freetdm),) $(call Build/Install/Default,-C $(PKG_BUILD_DIR)/libs/$(FTDM) install) endif +ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)),) + $(call Build/Install/Default) endif ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl),) $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl DESTDIR=$(PKG_INSTALL_DIR) perlmod-install) @@ -1028,19 +1029,30 @@ ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-python-esl),) endif endef -define Build/InstallDev +define Build/InstallDev/$(PKG_LIBFTDM) + $(INSTALL_DIR) $(1)/usr/include + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)$(FS_STABLE_PKGCONFIG_DIR)/$(FTDM).pc \ + $(1)$(FS_STABLE_PKGCONFIG_DIR) + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include +endef + +define Build/InstallDev/$(PKG_NAME) $(INSTALL_DIR) $(1)$(FS_STABLE_INCLUDES_DIR) - $(INSTALL_DIR) $(1)$(FS_STABLE_PKGCONFIG_DIR) $(INSTALL_DATA) $(PKG_INSTALL_DIR)$(FS_STABLE_INCLUDES_DIR)/*.h \ $(1)$(FS_STABLE_INCLUDES_DIR) $(INSTALL_DATA) \ $(PKG_INSTALL_DIR)$(FS_STABLE_PKGCONFIG_DIR)/$(PRG_NAME).pc \ $(1)$(FS_STABLE_PKGCONFIG_DIR) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)$(FS_STABLE_PKGCONFIG_DIR) ifneq ($(CONFIG_PACKAGE_$(PKG_LIBFTDM)),) - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)$(FS_STABLE_PKGCONFIG_DIR)/$(FTDM).pc \ - $(1)$(FS_STABLE_PKGCONFIG_DIR) - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include + $(call Build/InstallDev/$(PKG_LIBFTDM),$(1)) +endif +ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)),) + $(call Build/InstallDev/$(PKG_NAME),$(1)) endif endef From bd66ecc3b7dfbca5468af482382cb2512a2c44e6 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Mon, 5 Feb 2018 23:08:19 +0100 Subject: [PATCH 5/5] freeswitch-stable: prevent libfreetdm from being installed twice This patch takes care of that. This commit concludes the series with a revision bump. Signed-off-by: Sebastian Kemper --- net/freeswitch-stable/Makefile | 2 +- .../patches/330-do-not-install-freetdm-twice.patch | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 net/freeswitch-stable/patches/330-do-not-install-freetdm-twice.patch diff --git a/net/freeswitch-stable/Makefile b/net/freeswitch-stable/Makefile index e13b508..9b44730 100644 --- a/net/freeswitch-stable/Makefile +++ b/net/freeswitch-stable/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PRG_NAME:=freeswitch PKG_NAME:=$(PRG_NAME)-stable PKG_VERSION:=1.6.20 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_MAINTAINER:=Sebastian Kemper PKG_SOURCE:=$(PRG_NAME)-$(PKG_VERSION).tar.xz diff --git a/net/freeswitch-stable/patches/330-do-not-install-freetdm-twice.patch b/net/freeswitch-stable/patches/330-do-not-install-freetdm-twice.patch new file mode 100644 index 0000000..a81d60b --- /dev/null +++ b/net/freeswitch-stable/patches/330-do-not-install-freetdm-twice.patch @@ -0,0 +1,10 @@ +--- a/libs/freetdm/mod_freetdm/Makefile.in ++++ b/libs/freetdm/mod_freetdm/Makefile.in +@@ -15,7 +15,6 @@ $(FTLA): $(FT_DIR)/.update + cd $(FT_DIR) && $(MAKE) + + local_install: +- cd $(FT_DIR) && $(MAKE) install + [ -f $(DESTDIR)@confdir@/autoload_configs/freetdm.conf.xml ] || cp -f $(FT_DIR)/conf/freetdm.conf.xml $(DESTDIR)@confdir@/autoload_configs + + local_clean: