%bcond_without spandsp %bcond_without speex %bcond_without opal %bcond_with openh323 %bcond_without radiusclient-ng %bcond_without net-snmp Summary: The Open Source Linux PBX Name: asterisk Version: 1.4.11 Release: 46%{?dist}.sal1 Epoch: 1 License: GPL Group: Applications/Internet URL: http://www.asterisk.org Source0: http://ftp.digium.com/pub/%{name}/releases/%{name}-%{version}.tar.gz Source1: http://www.soft-switch.org/downloads/spandsp/spandsp-0.0.2pre26/asterisk-1.2.x/app_rxfax.c Source2: http://www.soft-switch.org/downloads/spandsp/spandsp-0.0.2pre26/asterisk-1.2.x/app_txfax.c Source101: asterisk-core-sounds-en-alaw-1.4.4.tar.gz Source102: asterisk-core-sounds-en-g722-1.4.4.tar.gz Source103: asterisk-core-sounds-en-g729-1.4.4.tar.gz Source104: asterisk-core-sounds-en-gsm-1.4.4.tar.gz Source105: asterisk-core-sounds-en-ulaw-1.4.4.tar.gz Source106: asterisk-core-sounds-en-wav-1.4.4.tar.gz Source107: asterisk-core-sounds-es-alaw-1.4.4.tar.gz Source108: asterisk-core-sounds-es-g722-1.4.4.tar.gz Source109: asterisk-core-sounds-es-g729-1.4.4.tar.gz Source110: asterisk-core-sounds-es-gsm-1.4.4.tar.gz Source111: asterisk-core-sounds-es-ulaw-1.4.4.tar.gz Source112: asterisk-core-sounds-es-wav-1.4.4.tar.gz Source113: asterisk-core-sounds-fr-alaw-1.4.4.tar.gz Source114: asterisk-core-sounds-fr-g722-1.4.4.tar.gz Source115: asterisk-core-sounds-fr-g729-1.4.4.tar.gz Source116: asterisk-core-sounds-fr-gsm-1.4.4.tar.gz Source117: asterisk-core-sounds-fr-ulaw-1.4.4.tar.gz Source118: asterisk-core-sounds-fr-wav-1.4.4.tar.gz Source119: asterisk-extra-sounds-en-alaw-1.4.3.tar.gz Source120: asterisk-extra-sounds-en-g722-1.4.3.tar.gz Source121: asterisk-extra-sounds-en-g729-1.4.3.tar.gz Source122: asterisk-extra-sounds-en-gsm-1.4.3.tar.gz Source123: asterisk-extra-sounds-en-ulaw-1.4.3.tar.gz Source124: asterisk-extra-sounds-en-wav-1.4.3.tar.gz #Patch0: asterisk-bri.patch Patch1: asterisk-1.4.0-beta3-user.patch Patch2: asterisk-1.0.7-mpg123.patch #Patch3: http://www.soft-switch.orglobal g/downloads/spandsp/spandsp-0.0.2pre26/asterisk-1.2.x/apps_Makefile.patch Patch3: asterisk-spandsp.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: gcc-c++ BuildRequires: bison, m4 BuildRequires: openssl-devel BuildRequires: newt-devel BuildRequires: libtermcap-devel, ncurses-devel BuildRequires: postgresql-devel, postgresql-server, zlib-devel BuildRequires: libpri-devel >= 1.4.0 BuildRequires: zaptel-devel >= 1.4.1, libtiff-devel >= 3.5.7 BuildRequires: libogg-devel, libvorbis-devel BuildRequires: unixODBC-devel, libtool-ltdl-devel, sqlite-devel # BuildRequires: freetds-devel %{?with_opal:BuildRequires: pwlib-devel, opal-devel} %{?with_openh323:BuildRequires: pwlib-devel, openh323-devel} BuildRequires: qt-devel, kdelibs-devel, gtk+-devel %{?with_radiusclient-ng:BuildRequires: radiusclient-ng-devel} BuildRequires: alsa-lib-devel # BuildRequires: gsm-devel %{?with_net-snmp:BuildRequires: net-snmp-devel} %{?with_spandsp:BuildRequires: spandsp-devel} BuildRequires: curl-devel, wget %{?with_speex:BuildRequires: speex-devel} %description Asterisk is a complete PBX in software. It runs on Linux and provides all of the features you would expect from a PBX and more. Asterisk does voice over IP in three protocols, and can interoperate with almost all standards-based telephony equipment using relatively inexpensive hardware. %package devel Summary: Development package for %{name} Group: Development/Libraries Requires: asterisk = %{evr} %{?with_spandsp:Requires: spandsp-devel} %description devel Use this package for building/developing applications against %{name}. %prep %setup -q for file in %{SOURCE101} %{SOURCE102} %{SOURCE103} %{SOURCE104} %{SOURCE105} \ %{SOURCE106} %{SOURCE107} %{SOURCE108} %{SOURCE109} %{SOURCE110} \ %{SOURCE111} %{SOURCE112} %{SOURCE113} %{SOURCE114} %{SOURCE115} \ %{SOURCE116} %{SOURCE117} %{SOURCE118} %{SOURCE119} %{SOURCE120} \ %{SOURCE121} %{SOURCE122} %{SOURCE123} %{SOURCE124} \ ; do (cd sounds; cat $file | gzip -d | tar xf -) && \ touch sounds/`basename $file | sed -e's,\(.*\).tar.gz,.\1,'` done #patch0 -p1 -b .bri %patch1 -p0 -b .user %patch2 -p1 -b .mpg123 %if %{with spandsp} cp %{SOURCE1} %{SOURCE2} apps/ %patch3 -p0 -b .spandsp %endif find . -type f | xargs grep -l /usr/lib/ | xargs perl -pi -e's,/usr/lib/,%{_libdir}/,' perl -pi -e's,^OPTIMIZE.*,,' Makefile perl -pi -e's,^.*-march.*,,g' Makefile grep -rl '# include ' . | xargs perl -pi -e's,# include ,/* # include */,' %build for a in rc.debian.asterisk rc.gentoo.asterisk rc.mandrake.asterisk rc.mandrake.zaptel; do rm -f contrib/init.d/$a done ./bootstrap.sh %configure OPTIMIZE="%{optflags}" make %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} ASTVARRUNDIR=%{_var}/run/asterisk make samples DESTDIR=%{buildroot} ASTVARRUNDIR=%{_var}/run/asterisk mkdir -p %{buildroot}%{_initrddir} install -m 0644 include/asterisk.h %{buildroot}%{_includedir}/asterisk.h install -p contrib/init.d/rc.redhat.asterisk %{buildroot}%{_initrddir}/asterisk %clean rm -rf %{buildroot} %pre # Add the "asterisk" user /usr/sbin/useradd -r -c "Asterisk" \ -s /sbin/nologin -d %{_localstatedir}/lib/asterisk asterisk 2> /dev/null || : %post # Register the asterisk service /sbin/chkconfig --add asterisk %preun if [ $1 = 0 ]; then /sbin/service asterisk stop > /dev/null 2>&1 /sbin/chkconfig --del asterisk fi %files %defattr(-,root,root,-) %doc README* *.txt ChangeLog BUGS CREDITS doc/* configs contrib %{_initrddir}/asterisk %{_sbindir}/aelparse %{_sbindir}/asterisk %{_sbindir}/astgenkey %{_sbindir}/safe_asterisk %{_sbindir}/astman %{_sbindir}/autosupport %{_sbindir}/muted %{_sbindir}/rasterisk %{_sbindir}/smsq %{_sbindir}/stereorize %{_sbindir}/streamplayer %{_libdir}/asterisk %{_mandir}/man8/asterisk.8* %{_mandir}/man8/astgenkey.8* %{_mandir}/man8/autosupport.8* %{_mandir}/man8/safe_asterisk.8* %defattr(-,asterisk,asterisk,-) %dir %{_sysconfdir}/asterisk %config(noreplace) %{_sysconfdir}/asterisk/* %{_localstatedir}/lib/asterisk %{_localstatedir}/run/asterisk %{_localstatedir}/spool/asterisk %{_localstatedir}/log/asterisk %files devel %defattr(-,root,root,-) %{_includedir}/asterisk.h %{_includedir}/asterisk/ %changelog * Thu Aug 23 2007 Jan ONDREJ (SAL) - updated app_rxfax.c and app_txfax.c sources for asterisk 1.4 - modified patch for asterisk-spandsp - added aclocal, configure ... to apply spandsp autoconfiguration * Wed Aug 22 2007 Axel Thimm - 1:1.4.11-46 - Update to 1.4.11. * Tue Aug 21 2007 Axel Thimm - 1:1.4.10.1-45 - Update to 1.4.10.1. * Sat Aug 18 2007 Axel Thimm - 1:1.4.10-44 - Update to 1.4.10. * Wed Jul 25 2007 Axel Thimm - 1:1.4.9-43 - Update to 1.4.9. * Sat Jul 21 2007 Axel Thimm - 1:1.4.8-42 - Update to 1.4.8. * Fri Jun 29 2007 Axel Thimm - 1:1.4.6-41 - Update to 1.4.6. * Sat Jun 16 2007 Axel Thimm - 1:1.4.5-40 - Update to 1.4.5. * Sat Apr 28 2007 Axel Thimm - 1:1.4.4-39 - Update to 1.4.4. * Wed Apr 25 2007 Axel Thimm - 1:1.4.3-38 - Update to 1.4.3. * Wed Mar 21 2007 Axel Thimm - 1:1.4.2-36 - Update to 1.4.2. * Sat Mar 3 2007 Axel Thimm - 1:1.4.1-35 - Update to 1.4.1. * Sun Dec 24 2006 Axel Thimm - 1:1.4.0-33 - Update to 1.4.0. * Sat Dec 16 2006 Axel Thimm - 1:1.4.0-32_beta4 - Update to 1.4.0-beta4. * Wed Dec 6 2006 Alexander Bergolth - 1:1.4.0-1_beta3 - First try with 1.4.0-beta3 (currently only --without spandsp) * Wed Oct 25 2006 Axel Thimm - 1:1.2.13-30 - Rebuild w/o Fedora Extras to avoid beta bits. - Bump epoch to superseed beta bits. * Thu Oct 19 2006 Axel Thimm - 1.2.13-29 - Update to 1.2.13. * Sat Sep 16 2006 Axel Thimm - 1.2.12.1-28 - Update to 1.2.12.1. * Sat Sep 9 2006 Axel Thimm - 1.2.12-27 - Update to 1.2.12. * Fri Aug 25 2006 Axel Thimm - 1.2.11-26 - Update to 1.2.11. * Sat Jul 15 2006 Axel Thimm - 1.2.10-26 - Update to 1.2.10. * Sun Jun 18 2006 Axel Thimm - Fix conditional spandsp build. * Wed Jun 7 2006 Axel Thimm - Update to 1.2.9.1. * Wed May 31 2006 Axel Thimm - Update to 1.2.8. * Thu Apr 13 2006 Axel Thimm - Update to 1.2.7. - Update to 1.2.7.1. * Mon Mar 27 2006 Axel Thimm - Update to 1.2.6. * Sun Mar 5 2006 Axel Thimm - Update to 1.2.5. * Fri Feb 3 2006 Axel Thimm - Update to 1.2.4. * Thu Jan 26 2006 Axel Thimm - Update to 1.2.3. * Mon Dec 12 2005 Axel Thimm - Update to 1.2.1. * Mon Nov 21 2005 Axel Thimm - Update to 1.2.0. * Tue Oct 11 2005 Mark Wormgoor - Fix compiler options to work with non-i686 hardware * Fri Jul 15 2005 Axel Thimm - Update to 1.0.9. * Mon Jun 27 2005 Axel Thimm - Update to 1.0.8. * Sun Apr 3 2005 Mark Wormgoor - Separated into devel - Add spandsp fax patch - Include zaptel module * Fri Apr 1 2005 Axel Thimm - Update to 1.0.7. * Wed Jan 26 2005 Axel Thimm - Update to 1.0.5. * Mon Dec 13 2004 Axel Thimm - Add lippri support. - Add postgresql support. * Wed Dec 8 2004 Axel Thimm - Update to 1.0.3. * Fri Aug 20 2004 Axel Thimm - Update to 1.0RC2. * Sun Mar 28 2004 Axel Thimm - Initial build.