summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Slachta2014-10-08 09:00:44 +0000
committerJiri Slachta2014-10-08 09:00:44 +0000
commitfe4b4a6db7904f35bcaf3373b9458b9c64e11a88 (patch)
tree23f70a00ed47b441ed345beb3e20192f08b74993
parentd82664cc5ef4454142782a5aba98eb370691e76e (diff)
downloadtelephony-fe4b4a6db7904f35bcaf3373b9458b9c64e11a88.tar.gz
bcg729, asterisk-codec-g729: Introduce support for codec g729
Within this commit the support for g729 codec is introduced (thanks to Alex Samorukov) Signed-off-by: Jiri Slachta <slachta@cesnet.cz>
-rw-r--r--libs/bcg729/Makefile59
-rw-r--r--net/asterisk-1.8.x-codec-g729/Makefile64
-rw-r--r--net/asterisk-11.x-codec-g729/Makefile64
3 files changed, 187 insertions, 0 deletions
diff --git a/libs/bcg729/Makefile b/libs/bcg729/Makefile
new file mode 100644
index 0000000..bd2c1c1
--- /dev/null
+++ b/libs/bcg729/Makefile
@@ -0,0 +1,59 @@
+#
+# Copyright (C) 2006-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:=bcg729
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://download-mirror.savannah.gnu.org/releases/linphone/plugins/sources/
+PKG_MD5SUM:=45e127a9a309aff94d3262d97b5aeab0
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/bcg729
+ SUBMENU:=Telephony
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Software G729A encoder and decoder library written in C
+ URL:=http://www.linphone.org/technical-corner/bcg729.html
+ DEPENDS:=@BUILD_PATENTED
+ MAINTAINER:=Alex Samorukov <samm@os2.kiev.ua>
+endef
+
+define Package/bcg729/description
+ Bcg729 is a software G729A encoder and decoder library written in C, developed
+ by Belledonne Communications, the company supporting the Linphone project.
+ It was written from scratch and is NOT a derivative work of ITU reference
+ source code in any kind.
+endef
+
+TARGET_CFLAGS += $(FPIC)
+CONFIGURE_ARGS += \
+ --enable-shared \
+ --enable-static
+
+define Package/bcg729/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbcg729.so* $(1)/usr/lib/
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) -R $(PKG_INSTALL_DIR)/usr/include/bcg729 $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbcg729.{a,so*} $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libbcg729.pc $(1)/usr/lib/pkgconfig/
+endef
+
+$(eval $(call BuildPackage,bcg729))
diff --git a/net/asterisk-1.8.x-codec-g729/Makefile b/net/asterisk-1.8.x-codec-g729/Makefile
new file mode 100644
index 0000000..0aac17a
--- /dev/null
+++ b/net/asterisk-1.8.x-codec-g729/Makefile
@@ -0,0 +1,64 @@
+#
+# 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-codec-g729
+PKG_VERSION:=1.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=asterisk-g72x-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://asterisk.hosting.lv/src/
+PKG_MD5SUM:=a830aefa27634787f41ff8b209ba585b
+
+PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/asterisk18-codec-g729
+ SUBMENU:=Telephony
+ SECTION:=net
+ CATEGORY:=Network
+ URL:=http://asterisk.hosting.lv
+ DEPENDS:= asterisk18 +bcg729
+ TITLE:=G.729 codec for Asterisk open source PBX
+ MAINTAINER:=Alex Samorukov <samm@os2.kiev.ua>
+endef
+
+define Package/asterisk11-codec-g729/description
+ Asterisk G.729 codec based on bcg729 implementation.
+endef
+
+MAKE_ARGS:= \
+ CC="$(TARGET_CC)" \
+ LD="$(TARGET_LD)" \
+ CFLAGS="$(TARGET_CFLAGS) -DASTERISK_VERSION_NUM=110000 -DLOW_MEMORY -D_XOPEN_SOURCE=600 $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/asterisk-1.8/include -DHAVE_CONFIG_H -I. -fPIC" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
+ DESTDIR="$(PKG_INSTALL_DIR)"
+
+CONFIGURE_ARGS+=\
+ --with-asterisk-includes=$(STAGING_DIR)/usr/include/asterisk-11/include \
+ --with-asterisk18 \
+ --with-bcg729 \
+ --enable-shared \
+ $(MAKE_ARGS)
+
+define Build/Prepare
+ rm -rf $(PKG_BUILD_DIR)/
+ mkdir -p $(PKG_BUILD_DIR)/
+ $(TAR) -xvjf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip 1
+ $(Build/Patch)
+endef
+
+define Package/asterisk18-codec-g729/install
+ $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/codec_g729.so $(1)/usr/lib/asterisk/modules/
+endef
+
+$(eval $(call BuildPackage,asterisk18-codec-g729))
diff --git a/net/asterisk-11.x-codec-g729/Makefile b/net/asterisk-11.x-codec-g729/Makefile
new file mode 100644
index 0000000..191c788
--- /dev/null
+++ b/net/asterisk-11.x-codec-g729/Makefile
@@ -0,0 +1,64 @@
+#
+# 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:=asterisk11-codec-g729
+PKG_VERSION:=1.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=asterisk-g72x-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://asterisk.hosting.lv/src/
+PKG_MD5SUM:=a830aefa27634787f41ff8b209ba585b
+
+PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/asterisk11-codec-g729
+ SUBMENU:=Telephony
+ SECTION:=net
+ CATEGORY:=Network
+ URL:=http://asterisk.hosting.lv
+ DEPENDS:= asterisk11 +bcg729
+ TITLE:=G.729 codec for Asterisk open source PBX
+ MAINTAINER:=Alex Samorukov <samm@os2.kiev.ua>
+endef
+
+define Package/asterisk11-codec-g729/description
+ Asterisk G.729 codec based on bcg729 implementation.
+endef
+
+MAKE_ARGS:= \
+ CC="$(TARGET_CC)" \
+ LD="$(TARGET_LD)" \
+ CFLAGS="$(TARGET_CFLAGS) -DASTERISK_VERSION_NUM=110000 -DLOW_MEMORY -D_XOPEN_SOURCE=600 $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/asterisk-11/include -DHAVE_CONFIG_H -I. -fPIC" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
+ DESTDIR="$(PKG_INSTALL_DIR)"
+
+CONFIGURE_ARGS+=\
+ --with-asterisk-includes=$(STAGING_DIR)/usr/include/asterisk-11/include \
+ --with-asterisk100 \
+ --with-bcg729 \
+ --enable-shared \
+ $(MAKE_ARGS)
+
+define Build/Prepare
+ rm -rf $(PKG_BUILD_DIR)/
+ mkdir -p $(PKG_BUILD_DIR)/
+ $(TAR) -xvjf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip 1
+ $(Build/Patch)
+endef
+
+define Package/asterisk11-codec-g729/install
+ $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/codec_g729.so $(1)/usr/lib/asterisk/modules/
+endef
+
+$(eval $(call BuildPackage,asterisk11-codec-g729))