# and /usr/lib64/asterisk/modules/app_directory_imap.so
# - lua not detected
# - ncurses dep gone for good (replaced by libedit)?
-# - make as-needed compatible
+# - make as-needed compatible, or why chan_h323 gets built w/o libs initially?
#
# Conditional build:
%bcond_with rxfax # without rx (also tx:-D) fax
%bcond_without verbose # verbose build
%define spandsp_version 0.0.2pre26
-%define rel 0.23
+%define rel 0.28
Summary: Asterisk PBX
Summary(pl.UTF-8): Centralka (PBX) Asterisk
Name: asterisk
# Source10-md5: 8c8fcb263b76897022b4c28052a7b439
Source11: http://soft-switch.org/downloads/spandsp/spandsp-%{spandsp_version}/asterisk-1.2.x/app_rxfax.c
# Source11-md5: ab6983b51c412883545b36993d704999
+Patch1: lua51-path.patch
Patch2: %{name}-no_k6_on_sparc.patch
Patch3: %{name}-lib.patch
Patch4: %{name}-ppc.patch
BuildRequires: libedit-devel
BuildRequires: libogg-devel
BuildRequires: libvorbis-devel
+BuildRequires: lua51-devel
BuildRequires: mISDNuser-devel
BuildRequires: mysql-devel
BuildRequires: ncurses-devel
BuildRequires: libtool-ltdl-devel
BuildRequires: libusb-devel
BuildRequires: lm_sensors-devel
-BuildRequires: lua-devel
BuildRequires: mISDN-devel
%endif
Requires: rc-scripts
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-# h323 for sure broken
-%define filterout_ld -Wl,--as-needed
-
%description
Asterisk is an Open Source PBX and telephony development platform that
can both replace a conventional PBX and act as a platform for
%prep
%setup -q
+%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%{__autoconf}
export ASTCFLAGS="%{rpmcflags}"
+export ASTLDFLAGS="%{rpmldflags}"
export WGET="/bin/true"
# be sure to invoke ./configure with our flags
cp -f .cleancount .lastclean
+# included conditionally, so make sure its there first
+%{__make} -C channels/h323 Makefile.ast \
+ %{?with_verbose:NOISY_BUILD=yes} \
+
%{__make} DEBUG= \
OPTIMIZE= \
ASTVARRUNDIR=%{_localstatedir}/run/asterisk \
ASTDBDIR=%{_localstatedir}/spool/asterisk \
%{?with_verbose:NOISY_BUILD=yes} \
+# rm, as it links it wrong for the fist time
+# i.e the flags written to file "channels/h323/Makefile.ast" are not yet there
+rm channels/*.so
+
rm apps/app_voicemail.o apps/app_directory.o
mv apps/app_voicemail.so apps/app_voicemail_plain.so
mv apps/app_directory.so apps/app_directory_plain.so
%files lua
%defattr(644,root,root,755)
%attr(640,root,asterisk) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asterisk/extensions.lua
-#%attr(755,root,root) %{_libdir}/asterisk/modules/pbx_lua.so
+%attr(755,root,root) %{_libdir}/asterisk/modules/pbx_lua.so
%files ldap
%defattr(644,root,root,755)
--- /dev/null
+--- asterisk-1.6.1.12/configure.ac~ 2009-12-30 19:53:27.000000000 +0200
++++ asterisk-1.6.1.12/configure.ac 2009-12-30 20:01:28.604197217 +0200
+@@ -1400,9 +1400,9 @@
+ [${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
+- AC_DEFINE_UNQUOTED([LUA51_PREFIX], [1], [Define to 1 if lua is found with a lua5.1 prefix])
++ AC_DEFINE_UNQUOTED([LUA51_PREFIX], [1], [Define to 1 if lua is found with a lua51 prefix])
+ fi
+
+ # Some distributions (like SuSE) remove the 5.1 suffix.
+--- asterisk-1.6.1.12/pbx/pbx_lua.c~ 2009-11-25 17:44:45.000000000 +0200
++++ asterisk-1.6.1.12/pbx/pbx_lua.c 2009-12-30 20:01:48.084048158 +0200
+@@ -43,9 +43,9 @@
+ #include "asterisk/hashtab.h"
+
+ #ifdef LUA51_PREFIX
+-#include <lua5.1/lua.h>
+-#include <lua5.1/lauxlib.h>
+-#include <lua5.1/lualib.h>
++#include <lua51/lua.h>
++#include <lua51/lauxlib.h>
++#include <lua51/lualib.h>
+ #else
+ #include <lua.h>
+ #include <lauxlib.h>