# TODO:
# - cgi-bin package - separate, because of suid-root
# - use shared versions of lpc10, gsm,...
-# - subpkg for h323 (it has extra deps, etc)
# - CFLAGS passing
# - fix bluetooth patch
-# - system mxml
# - ~/.asterisk_history gets encoded with \xxx on exit, each time yet again
# - libpath:
# /usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
# 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.34
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
+Patch0: mxml-system.patch
+Patch1: lua51-path.patch
Patch2: %{name}-no_k6_on_sparc.patch
Patch3: %{name}-lib.patch
Patch4: %{name}-ppc.patch
Patch5: external-libedit.patch
Patch6: pkg-config-gmime.patch
Patch7: FHS-paths.patch
+Patch8: libedit-history.patch
+Patch9: pld-banner.patch
# http://soft-switch.org/downloads/spandsp/spandsp-%{spandsp_version}/asterisk-1.2.x/apps_Makefile.patch
Patch10: %{name}-txfax-Makefile.patch
Patch12: %{name}-chan_bluetooth.patch
BuildRequires: libedit-devel
BuildRequires: libogg-devel
BuildRequires: libvorbis-devel
+BuildRequires: lua51-devel
BuildRequires: mISDNuser-devel
+BuildRequires: mxml-devel
BuildRequires: mysql-devel
BuildRequires: ncurses-devel
BuildRequires: net-snmp-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
Application for the Asterisk PBX that uses Festival to convert text to
speech.
+%package h323
+Summary: H.323 protocol support for Asterisk
+Group: Applications/Networking
+Requires: %{name} = %{version}-%{release}
+
+%description h323
+This channel driver (chan_h323) provides support for the H.323 protocol for
+Asterisk. This is an implementation originally contributed by NuFone and
+nowdays maintained and distributed by Digium, Inc. Hence, it is considered the
+official H.323 chanel driver.
+
%package ices
Summary: Stream audio from Asterisk to an IceCast server
Group: Applications/Networking
%prep
%setup -q
+%patch0 -p1
+%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p0
%patch6 -p0
%patch7 -p0
+%patch8 -p1
+%patch9 -p1
%if %{with zhone}
sed -i -e 's|.*#define.*ZHONE_HACK.*|#define ZHONE_HACK 1|g' channels/chan_zap.c
%{__sed} -i -e 's/^install:.*$/install:/' sounds/Makefile
# avoid using it
-rm -rf imap
+rm -rf imap menuselect/mxml main/editline
%build
rm -f pbx/.depend
%{__autoconf}
export ASTCFLAGS="%{rpmcflags}"
+export ASTLDFLAGS="%{rpmldflags}"
export WGET="/bin/true"
# be sure to invoke ./configure with our flags
-cd menuselect/mxml
-%configure2_13
-cd ../../
-
cd menuselect
-%{__aclocal}
+%{__aclocal} -I ../autoconf
%{__autoheader}
%{__autoconf}
-%configure
+# we need just plain cli for building
+%configure \
+ --without-newt \
+ --without-gtk2 \
+ --without-curses \
+ --without-ncurses
cd ..
-cd main/editline
-%configure2_13
-cd ../..
-
%configure \
%{?with_bristuff:--with-gsmat=%{_prefix}} \
--with-imap=system \
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 \
%attr(640,root,asterisk) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asterisk/extensions.conf
%attr(640,root,asterisk) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asterisk/features.conf
%attr(640,root,asterisk) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asterisk/followme.conf
-%attr(640,root,asterisk) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asterisk/h323.conf
%attr(640,root,asterisk) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asterisk/http.conf
%attr(640,root,asterisk) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asterisk/iax.conf
%attr(640,root,asterisk) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asterisk/iaxprov.conf
%attr(755,root,root) %{_libdir}/asterisk/modules/cdr_custom.so
%attr(755,root,root) %{_libdir}/asterisk/modules/cdr_manager.so
%attr(755,root,root) %{_libdir}/asterisk/modules/chan_agent.so
-%attr(755,root,root) %{_libdir}/asterisk/modules/chan_h323.so
%attr(755,root,root) %{_libdir}/asterisk/modules/chan_iax2.so
%attr(755,root,root) %{_libdir}/asterisk/modules/chan_local.so
%attr(755,root,root) %{_libdir}/asterisk/modules/chan_mgcp.so
#%attr(770,root,asterisk) %dir %{_localstatedir}/spool/asterisk/festival
%attr(755,root,root) %{_libdir}/asterisk/modules/app_festival.so
+%files h323
+%defattr(644,root,root,755)
+%attr(640,root,asterisk) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asterisk/h323.conf
+%attr(755,root,root) %{_libdir}/asterisk/modules/chan_h323.so
+
%files ices
%defattr(644,root,root,755)
%doc contrib/asterisk-ices.xml
%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)