Signed-off-by: Viktar Palstsiuk <viktar.palsts...@promwad.com> --- net/asterisk-codec-g72x/Makefile | 58 +++++++++++++++++++++++++ net/asterisk-codec-g72x/patches/astconv.patch | 11 +++++ 2 files changed, 69 insertions(+), 0 deletions(-) create mode 100644 net/asterisk-codec-g72x/Makefile create mode 100644 net/asterisk-codec-g72x/patches/astconv.patch
diff --git a/net/asterisk-codec-g72x/Makefile b/net/asterisk-codec-g72x/Makefile new file mode 100644 index 0000000..1e56d0d --- /dev/null +++ b/net/asterisk-codec-g72x/Makefile @@ -0,0 +1,58 @@ +# +# Copyright (C) 2012 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-g72x +PKG_VERSION:=1.1-beta3 +PKG_RELEASE:=1 + +PKG_SOURCE:=asterisk-g72x-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://asterisk.hosting.lv/src/ +PKG_MD5SUM:=578e66fd8629a6055ef3e0903a5be6f3 + +PKG_BUILD_DIR=$(BUILD_DIR)/asterisk-g72x-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/asterisk18-codec-g72x + SUBMENU:=Telephony + SECTION:=net + CATEGORY:=Network + TITLE:=G.729 and G.723.1 codecs for Asterisk + URL:=http://asterisk.hosting.lv/ + MAINTAINER:=Viktar Palstsiuk <viktar.palsts...@promwad.com> + DEPENDS:=+asterisk18 +endef + +define Package/asterisk18-codec-g72x/description + G.729 and G.723.1 codecs for Asterisk open source PBX. +endef + +CONFIGURE_ARGS += \ + --with-itu \ + --with-g729nofp \ + --with-asterisk18 \ + --with-asterisk-includes=$(STAGING_DIR)/usr/include/asterisk-1.8/include/ + +TARGET_CFLAGS += -DLOW_MEMORY + +define Build/Compile + $(call Build/Compile/Default) + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o $(PKG_BUILD_DIR)/astconv $(PKG_BUILD_DIR)/astconv.c \ + -I$(STAGING_DIR)/usr/include/asterisk-1.8/include/ \ + -D_GNU_SOURCE -ldl -lm -s -rdynamic -Wall +endef + +define Package/asterisk18-codec-g72x/install + $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules + $(CP) $(PKG_BUILD_DIR)/.libs/codec_g72{3,9}.so $(1)/usr/lib/asterisk/modules/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/astconv $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,asterisk18-codec-g72x)) diff --git a/net/asterisk-codec-g72x/patches/astconv.patch b/net/asterisk-codec-g72x/patches/astconv.patch new file mode 100644 index 0000000..685b99e --- /dev/null +++ b/net/asterisk-codec-g72x/patches/astconv.patch @@ -0,0 +1,11 @@ +--- asterisk-g72x-1.1-beta3/astconv.c 2012-01-23 16:22:58.000000000 +0300 ++++ asterisk-g72x-1.1-beta3/astconv.c 2012-01-23 16:22:58.000000000 +0300 +@@ -107,7 +107,7 @@ + short slin[frame_size/2]; + int padded = 0, frame_started = 0; + +- f.subclass = AST_FORMAT_SLINEAR; ++ f.subclass.integer = AST_FORMAT_SLINEAR; + f.datalen = sizeof(slin); + f.samples = sizeof(slin)/2; + f.data.ptr = slin; -- 1.7.8.3 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel