diff -r 610cba0674b9 -r c98ae03f4266 opensips/opensips.spec --- a/opensips/opensips.spec Thu Dec 01 13:24:24 2011 +0100 +++ b/opensips/opensips.spec Thu Dec 01 13:33:32 2011 +0100 @@ -22,8 +22,6 @@ ## # package options -%define V_major 1.6.4 -%define V_minor 2 %define V_rtpproxy 1.2.1 # package information @@ -36,8 +34,8 @@ Class: PLUS Group: VoIP License: GPL -Version: %{V_major}.%{V_minor} -Release: 20111128 +Version: 1.7.1 +Release: 20111120 # package options %option with_cons yes @@ -59,7 +57,7 @@ %option with_dbgmem no # list of sources -Source0: http://www.opensips.org/pub/opensips/%{V_major}/src/opensips-%{V_major}-%{V_minor}-tls_src.tar.gz +Source0: http://www.opensips.org/pub/opensips/%{version}/src/opensips-%{version}_src.tar.gz Source1: http://www.b2bua.org/chrome/site/rtpproxy-%{V_rtpproxy}.tar.gz Source2: rc.opensips Source3: fsl.opensips @@ -67,9 +65,8 @@ Patch0: opensips.patch Patch1: opensips.patch.dict Patch2: opensips.patch.uac -Patch3: opensips.patch.lcr -Patch4: opensips.patch.reg -Patch5: opensips.patch.rtpproxy +Patch3: opensips.patch.reg +Patch4: opensips.patch.rtpproxy # build information Prefix: %{l_prefix} @@ -169,11 +166,11 @@ %track prog opensips = { - version = %{V_major}-%{V_minor} + version = %{version} url = http://www.opensips.org/pub/opensips/ regex = (\d+\.\d+\.\d+)/ url = http://www.opensips.org/pub/opensips/__NEWVER__/src/ - regex = opensips-(__VER__)-tls_src\.tar\.gz + regex = opensips-(__VER__)_src\.tar\.gz } prog opensips:rtpproxy = { version = %{V_rtpproxy} @@ -182,15 +179,14 @@ } %prep - %setup -q -n opensips-%{V_major}-%{V_minor}-tls - %setup -q -n opensips-%{V_major}-%{V_minor}-tls -T -D -a 1 + %setup -q -n opensips-%{version}-tls + %setup -q -n opensips-%{version}-tls -T -D -a 1 %patch -p0 %patch -p0 -P 1 %patch -p0 -P 2 %patch -p0 -P 3 - %patch -p0 -P 4 ( cd rtpproxy-%{V_rtpproxy} - %patch -p0 -P 5 + %patch -p0 -P 4 ) || exit $? %{l_shtool} subst \ -e 's;^#! */bin/sh;#! %{l_prefix}/bin/bash;' \ @@ -254,9 +250,12 @@ scripts/opensipsctl %{l_shtool} subst \ -e 's;\(DB_PATH="\)[^"][^"]*;\1%{l_prefix}/var/opensips/db;' \ + -e 's;start opensips \(with 64MB share memory\).*;start \1 instead of default 32MB;' \ + -e 's;\(# STARTOPTIONS=.*\);\1"-m 64";' \ scripts/osipsconsolerc \ scripts/opensipsctlrc %{l_shtool} subst \ + -e 's;=/var/run/\(opensips.pid\);=%{l_prefix}/var/opensips/\1;g' \ -e 's;/var/run/\(opensips.pid\);%{l_prefix}/var/opensips/\1;g' \ -e 's;\(my \$fifo_reply_path\) = "/tmp/";\1 = "%{l_prefix}/var/opensips/";' \ -e 's;\(my \$HISTORY_FILE\) = "/tmp/osipsconsole_history";\1 = "%{l_prefix}/var/opensips/osipsconsole_history";' \ @@ -305,9 +304,6 @@ -e 's;\(script_flags(int\));\1,null);' \ scripts/dbtext/opensips/dialog %{l_shtool} subst \ - -e 's;\(gw_name(string).*\) *$;\1 user(string,null) realm(string,null) passwd(string,null);' \ - scripts/dbtext/opensips/gw - %{l_shtool} subst \ -e 's;body(string);body(blob);' \ -e 's;sender(string);sender(string,null);' \ scripts/dbtext/opensips/presentity @@ -481,7 +477,7 @@ utils # build modules - %{l_make} %{l_mflags} \ + %{l_make} %{l_mflags -O} \ CC="%{l_cc}" \ %if "%{with_sctp}" == "yes" SCTP=1 \ @@ -511,7 +507,7 @@ rm -rf $RPM_BUILD_ROOT # select modules - modslist='b2b_entities b2b_logic cpl-c db_http dialplan identity jabber perl perlvdb presence presence_dialoginfo presence_mwi presence_xml pua pua_bla pua_dialoginfo pua_mi pua_usrloc pua_xmpp regex rls tlsops xcap_client xmpp' + modslist='b2b_entities b2b_logic cpl-c db_http identity jabber perl perlvdb presence presence_dialoginfo presence_mwi presence_xml pua pua_bla pua_dialoginfo pua_mi pua_usrloc pua_xmpp regex rls tlsops xcap_client xmpp' %if "%{with_croute}" == "yes" modslist="$modslist carrierroute" %endif @@ -579,16 +575,12 @@ $RPM_BUILD_ROOT%{l_prefix}/etc/opensips %{l_shtool} install -c -m 644 %{l_value -s -a} \ %{SOURCE opensips.cfg} \ - %{SOURCE opensipsctlrc} \ $RPM_BUILD_ROOT%{l_prefix}/etc/opensips/ - # conditionally install osipsconsole resources -%if "%{with_cons}" == "yes" - %{l_shtool} install -c -m 644 %{l_value -s -a} \ - %{SOURCE osipsconsolerc} \ - $RPM_BUILD_ROOT%{l_prefix}/etc/opensips/ -%else + # conditionally remove osipsconsole resources +%if "%{with_cons}" != "yes" rm $RPM_BUILD_ROOT%{l_prefix}/sbin/osipsconsole + rm $RPM_BUILD_ROOT%{l_prefix}/etc/opensips/osipsconsolerc %endif # install OSSP fsl configuration