diff -r 506d3a1a6c3c -r fd611cde817f asterisk/asterisk.spec --- a/asterisk/asterisk.spec Sat Mar 24 21:00:00 2012 +0100 +++ b/asterisk/asterisk.spec Sat Mar 24 21:40:49 2012 +0100 @@ -38,7 +38,7 @@ %define V_fswitch_sounds_ru 1.0.13 %define V_fswitch_music 1.0.8 %define V_asterisk_codecs_ilbc 20110104 -%define V_chan_capi 1.1.5.20110914 +%define V_chan_capi 1.1.5.20120324 # package information Name: asterisk @@ -51,7 +51,7 @@ Group: VoIP License: GPL Version: %{V_opkg} -Release: 20120320 +Release: 20120325 # package options %option with_dahdi no @@ -298,6 +298,9 @@ -e 's;lua5\.1;lua;g' \ -e 's;-I${IMAP_TK_DIR}/c-client;-DUSE_SYSTEM_IMAP -I${IMAP_TK_DIR}/include/imap;g' \ -e 's;${IMAP_TK_DIR}/c-client/c-client\.a;-limap -lssl -lcrypto -lcrypt;g' \ + -e 's;LIBXML2_INCLUDE="-I\${LIBXML2_DIR}/include";echo "Removing really buggy hard coded LibXML include defs.";' \ + -e 's;\(for ver in 2\.0 2\.2 2\.4\);\1 2.6;' \ + -e 's;\(\-lpq.*\-lz.*\)";\1 ${PTHREAD_LIBS}";g'\ configure %{l_shtool} subst \ -e 's;\(sh\) \(bash\) ksh sh5;\2 \1;' \ @@ -315,6 +318,7 @@ -e 's;\$(SUBMAKE);$(MAKE);g' \ -e 's;\$(SILENTMAKE);$(MAKE) --quiet --no-print-directory;g' \ -e 's;\$(MAKE_MENUSELECT); $(MAKE) -C menuselect;g' \ + -e 's;-march=\$(PROC);-march=native;g' \ Makefile %{l_shtool} subst \ -e 's; *-L/usr/local/ssl/lib;;g' \ @@ -335,6 +339,9 @@ main/editline/Makefile.in \ main/db1-ast/Makefile %{l_shtool} subst \ + -e 's;^\(install:\).*;\1;' \ + sounds/Makefile + %{l_shtool} subst \ -e 's;%s/astdb;%s/asterisk.db;g' \ main/asterisk.c %{l_shtool} subst \ @@ -344,6 +351,12 @@ -e 's;if \(((tmp = strchr(name\);while \1;g' \ main/abstract_jb.c %{l_shtool} subst \ + -e 's;if.*SSL_CTX_use_certificate_file.*;if (SSL_CTX_use_certificate_chain_file(cfg->ssl_ctx, cfg->certfile) == 0) {;' \ + main/tcptls.c + %{l_shtool} subst \ + -e 's;ast_random();rand();' \ + main/strcompat.c + %{l_shtool} subst \ -e 's;\(/etc/radiusclient-ng/radiusclient.conf\);%{l_prefix}\1;g' \ -e 's;\(radiusclient\)-ng;\1;g' \ cdr/cdr_radius.c \ @@ -362,9 +375,17 @@ -e 's;\${CONFIG_DIR};$(DESTDIR)$(CONFIG_DIR);g' \ -e 's;^\(USE_OWN_LIBCAPI\)=yes;\1=no;' \ chan_capi-%{V_chan_capi}/Makefile - %{l_shtool} subst \ - -e 's;if.*SSL_CTX_use_certificate_file.*;if (SSL_CTX_use_certificate_chain_file(cfg->ssl_ctx, cfg->certfile) == 0) {;' \ - main/tcptls.c + case "%{l_platform -t}" in + *-sunos* ) + %{l_shtool} subst \ + -e 's;SO_SUPPRESS_SYMBOLS=-Wl,--version-script,[a-zA-Z0-9@\-_,\.()\$ ][a-zA-Z0-9@\-_,\.()\$ ]*;LOCAL_NOOP=0;' \ + -e 's;ASTLINK+=-Wl,--version-script,[a-zA-Z0-9\-_\.,][a-zA-Z0-9\-_\.,]*;LOCAL_NOOP=0;' \ + -e 's;-Wl,--version-script=[^ ][^ ]* *;;' \ + Makefile.rules \ + main/Makefile \ + main/db1-ast/Makefile + ;; + esac %build # sanity check operating system @@ -388,10 +409,14 @@ %endif # correct platform dependent build configuration extflg= + loclibs="-lssl -lcrypto" case "%{l_platform -t}" in *-linux* ) pthlibflg='-lpthread' ;; + *-sunos* ) + loclibs="$loclibs -lsocket -lnsl" + ;; esac # adapt buildconf to find mpg123 (for music on hold) @@ -406,23 +431,19 @@ res/res_musiconhold.c apps/app_mp3.c # configure program - ( echo "ac_cv_prog_CONFIG_GMIME=%{l_prefix}/bin/gmime-config" - ) >config.cache cflags="%{l_cflags -O}" cppflags="%{l_cppflags ncurses lua}" ldflags="%{l_ldflags}" - libs="" - cppflags="$cppflags `pkg-config gmime-2.4 --cflags-only-I`" - ldflags="$ldflags `pkg-config gmime-2.4 --libs-only-L`" - libs="$libs `pkg-config gmime-2.4 --libs-only-l` -lssl -lcrypto" + cppflags="$cppflags" + ldflags="$ldflags" %if "%{with_ogg}" == "yes" - libs="$libs -logg -lm" + loclibs="$loclibs -logg -lm" %endif %if "%{with_avcodec}" == "yes" - libs="$libs -lavcodec -lavutil" + loclibs="$loclibs -lavcodec -lavutil" %endif %if "%{with_ldap}" == "yes" - libs="$libs -lldap -llber" + loclibs="$loclibs -lldap -llber" %endif %if "%{with_dahdi}" == "yes" cppflags="$cppflags -I$dahdi_prefix/include" @@ -432,7 +453,7 @@ CFLAGS="$cflags" \ CPPFLAGS="$cppflags" \ LDFLAGS="$ldflags" \ - LIBS="$libs" \ + LIBS="$loclibs" \ INSTALL="%{l_shtool} install -c" \ PTHREAD_LIBS="$pthlibflg" \ ./configure \ @@ -524,6 +545,7 @@ --without-pri \ %endif --with-sounds-cache=%_sourcedir \ + --with-libxml2=%{l_prefix} \ --without-netsnmp \ --without-isdnnet \ --without-misdn \ @@ -561,7 +583,7 @@ # build program %{l_make} %{l_mflags -O} \ - CC="%{l_cc} $cflags -I../include -I../../include $cppflags" NOISY_BUILD=yes + CC="%{l_cc} $cflags -I../include $cppflags" NOISY_BUILD=yes %if "%{with_capi}" == "yes" # build capi channel @@ -618,8 +640,13 @@ esac %endif - ( echo 'Start of sound installation block (RPM)' + ( echo 'Start of sound installation block (OpenPKG)' %if "%{with_esounds}" == "yes" + # create sound directory hierarchy + for sndir in en es fr ru en_AU moh; do + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds/$sndir + done # install freeswitch sound prompt files, expecting # identical sound filenames to be overwritten later cd $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds/en @@ -638,8 +665,6 @@ mv -f es/mx/maria/$subdir/*/* ${subdir}/ done rm -rf es - %{l_shtool} mkdir -f -p -m 755 \ - $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds/ru cd $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds/ru %{l_tar} zxf %{_sourcedir}/freeswitch-sounds-ru-RU-elena-48000-%{V_fswitch_sounds_ru}.tar.gz subs=`( cd ru/RU/elena && find * -type d -prune )` @@ -664,13 +689,9 @@ done %endif - # install australian nonversioned sound prompt files - cd $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds/en_AU - %{l_tar} zxf %%{_sourcedir}/asterisk-core-sounds-en_AU-sln16-%{V_asterisk_sounds_core}.tar.gz - # install main sound prompt files #for codec in alaw ulaw g722 g729 gsm; do - for lang in en es fr; do + for lang in en en_AU es fr; do cd $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds/${lang} %{l_tar} zxf %{_sourcedir}/asterisk-core-sounds-${lang}-sln16-%{V_asterisk_sounds_core}.tar.gz done