%bcond_with openh323 %bcond_without gmime %global myoptflags %(echo %{optflags} | sed -e's,i386,i486,g') Summary: The Open Source Linux PBX Name: asterisk Version: 1.8.3.2 Release: 97%{?dist} Epoch: 1 License: GPL Group: Applications/Internet URL: http://www.asterisk.org/ Source0: http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-%{version}.tar.gz Source1: asterisk-logrotate Patch0: asterisk-1.8.3.2-init.patch Patch1: asterisk-1.8.3.2-sound.patch Patch2: asterisk-1.8.3.2-linuxpaths.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: gcc-c++ BuildRequires: bison, m4 BuildRequires: openssl-devel ###BuildRequires: gnutls-devel BuildRequires: newt-devel BuildRequires: libtermcap-devel, ncurses-devel BuildRequires: postgresql-devel, postgresql-server, zlib-devel BuildRequires: libpri-devel >= 1.4.0 BuildRequires: dahdi-linux-devel >= 2.0.0, dahdi-tools-devel BuildRequires: libtiff-devel >= 3.5.7 BuildRequires: libogg-devel, libvorbis-devel BuildRequires: unixODBC-devel, libtool-ltdl-devel, sqlite-devel BuildRequires: freetds-devel %{!?with_openh323:BuildRequires: opal-devel} %{?with_openh323:BuildRequires: openh323-devel} BuildRequires: qt-devel, kdelibs-devel, gtk+-devel, gtk2-devel BuildRequires: radiusclient-ng-devel BuildRequires: alsa-lib-devel BuildRequires: gsm-devel BuildRequires: net-snmp-devel, /bin/arch BuildRequires: spandsp-devel BuildRequires: iksemel-devel BuildRequires: curl-devel, wget BuildRequires: speex-devel #BuildRequires: popt-devel BuildRequires: %{_includedir}/popt.h BuildRequires: openldap-devel BuildRequires: misdn-devel, misdnuser-devel BuildRequires: libusb-devel BuildRequires: uw-imap-devel BuildRequires: jack-audio-connection-kit-devel BuildRequires: libresample-devel %{?with_gmime:BuildRequires: gmime-devel} BuildRequires: libss7-devel BuildRequires: portaudio-devel #BuildRequires: libnbs-devel #BuildRequires: osp-toolkit-devel, vpb-devel BuildRequires: libxml2-devel Requires: asterisk-core-sounds-en-gsm, asterisk-moh-opsound-wav # Compatibilty with the Fedora import Provides: asterisk-ais = %{evr}, asterisk-alsa = %{evr}, asterisk-apidoc = %{evr} Provides: asterisk-curl = %{evr}, asterisk-dahdi = %{evr} Provides: asterisk-festival = %{evr}, asterisk-firmware = %{evr} Provides: asterisk-ices = %{evr}, asterisk-jabber = %{evr} Provides: asterisk-jack = %{evr}, asterisk-lua = %{evr}, asterisk-ldap = %{evr} Provides: asterisk-ldap-fds = %{evr}, asterisk-minivm = %{evr} Provides: asterisk-mobile = %{evr}, asterisk-odbc = %{evr}, asterisk-oss = %{evr} Provides: asterisk-portaudio = %{evr}, asterisk-postgresql = %{evr} Provides: asterisk-radius = %{evr}, asterisk-skinny = %{evr} Provides: asterisk-snmp = %{evr}, asterisk-sqlite = %{evr}, asterisk-tds = %{evr} Provides: asterisk-unistim = %{evr}, asterisk-usbradio = %{evr} Provides: asterisk-voicemail = %{evr}, asterisk-voicemail-imap = %{evr} Provides: asterisk-voicemail-odbc = %{evr}, asterisk-voicemail-plain = %{evr} Obsoletes: asterisk-ais < %{evr}, asterisk-alsa < %{evr}, asterisk-apidoc < %{evr} Obsoletes: asterisk-curl < %{evr}, asterisk-dahdi < %{evr} Obsoletes: asterisk-festival < %{evr}, asterisk-firmware < %{evr} Obsoletes: asterisk-ices < %{evr}, asterisk-jabber < %{evr} Obsoletes: asterisk-jack < %{evr}, asterisk-lua < %{evr}, asterisk-ldap < %{evr} Obsoletes: asterisk-ldap-fds < %{evr}, asterisk-minivm < %{evr} Obsoletes: asterisk-mobile < %{evr}, asterisk-odbc < %{evr}, asterisk-oss < %{evr} Obsoletes: asterisk-portaudio < %{evr}, asterisk-postgresql < %{evr} Obsoletes: asterisk-radius < %{evr}, asterisk-skinny < %{evr} Obsoletes: asterisk-snmp < %{evr}, asterisk-sqlite < %{evr}, asterisk-tds < %{evr} Obsoletes: asterisk-unistim < %{evr}, asterisk-usbradio < %{evr} Obsoletes: asterisk-voicemail < %{evr}, asterisk-voicemail-imap < %{evr} Obsoletes: asterisk-voicemail-odbc < %{evr}, asterisk-voicemail-plain < %{evr} # # There are no addons yet. Obsoletes: asterisk-addons < %{evr} %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: %{name} = %{evr} Requires: spandsp-devel %description devel Use this package for building/developing applications against %{name}. %package misdn Summary: mISDN channel driver for asterisk Group: Applications/Internet Requires: %{name} = %{evr} Requires: misdn Requires: misdnuser Provides: asterisk-mISDN = %{evr} Obsoletes: asterisk-mISDN < %{evr} %description misdn mISDN channel driver for asterisk %package fax Summary: fax application for asterisk Group: Applications/Internet Requires: %{name} = %{evr} %description fax fax application for asterisk. %prep %setup -q %patch0 -p1 -b .init %patch1 -p1 -b .sound %patch2 -p1 -b .linuxpaths find . -type f | grep -v /doc/ \ | xargs grep -l /usr/lib/ | xargs perl -pi -e's,/usr/lib/,%{_libdir}/,' perl -pi -e's,no,yes,' utils/utils.xml %build CFLAGS="%{myoptflags}"; export CFLAGS CXXFLAGS="%{myoptflags}"; export CXXFLAGS ASTCFLAGS="%{myoptflags}"; export ASTCFLAGS %configure OPTIMIZE="%{myoptflags}" make %install rm -rf %{buildroot} mkdir -p %{buildroot}%{_datadir}/asterisk/{sounds,moh} mkdir -p %{buildroot}%{_localstatedir}/lib/asterisk mkdir -p %{buildroot}%{_initrddir} make install samples DESTDIR=%{buildroot} INSTALL="install -p" install -p contrib/init.d/rc.redhat.asterisk %{buildroot}%{_initrddir}/asterisk install -D -p -m 0644 %{S:1} %{buildroot}%{_sysconfdir}/logrotate.d/asterisk pushd contrib/init.d rm -f rc.debian.asterisk rc.gentoo.asterisk rc.mandrake.asterisk rc.mandrake.zaptel popd mkdir -p %{buildroot}%{_localstatedir}/spool/asterisk/fax/ mkdir -p %{buildroot}%{_localstatedir}/spool/asterisk/sms/ mkdir -p %{buildroot}%{_localstatedir}/spool/asterisk/sms/motx/ mkdir -p %{buildroot}%{_localstatedir}/spool/asterisk/sms/mtrx/ %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 /sbin/ldconfig # 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 %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) %doc README* *.txt ChangeLog BUGS CREDITS doc/* configs contrib %{_initrddir}/asterisk %{_sbindir}/asterisk %{_sbindir}/astgenkey %{_sbindir}/safe_asterisk # %{_sbindir}/astman %{_sbindir}/smsq %{_sbindir}/stereorize %{_sbindir}/streamplayer %{_sbindir}/muted %{_sbindir}/hashtest2 %{_sbindir}/hashtest %{_sbindir}/astcanary %{_sbindir}/refcounter %{_sbindir}/aelparse %{_sbindir}/conf2ael %{_sbindir}/check_expr %{_sbindir}/check_expr2 # %{_sbindir}/autosupport %{_sbindir}/rasterisk %{_libdir}/asterisk %{_datadir}/asterisk %exclude %{_libdir}/asterisk/modules/chan_misdn.so %exclude %{_libdir}/asterisk/modules/res_fax.so %{_mandir}/man8/asterisk.8* %{_mandir}/man8/astgenkey.8* %{_mandir}/man8/autosupport.8* %{_mandir}/man8/safe_asterisk.8* %dir %{_sysconfdir}/asterisk %config(noreplace) %{_sysconfdir}/asterisk/* %config(noreplace) %{_sysconfdir}/logrotate.d/asterisk %exclude %{_sysconfdir}/asterisk/misdn.conf %defattr(-,asterisk,asterisk,-) %{_localstatedir}/lib/asterisk %{_localstatedir}/run/asterisk %{_localstatedir}/spool/asterisk %exclude %{_localstatedir}/spool/asterisk/fax %{_localstatedir}/log/asterisk %files devel %defattr(-,root,root,-) %{_includedir}/asterisk.h %{_includedir}/asterisk/ %files misdn %defattr(-,root,root,-) %config(noreplace) %{_sysconfdir}/asterisk/misdn.conf %{_libdir}/asterisk/modules/chan_misdn.so %files fax %defattr(-,root,root,-) %attr(0750,asterisk,asterisk) %dir %{_localstatedir}/spool/asterisk/fax/ %{_libdir}/asterisk/modules/res_fax.so %changelog * Sat Mar 26 2011 Axel Thimm - 1:1.8.3.2-97 - Update to 1.8.3. * Sun Oct 10 2010 Axel Thimm - 1:1.6.2.13-96 - Update to 1.6.2.13. * Sun May 23 2010 Axel Thimm - 1:1.6.2.7-95 - Update to 1.6.2.7. * Thu Apr 1 2010 Axel Thimm - 1:1.6.2.6-94 - Update to 1.6.2.6. * Fri Feb 12 2010 Axel Thimm - 1:1.6.2.2-93 - Update to 1.6.2.2. * Sun Jan 31 2010 Axel Thimm - 1:1.6.2.1-92 - Update to 1.6.2.1. * Wed Jan 6 2010 Axel Thimm - 1:1.6.2.0-91 - Update to 1.6.2.0. * Fri Nov 6 2009 Axel Thimm - 1:1.6.1.9-90 - Update to 1.6.1.9. * Tue Oct 27 2009 Axel Thimm - 1:1.6.1.8-89 - Update to 1.6.1.8. * Sat Aug 29 2009 Axel Thimm - 1:1.6.1.5-88 - Update to 1.6.1.5. * Tue Aug 25 2009 Tim Verhoeven - 1:1.6.1.4-87 - Added a couple of missing directories - Added logrotate config file * Sat Aug 22 2009 Axel Thimm - 1:1.6.1.4-86 - Make sound files owned by root. * Wed Aug 19 2009 Axel Thimm - 1:1.6.1.4-85 - New upstream sources replaced moh provider. * Mon Aug 17 2009 Axel Thimm - 1:1.6.1.4-84 - Fix URL, add some consistency for comaptibility packages. - make gmime dependency conditional. - Fix double /var/lib/asterisk entry. - Readd ldconifg calls. - Fix linuxpath patch. * Thu Aug 13 2009 Axel Thimm - 1:1.6.1.4-84 - Fix ASTVARLIBDIR vs ASTDATADIR issue. * Wed Aug 12 2009 Axel Thimm - 1:1.6.1.4-83 - Update to 1.6.1.4. - Simplify specfile. * Fri Aug 7 2009 Axel Thimm - 1:1.6.1.2-81 - Remove sound and depend on the external sound package. - Merge init patches into one. * Tue Aug 4 2009 Axel Thimm - 1:1.6.1.2-80 - Update to 1.6.1.2. * Thu Jul 23 2009 Axel Thimm - 1:1.6.1.1-79 - Update to 1.6.1.1 (by Mergeit ApS http://www.mergeit.dk). * Sat Jun 06 2009 Tim Verhoeven - 1:1.4.25.1-78 - Update to 1.4.25.1. * Fri Jun 05 2009 Tim Verhoeven - 1:1.4.25-77 - Update to 1.4.25. * Mon Apr 13 2009 Axel Thimm - 1:1.4.24.1-74 - Update to 1.4.24.1. * Thu Apr 2 2009 Axel Thimm - 1:1.4.24-73 - Update to 1.4.24. * Sun Jan 25 2009 Axel Thimm - 1:1.4.23.1-70 - Update to 1.4.23.1. * Wed Jan 14 2009 Leo Bergolth - 1:1.4.22.1-69 - Update to 1.4.22.1. - Add sip-spiral patch http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?r1=164977&r2=166157&pathrev=166157 - Rediff spandsp patch - Autoconf fixes for F10 * Wed Jul 23 2008 Tim Verhoeven - 1:1.4.21.2-65 - Update to 1.4.21.2. * Wed Jul 2 2008 Tim Verhoeven - 1:1.4.21.1-64 - Update to 1.4.21.1. * Wed May 21 2008 Tim Verhoeven - 1:1.4.20-63 - Update to 1.4.20. * Wed May 14 2008 Tim Verhoeven - 1:1.4.19.2-62 - Update to 1.4.19.2. * Wed Apr 23 2008 Axel Thimm - 1:1.4.19.1-61 - Update to 1.4.19.1. * Mon Apr 14 2008 Tim Verhoeven - 1:1.4.19-60 - Update to 1.4.19. * Thu Mar 27 2008 Tim Verhoeven - 1:1.4.18.1-59 - Separated fax modules. * Thu Mar 20 2008 Axel Thimm - 1:1.4.18.1-57 - Update to 1.4.18.1. * Fri Feb 8 2008 Axel Thimm - 1:1.4.18-56 - Update to 1.4.18. * Thu Jan 3 2008 Axel Thimm - 1:1.4.17-55 - Update to 1.4.17. * Fri Dec 28 2007 Axel Thimm - 1:1.4.16.2-54 - Update to 1.4.16.2. - Enable a couple more build options where available. - Add compatibility dependency hooks to Fedora import ... * Sat Dec 22 2007 Axel Thimm - 1:1.4.16.1-52 - Fix bugs with conditional builds of net-snmp and radiusclient-ng. - Update to 1.4.16.1. - Add misdn support (Tim Verhoeven ). * Sat Dec 1 2007 Axel Thimm - 1:1.4.15-51 - Update to 1.4.15. - (Re)add spandsp and nv support (Todd Johnson ). - Fix sound package inclusion (Angel Marin ). * Sat Nov 17 2007 Axel Thimm - 1:1.4.14-50 - Update to 1.4.14. * Mon Oct 29 2007 Axel Thimm - 1:1.4.13-48 - Update to 1.4.13. * Tue Oct 9 2007 Axel Thimm - 1:1.4.12.1-47 - Update to 1.4.12.1. * 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.