[packages/asterisk] Version: 13.12.0, change opus codec source
jajcus
jajcus at pld-linux.org
Wed Oct 26 13:02:01 CEST 2016
commit d57ea64bba36fd281e50f3153a8d78167bbc1f62
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date: Wed Oct 26 12:59:13 2016 +0200
Version: 13.12.0, change opus codec source
Digium provides own opus codec for Asterisk 13.12, but it is not open
source. We should rather keep an open source one.
https://github.com/seanbright/asterisk-opus has been discontinued, so
https://github.com/traud/asterisk-opus fork will be used instead.
asterisk-opus.patch | 90 +++++++++++++++++++++++++----------------------------
asterisk.spec | 18 +++++++----
menuselect.makedeps | 4 ++-
menuselect.makeopts | 2 +-
4 files changed, 58 insertions(+), 56 deletions(-)
---
diff --git a/asterisk.spec b/asterisk.spec
index da5afe9..e5cbf57 100644
--- a/asterisk.spec
+++ b/asterisk.spec
@@ -32,17 +32,17 @@
%bcond_without apidocs # disable apidocs building
%bcond_without verbose # verbose build
-%define opus_commit 058319d6ad464c79bbea71cf589883af62a18548
+%define opus_commit a6b9521f10817c1f39f21f90fecd3f00bbb164d0
Summary: Asterisk PBX
Summary(pl.UTF-8): Centralka (PBX) Asterisk
Name: asterisk
-Version: 13.11.2
+Version: 13.12.0
Release: 1
License: GPL v2
Group: Applications/System
Source0: http://downloads.digium.com/pub/asterisk/releases/%{name}-%{version}.tar.gz
-# Source0-md5: 6162f342bb434098fb8c559e25802576
+# Source0-md5: b4083016753c26a7440bdca5351ab9fe
Source1: %{name}.init
Source2: %{name}.sysconfig
Source3: %{name}.tmpfiles
@@ -51,9 +51,9 @@ Source5: %{name}.service
# menuselect.* -> make menuconfig; choose options; copy resulting files here
Source6: menuselect.makedeps
Source7: menuselect.makeopts
-# https://github.com/seanbright/asterisk-opus/
+# https://github.com/traud/asterisk-opus
Source8: https://github.com/seanbright/asterisk-opus/archive/%{opus_commit}/asterisk-opus-%{opus_commit}.tar.gz
-# Source8-md5: 2cc55d2036ee4b7e5a44ea5e2d7280f3
+# Source8-md5: d2deae1095b6b42331d3060700c25493
Patch0: lua51-path.patch
Patch1: %{name}-ppc.patch
Patch2: FHS-paths.patch
@@ -112,6 +112,7 @@ BuildRequires: newt-devel
%{?with_ldap:BuildRequires: openldap-devel}
BuildRequires: openssl-devel >= 0.9.7d
BuildRequires: opus-devel
+%{?with_opus:BuildRequires: opusfile-devel}
BuildRequires: pam-devel
%{?with_pjsip:BuildRequires: pjproject-devel >= 2.3}
BuildRequires: pkgconfig
@@ -749,6 +750,8 @@ Dokumentacja API Asteriska.
cp -a asterisk-opus-%{opus_commit}/codecs/* codecs
cp -a asterisk-opus-%{opus_commit}/formats/* formats
+cp -a asterisk-opus-%{opus_commit}/res/* rest
+cp -a asterisk-opus-%{opus_commit}/include/asterisk/* include/asterisk
%endif
# Fixup makefile so sound archives aren't downloaded/installed
@@ -848,6 +851,9 @@ menuselect/menuselect --disable cdr_radius --disable cel_radius menuselect.makeo
%if %{without pjsip}
menuselect/menuselect --disable res_pjsip --disable chan_pjsip menuselect.makeopts
%endif
+%if %{without opus_vp8}
+menuselect/menuselect --disable codec_opus_open_source --disable format_ogg_opus_open_source
+%endif
%{__sed} -i -e 's/^MENUSELECT_OPTS_app_voicemail=.*$/MENUSELECT_OPTS_app_voicemail=FILE_STORAGE/' menuselect.makeopts
@@ -1230,7 +1236,7 @@ chown -R asterisk:asterisk /var/lib/asterisk
%attr(755,root,root) %{_libdir}/asterisk/modules/codec_g722.so
%attr(755,root,root) %{_libdir}/asterisk/modules/codec_g726.so
%if %{with opus_vp8}
-%attr(755,root,root) %{_libdir}/asterisk/modules/codec_opus.so
+%attr(755,root,root) %{_libdir}/asterisk/modules/codec_opus_open_source.so
%endif
%attr(755,root,root) %{_libdir}/asterisk/modules/codec_ulaw.so
%attr(755,root,root) %{_libdir}/asterisk/modules/format_g719.so
diff --git a/asterisk-opus.patch b/asterisk-opus.patch
index c13c319..0c7d21b 100644
--- a/asterisk-opus.patch
+++ b/asterisk-opus.patch
@@ -1,52 +1,46 @@
-diff -dur asterisk-13.7.2.orig/main/codec_builtin.c asterisk-13.7.2/main/codec_builtin.c
---- asterisk-13.7.2.orig/main/codec_builtin.c 2016-02-05 21:32:40.000000000 +0100
-+++ asterisk-13.7.2/main/codec_builtin.c 2016-03-09 11:55:44.000000000 +0100
-@@ -38,6 +38,8 @@
- #include "asterisk/format_cache.h"
- #include "asterisk/frame.h"
+--- a/build_tools/menuselect-deps.in
++++ b/build_tools/menuselect-deps.in
+@@ -45,6 +45,7 @@ NEON29=@PBX_NEON29@
+ OGG=@PBX_OGG@
+ OPENH323=@PBX_OPENH323@
+ OPUS=@PBX_OPUS@
++OPUSFILE=@PBX_OPUSFILE@
+ OSPTK=@PBX_OSPTK@
+ OSS=@PBX_OSS@
+ PGSQL=@PBX_PGSQL@
+--- a/configure.ac
++++ b/configure.ac
+@@ -468,6 +468,7 @@ AST_EXT_LIB_SETUP([NEWT], [newt], [newt])
+ AST_EXT_LIB_SETUP([OGG], [OGG], [ogg])
+ AST_EXT_LIB_SETUP([OPENR2], [MFR2], [openr2])
+ AST_EXT_LIB_SETUP([OPUS], [Opus], [opus])
++AST_EXT_LIB_SETUP([OPUSFILE], [Opusfile], [opusfile])
+ AST_EXT_LIB_SETUP([OSPTK], [OSP Toolkit], [osptk])
+ AST_EXT_LIB_SETUP([OSS], [Open Sound System], [oss])
+ AST_EXT_LIB_SETUP([PGSQL], [PostgreSQL], [postgres])
+@@ -2293,6 +2294,13 @@ AST_EXT_LIB_CHECK([SS7], [ss7], [ss7_set_isup_timer], [libss7.h])
+ AST_EXT_LIB_CHECK([OPENR2], [openr2], [openr2_chan_new], [openr2.h])
-+#include <opus/opus.h>
-+
- enum frame_type {
- TYPE_HIGH, /* 0x0 */
- TYPE_LOW, /* 0x1 */
-@@ -698,6 +700,11 @@
- .get_length = g719_length,
- };
-
-+static int opus_samples(struct ast_frame *frame)
-+{
-+ return opus_packet_get_nb_samples(frame->data.ptr, frame->datalen, 48000);
-+}
-+
- static struct ast_codec opus = {
- .name = "opus",
- .description = "Opus Codec",
-@@ -707,6 +714,7 @@
- .maximum_ms = 60,
- .default_ms = 20,
- .minimum_bytes = 10,
-+ .samples_count = opus_samples,
- };
+ AST_EXT_LIB_CHECK([OPUS], [opus], [opus_encoder_create], [opus/opus.h])
++# opusfile.h includes <opus_multistream.h> so we need to make sure that
++# either $OPUS_INCLUDE or /usr/include/opus is added to the search path.
++__opus_include=${OPUS_INCLUDE}
++if test -z "$__opus_include" -o x"$__opus_include" = x" " ; then
++ __opus_include=-I/usr/include/opus
++fi
++AST_EXT_LIB_CHECK([OPUSFILE], [opusfile], [op_open_callbacks], [opus/opusfile.h], [], [$__opus_include])
- static struct ast_codec jpeg = {
-diff -dur asterisk-13.7.2.orig/main/Makefile asterisk-13.7.2/main/Makefile
---- asterisk-13.7.2.orig/main/Makefile 2016-03-09 11:53:45.000000000 +0100
-+++ asterisk-13.7.2/main/Makefile 2016-03-09 11:55:44.000000000 +0100
-@@ -40,6 +40,7 @@
- AST_LIBS+=$(URIPARSER_LIB)
- AST_LIBS+=$(UUID_LIB)
- AST_LIBS+=$(CRYPT_LIB)
-+AST_LIBS+=$(OPUS_LIB)
- AST_LIBS+=$(AST_CLANG_BLOCKS_LIBS)
+ if test "${USE_PWLIB}" != "no"; then
+ if test -n "${PWLIB_DIR}"; then
+--- a/makeopts.in
++++ b/makeopts.in
+@@ -223,6 +223,9 @@ OGG_LIB=@OGG_LIB@
+ OPUS_INCLUDE=@OPUS_INCLUDE@
+ OPUS_LIB=@OPUS_LIB@
- ifneq ($(findstring $(OSARCH), linux-gnu linux-gnux32 uclinux linux-uclibc kfreebsd-gnu),)
-@@ -160,6 +161,7 @@
- bucket.o: _ASTCFLAGS+=$(URIPARSER_INCLUDE)
- crypt.o: _ASTCFLAGS+=$(CRYPT_INCLUDE)
- uuid.o: _ASTCFLAGS+=$(UUID_INCLUDE)
-+codec_builtin.o: _ASTCFLAGS+=$(OPUS_INCLUDE)
++OPUSFILE_INCLUDE=@OPUSFILE_INCLUDE@
++OPUSFILE_LIB=@OPUSFILE_LIB@
++
+ OSPTK_INCLUDE=@OSPTK_INCLUDE@
+ OSPTK_LIB=@OSPTK_LIB@
- ifneq ($(findstring ENABLE_UPLOADS,$(MENUSELECT_CFLAGS)),)
- http.o: _ASTCFLAGS+=$(GMIME_INCLUDE)
-
diff --git a/menuselect.makedeps b/menuselect.makedeps
index 9ee161b..d37aa71 100644
--- a/menuselect.makedeps
+++ b/menuselect.makedeps
@@ -33,8 +33,10 @@ MENUSELECT_DEPENDS_codec_dahdi=DAHDI
MENUSELECT_DEPENDS_codec_gsm=GSM
MENUSELECT_DEPENDS_codec_ilbc=ILBC
MENUSELECT_DEPENDS_codec_speex=SPEEX SPEEX_PREPROCESS SPEEXDSP
+MENUSELECT_DEPENDS_codec_opus_open_source=OPUS
MENUSELECT_DEPENDS_codec_lpc10=LPC10
-MENUSELECT_DEPENDS_format_ogg_vorbis=VORBIS OGG
+MENUSELECT_DEPENDS_format_ogg_vorbis=VORBIS OGG
+MENUSELECT_DEPENDS_format_ogg_opus_open_source=OPUSFILE
MENUSELECT_DEPENDS_func_aes=CRYPTO
MENUSELECT_DEPENDS_func_curl=CURL
MENUSELECT_DEPENDS_func_iconv=ICONV
diff --git a/menuselect.makeopts b/menuselect.makeopts
index e68f475..9fbbece 100644
--- a/menuselect.makeopts
+++ b/menuselect.makeopts
@@ -4,7 +4,7 @@ MENUSELECT_BRIDGES=
MENUSELECT_CDR=cdr_sqlite
MENUSELECT_CEL=
MENUSELECT_CHANNELS=chan_misdn chan_nbs chan_vpb
-MENUSELECT_CODECS=
+MENUSELECT_CODECS=codec_opus
MENUSELECT_FORMATS=
MENUSELECT_FUNCS=
MENUSELECT_PBX=
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/asterisk.git/commitdiff/d57ea64bba36fd281e50f3153a8d78167bbc1f62
More information about the pld-cvs-commit
mailing list