20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
21 ## SUCH DAMAGE. |
21 ## SUCH DAMAGE. |
22 ## |
22 ## |
23 |
23 |
24 # package version |
24 # package version |
25 %define V_opkg 1.8.3.2 |
25 %define V_opkg 1.8.4.2 |
26 %define V_asterisk 1.8.3.2 |
26 %define V_asterisk 1.8.4.2 |
27 %define V_asterisk_fax_digium 1.8.0_1.3.0 |
27 %define V_asterisk_fax_subdir 1.8.4 |
28 %define V_asterisk_sounds_core 1.4.20 |
28 %define V_asterisk_fax_digium 1.8.4_1.3.0 |
|
29 %define V_asterisk_sounds_core 1.4.21 |
29 %define V_asterisk_sounds_extra 1.4.11 |
30 %define V_asterisk_sounds_extra 1.4.11 |
30 %define V_asterisk_sounds_amoogab 1.4 |
31 %define V_asterisk_sounds_amoogab 1.4 |
31 %define V_asterisk_sounds_amootts current |
32 %define V_asterisk_sounds_amootts current |
32 %define V_asterisk_sounds_custom 1.0 |
33 %define V_asterisk_sounds_custom 1.0 |
33 %define V_asterisk_sounds_mohop 2.03 |
34 %define V_asterisk_sounds_mohop 2.03 |
92 Source15: http://files.freeswitch.org/freeswitch-sounds-en-us-callie-48000-%{V_fswitch_sounds_en}.tar.gz |
93 Source15: http://files.freeswitch.org/freeswitch-sounds-en-us-callie-48000-%{V_fswitch_sounds_en}.tar.gz |
93 Source16: http://files.freeswitch.org/freeswitch-sounds-es-mx-maria-44100.tar.gz |
94 Source16: http://files.freeswitch.org/freeswitch-sounds-es-mx-maria-44100.tar.gz |
94 Source17: http://files.freeswitch.org/freeswitch-sounds-ru-RU-elena-48000-%{V_fswitch_sounds_ru}.tar.gz |
95 Source17: http://files.freeswitch.org/freeswitch-sounds-ru-RU-elena-48000-%{V_fswitch_sounds_ru}.tar.gz |
95 Source18: http://files.freeswitch.org/freeswitch-sounds-music-48000-%{V_fswitch_music}.tar.gz |
96 Source18: http://files.freeswitch.org/freeswitch-sounds-music-48000-%{V_fswitch_music}.tar.gz |
96 Source19: http://svn.digium.com/svn/thirdparty/mp3/trunk/addons/mp3-%{V_asterisk_addons_mp3dec}.tar.gz |
97 Source19: http://svn.digium.com/svn/thirdparty/mp3/trunk/addons/mp3-%{V_asterisk_addons_mp3dec}.tar.gz |
97 Source20: http://downloads.digium.com/pub/telephony/fax/res_fax_digium/asterisk-1.8.0/x86-64/res_fax_digium-%{V_asterisk_fax_digium}-generic_64.tar.gz |
98 Source20: http://downloads.digium.com/pub/telephony/fax/res_fax_digium/asterisk-%{V_asterisk_fax_subdir}/x86-64/res_fax_digium-%{V_asterisk_fax_digium}-generic_64.tar.gz |
98 Source21: http://downloads.digium.com/pub/telephony/fax/res_fax_digium/asterisk-1.8.0/x86-32/res_fax_digium-%{V_asterisk_fax_digium}-generic_32.tar.gz |
99 Source21: http://downloads.digium.com/pub/telephony/fax/res_fax_digium/asterisk-%{V_asterisk_fax_subdir}/x86-32/res_fax_digium-%{V_asterisk_fax_digium}-generic_32.tar.gz |
99 Source22: ilbc-20110104.tar.gz |
100 Source22: ilbc-20110104.tar.gz |
100 Source23: asterisk.txt |
101 Source23: asterisk.txt |
101 Source24: rc.asterisk |
102 Source24: rc.asterisk |
102 Source25: wakeup.agi |
103 Source25: wakeup.agi |
103 Patch0: asterisk.patch |
104 Patch0: asterisk.patch |
105 Patch2: asterisk.patch.proxymwi |
106 Patch2: asterisk.patch.proxymwi |
106 |
107 |
107 # build information |
108 # build information |
108 Prefix: %{l_prefix} |
109 Prefix: %{l_prefix} |
109 BuildRoot: %{l_buildroot} |
110 BuildRoot: %{l_buildroot} |
110 BuildPreReq: OpenPKG, openpkg >= 20040130, bison, gcc, make, grep |
111 BuildPreReq: OpenPKG, openpkg >= 20040130, bison, gcc, make, grep, pkgconfig |
111 PreReq: OpenPKG, openpkg >= 20040130, MTA |
112 PreReq: OpenPKG, openpkg >= 20040130, MTA |
112 BuildPreReq: zlib, curl, openssl, ncurses, speex, sox, popt, gmime, libxml |
113 BuildPreReq: zlib, curl, openssl, ncurses, speex, sox, popt, gmime, libxml |
113 PreReq: zlib, curl, openssl, ncurses, speex, sox, popt, gmime, libxml |
114 PreReq: zlib, curl, openssl, ncurses, speex, sox, popt, gmime, libxml |
114 %if "%{with_ogg}" == "yes" |
115 %if "%{with_ogg}" == "yes" |
115 BuildPreReq: vorbis-libs |
116 BuildPreReq: vorbis-libs |
274 -e 's;\(astdatadir=.*\)\${astvarlibdir};\1${datadir};' \ |
275 -e 's;\(astdatadir=.*\)\${astvarlibdir};\1${datadir};' \ |
275 -e 's;\(astvarlibdir=.*\)/lib/asterisk;\1/asterisk/lib;' \ |
276 -e 's;\(astvarlibdir=.*\)/lib/asterisk;\1/asterisk/lib;' \ |
276 -e 's;\(dir=.*{localstatedir}\)/\([^/][^/]*\)/asterisk;\1/asterisk/\2;g' \ |
277 -e 's;\(dir=.*{localstatedir}\)/\([^/][^/]*\)/asterisk;\1/asterisk/\2;g' \ |
277 configure |
278 configure |
278 %{l_shtool} subst \ |
279 %{l_shtool} subst \ |
279 -e 's;-llua5\.1;-llua;' \ |
|
280 -e 's;lua5\.1/lua\.h;lua/lua.h;' \ |
|
281 -e 's;ffmpeg/avcodec\.h;libavcodec/avcodec.h;' \ |
280 -e 's;ffmpeg/avcodec\.h;libavcodec/avcodec.h;' \ |
282 -e 's;\(sqlite\)\(_exec\);\13\2;g' \ |
281 -e 's;\(sqlite\)\(_exec\);\13\2;g' \ |
283 -e 's;-lradiusclient-ng;-lradiusclient;g' \ |
282 -e 's;-lradiusclient-ng;-lradiusclient;g' \ |
284 -e 's;radiusclient-ng\.h;radiusclient.h;g' \ |
283 -e 's;radiusclient-ng\.h;radiusclient.h;g' \ |
285 -e 's;-I${IMAP_TK_DIR}/c-client;-DUSE_SYSTEM_IMAP -I${IMAP_TK_DIR}/include/imap;g' \ |
284 -e 's;-I${IMAP_TK_DIR}/c-client;-DUSE_SYSTEM_IMAP -I${IMAP_TK_DIR}/include/imap;g' \ |
655 cd $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/moh |
654 cd $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/moh |
656 %{l_tar} zxf %{_sourcedir}/freeswitch-sounds-music-48000-%{V_fswitch_music}.tar.gz |
655 %{l_tar} zxf %{_sourcedir}/freeswitch-sounds-music-48000-%{V_fswitch_music}.tar.gz |
657 mv -f music/48000/* . && rm -rf music |
656 mv -f music/48000/* . && rm -rf music |
658 |
657 |
659 # convert freeswitch 48000 and 441000 KHz to 8000 Khz |
658 # convert freeswitch 48000 and 441000 KHz to 8000 Khz |
|
659 # ffmpeg -i <in> -ar 8000 -ac 1 -acodec pcm_s16le -f s16le <out> |
660 cd $RPM_BUILD_ROOT%{l_prefix}/share/asterisk |
660 cd $RPM_BUILD_ROOT%{l_prefix}/share/asterisk |
661 for highfile in `find . -name '*.wav'`; do |
661 for highfile in `find . -name '*.wav'`; do |
662 lowfile=`echo $highfile | sed -e 's;\(.*\)\.wav;\1.sln16;'` |
662 lowfile=`echo $highfile | sed -e 's;\(.*\)\.wav;\1.sln16;'` |
663 %{l_prefix}/bin/sox $highfile -t raw -r 16000 -s -2 -c 1 $lowfile |
663 %{l_prefix}/bin/sox $highfile -t raw -r 16000 -s -2 -c 1 $lowfile |
664 rm $highfile |
664 rm $highfile |
689 #mv -f digits/de/* de/digits/ && rm -rf digits/de |
689 #mv -f digits/de/* de/digits/ && rm -rf digits/de |
690 #mv -f letters/de/* de/letters/ && rm -rf letters/de |
690 #mv -f letters/de/* de/letters/ && rm -rf letters/de |
691 #mv -f phonetic/de/* de/phonetic/ && rm -rf phonetic/de |
691 #mv -f phonetic/de/* de/phonetic/ && rm -rf phonetic/de |
692 %{l_tar} jxf %{SOURCE astmultisnds-de-sln16-%{V_asterisk_sounds_custom}.tar.bz2} |
692 %{l_tar} jxf %{SOURCE astmultisnds-de-sln16-%{V_asterisk_sounds_custom}.tar.bz2} |
693 %{l_tar} jxf %{SOURCE msvbsnds-sln16-%{V_asterisk_sounds_custom}.tar.bz2} |
693 %{l_tar} jxf %{SOURCE msvbsnds-sln16-%{V_asterisk_sounds_custom}.tar.bz2} |
|
694 mv msvbsnds-sln16-%{V_asterisk_sounds_custom} msvb |
694 |
695 |
695 # install additional asterisk music on hold |
696 # install additional asterisk music on hold |
696 cd $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/moh |
697 cd $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/moh |
697 %{l_tar} zxf %{_sourcedir}/asterisk-moh-freeplay-sln16.tar.gz |
698 %{l_tar} zxf %{_sourcedir}/asterisk-moh-freeplay-sln16.tar.gz |
698 %{l_tar} zxf %{_sourcedir}/asterisk-moh-opsound-sln16-%{V_asterisk_sounds_mohop}.tar.gz |
699 %{l_tar} zxf %{_sourcedir}/asterisk-moh-opsound-sln16-%{V_asterisk_sounds_mohop}.tar.gz |
731 rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds/*/CHANGES* >/dev/null 2>&1 || true |
732 rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds/*/CHANGES* >/dev/null 2>&1 || true |
732 |
733 |
733 # create additional directories |
734 # create additional directories |
734 %{l_shtool} mkdir -f -p -m 755 \ |
735 %{l_shtool} mkdir -f -p -m 755 \ |
735 $RPM_BUILD_ROOT%{l_prefix}/var/asterisk/db \ |
736 $RPM_BUILD_ROOT%{l_prefix}/var/asterisk/db \ |
736 $RPM_BUILD_ROOT%{l_prefix}/var/asterisk/lib/licenses \ |
737 $RPM_BUILD_ROOT%{l_prefix}/var/asterisk/spool/outgoing \ |
737 $RPM_BUILD_ROOT%{l_prefix}/var/asterisk/spool/outgoing |
738 $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/licenses |
738 |
739 |
739 # postadjust installation |
740 # postadjust installation |
740 strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* \ |
741 strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* \ |
741 $RPM_BUILD_ROOT%{l_prefix}/lib/asterisk/modules/* \ |
742 $RPM_BUILD_ROOT%{l_prefix}/lib/asterisk/modules/* \ |
742 $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/agi-bin/* \ |
743 $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/agi-bin/* \ |
782 %{SOURCE rc.asterisk} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ |
783 %{SOURCE rc.asterisk} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ |
783 |
784 |
784 # determine installation files |
785 # determine installation files |
785 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
786 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
786 %{l_files_std} \ |
787 %{l_files_std} \ |
787 '%config %{l_prefix}/var/asterisk/lib/licenses' \ |
788 '%config %attr(-,%{l_mgrp},%{l_mgrp}) %{l_prefix}/share/asterisk/licenses' \ |
788 '%config %attr(640,%{l_mgrp},%{l_rgrp}) %{l_prefix}/etc/asterisk/*' \ |
789 '%config %attr(640,%{l_mgrp},%{l_rgrp}) %{l_prefix}/etc/asterisk/*' \ |
789 '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/asterisk' |
790 '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/asterisk' |
790 |
791 |
791 # '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/share/asterisk/sounds/es/vm-Voicemail.sln16' \ |
792 # '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/share/asterisk/sounds/es/vm-Voicemail.sln16' \ |
792 # '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/share/asterisk/sounds/de/vm-Voicemail.sln16' \ |
793 # '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/share/asterisk/sounds/de/vm-Voicemail.sln16' \ |
834 %endif |
835 %endif |
835 %if "%{with_fax}" == "yes" |
836 %if "%{with_fax}" == "yes" |
836 ( echo "Asterisk has been installed with proprietary Digium fax support." |
837 ( echo "Asterisk has been installed with proprietary Digium fax support." |
837 echo "The responsible module is called res_fax_digium and requires a" |
838 echo "The responsible module is called res_fax_digium and requires a" |
838 echo "valid license. The license must be found in the directory" |
839 echo "valid license. The license must be found in the directory" |
839 echo "'licenses' which in turn must be found in $prefix/var/asterisk/lib" |
840 echo "'licenses' which in turn must be found in $prefix/share/asterisk" |
840 echo "or wherever astvarlibdir has been configured in 'asterisk.conf'." |
841 echo "or wherever astvarlibdir has been configured in 'asterisk.conf'." |
841 echo "" |
842 echo "" |
842 echo "Please see http://downloads.digium.com/pub/telephony/fax/ for information." |
843 echo "Please see http://downloads.digium.com/pub/telephony/fax/ for information." |
843 ) | %{l_rpmtool} msg -b -t notice |
844 ) | %{l_rpmtool} msg -b -t notice |
844 %endif |
845 %endif |