# package is updated to the version used by Asterisk, with all Asterisk
# patches applied and with configuration synced.
-%define pjproject_version 2.7.1
+%define pjproject_version 2.7.2
%define opus_commit a6b9521f10817c1f39f21f90fecd3f00bbb164d0
Summary: Asterisk PBX
Summary(pl.UTF-8): Centralka (PBX) Asterisk
Name: asterisk
-Version: 15.3.0
+Version: 15.4.1
Release: 1
License: GPL v2
Group: Applications/System
Source0: http://downloads.digium.com/pub/asterisk/releases/%{name}-%{version}.tar.gz
-# Source0-md5: 18c9d26355225c0499a499ef5869156a
+# Source0-md5: bf75531a00db8d565c981cf9b24f6f72
Source1: %{name}.init
Source2: %{name}.sysconfig
Source3: %{name}.tmpfiles
Source8: https://github.com/seanbright/asterisk-opus/archive/%{opus_commit}/asterisk-opus-%{opus_commit}.tar.gz
# Source8-md5: d2deae1095b6b42331d3060700c25493
Source9: https://raw.githubusercontent.com/asterisk/third-party/master/pjproject/%{pjproject_version}/pjproject-%{pjproject_version}.tar.bz2
-# Source9-md5: 99a64110fa5c2debff40e0e8d4676380
-Patch0: lua51-path.patch
+# Source9-md5: fa3f0bc098c4bff48ddd92db1c016a7a
+Patch0: lua_versions.patch
Patch1: %{name}-ppc.patch
Patch2: FHS-paths.patch
Patch3: pld-banner.patch
BuildRequires: imap-devel
%{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
BuildRequires: jansson-devel
+BuildRequires: libatomic-devel
BuildRequires: libcap-devel
BuildRequires: libedit-devel
BuildRequires: libgsm-devel
BuildRequires: libxml2-devel >= 2.0
BuildRequires: libxslt-devel
BuildRequires: lpc10-devel
-BuildRequires: lua51-devel >= 5.1
+BuildRequires: lua53-devel >= 5.3
#BuildRequires: mISDNuser-devel < 2
%{?with_mysql:BuildRequires: mysql-devel}
BuildRequires: ncurses-devel
+++ /dev/null
-diff -dur asterisk-12.0.0.orig/configure.ac asterisk-12.0.0/configure.ac
---- asterisk-12.0.0.orig/configure.ac 2013-12-03 18:59:41.000000000 +0100
-+++ asterisk-12.0.0/configure.ac 2014-01-07 09:42:07.000000000 +0100
-@@ -2113,12 +2113,12 @@
- [${PWLIB_INCLUDE}], [${PWLIB_LIB}])
- fi
-
--AST_EXT_LIB_CHECK([LUA], [lua5.1], [luaL_newstate], [lua5.1/lua.h], [-lm])
-+AST_EXT_LIB_CHECK([LUA], [lua51], [luaL_newstate], [lua51/lua.h], [-lm])
- if test "x${PBX_LUA}" = "x1" ; then
- if test x"${LUA_DIR}" = x; then
-- LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua5.1"
-+ LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua51"
- else
-- LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua5.1"
-+ LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua51"
- fi
- fi
-
--- /dev/null
+diff -dur asterisk-15.4.1.orig/configure.ac asterisk-15.4.1/configure.ac
+--- asterisk-15.4.1.orig/configure.ac 2018-06-11 23:21:37.000000000 +0200
++++ asterisk-15.4.1/configure.ac 2018-06-12 10:34:15.000000000 +0200
+@@ -2388,7 +2388,7 @@
+ fi
+ AST_EXT_LIB_CHECK([OPUSFILE], [opusfile], [op_open_callbacks], [opus/opusfile.h], [], [$__opus_include])
+
+-for ver in 5.3 5.2 5.1; do
++for ver in 53 52 51 5.3 5.2 5.1; do
+ AST_EXT_LIB_CHECK([LUA], lua${ver}, [luaL_newstate], lua${ver}/lua.h, [-lm])
+ if test "x${PBX_LUA}" = "x1" ; then
+ if test x"${LUA_DIR}" = x; then