packages: asterisk/asterisk.spec, asterisk/lua51-path.patch (NEW) - fix lua...

glen glen at pld-linux.org
Wed Dec 30 20:30:39 CET 2009


Author: glen                         Date: Wed Dec 30 19:30:39 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- fix lua
- hacks for h323 proper linking
- chan_h323 somewhy makes chan_skype not to load at all (?!)

---- Files affected:
packages/asterisk:
   asterisk.spec (1.149 -> 1.150) , lua51-path.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/asterisk/asterisk.spec
diff -u packages/asterisk/asterisk.spec:1.149 packages/asterisk/asterisk.spec:1.150
--- packages/asterisk/asterisk.spec:1.149	Wed Dec 30 19:59:07 2009
+++ packages/asterisk/asterisk.spec	Wed Dec 30 20:30:33 2009
@@ -22,7 +22,7 @@
 #   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
@@ -35,7 +35,7 @@
 %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
@@ -52,6 +52,7 @@
 # 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
@@ -88,6 +89,7 @@
 BuildRequires:	libedit-devel
 BuildRequires:	libogg-devel
 BuildRequires:	libvorbis-devel
+BuildRequires:	lua51-devel
 BuildRequires:	mISDNuser-devel
 BuildRequires:	mysql-devel
 BuildRequires:	ncurses-devel
@@ -135,15 +137,11 @@
 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
@@ -444,6 +442,7 @@
 
 %prep
 %setup -q
+%patch1 -p1
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
@@ -486,6 +485,7 @@
 %{__autoconf}
 
 export ASTCFLAGS="%{rpmcflags}"
+export ASTLDFLAGS="%{rpmldflags}"
 export WGET="/bin/true"
 
 # be sure to invoke ./configure with our flags
@@ -515,6 +515,10 @@
 
 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 \
@@ -523,6 +527,10 @@
 	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
@@ -1045,7 +1053,7 @@
 %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)
@@ -1167,6 +1175,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.150  2009/12/30 19:30:33  glen
+- fix lua
+- hacks for h323 proper linking
+- chan_h323 somewhy makes chan_skype not to load at all (?!)
+
 Revision 1.149  2009/12/30 18:59:07  glen
 - h323 partially fixed
 - mibs to system mibs dir

================================================================
Index: packages/asterisk/lua51-path.patch
diff -u /dev/null packages/asterisk/lua51-path.patch:1.1
--- /dev/null	Wed Dec 30 20:30:39 2009
+++ packages/asterisk/lua51-path.patch	Wed Dec 30 20:30:33 2009
@@ -0,0 +1,29 @@
+--- 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>
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/asterisk/asterisk.spec?r1=1.149&r2=1.150&f=u



More information about the pld-cvs-commit mailing list