1.1 --- a/opensips/opensips.spec Thu Dec 01 13:24:24 2011 +0100 1.2 +++ b/opensips/opensips.spec Thu Dec 01 13:33:32 2011 +0100 1.3 @@ -22,8 +22,6 @@ 1.4 ## 1.5 1.6 # package options 1.7 -%define V_major 1.6.4 1.8 -%define V_minor 2 1.9 %define V_rtpproxy 1.2.1 1.10 1.11 # package information 1.12 @@ -36,8 +34,8 @@ 1.13 Class: PLUS 1.14 Group: VoIP 1.15 License: GPL 1.16 -Version: %{V_major}.%{V_minor} 1.17 -Release: 20111128 1.18 +Version: 1.7.1 1.19 +Release: 20111120 1.20 1.21 # package options 1.22 %option with_cons yes 1.23 @@ -59,7 +57,7 @@ 1.24 %option with_dbgmem no 1.25 1.26 # list of sources 1.27 -Source0: http://www.opensips.org/pub/opensips/%{V_major}/src/opensips-%{V_major}-%{V_minor}-tls_src.tar.gz 1.28 +Source0: http://www.opensips.org/pub/opensips/%{version}/src/opensips-%{version}_src.tar.gz 1.29 Source1: http://www.b2bua.org/chrome/site/rtpproxy-%{V_rtpproxy}.tar.gz 1.30 Source2: rc.opensips 1.31 Source3: fsl.opensips 1.32 @@ -67,9 +65,8 @@ 1.33 Patch0: opensips.patch 1.34 Patch1: opensips.patch.dict 1.35 Patch2: opensips.patch.uac 1.36 -Patch3: opensips.patch.lcr 1.37 -Patch4: opensips.patch.reg 1.38 -Patch5: opensips.patch.rtpproxy 1.39 +Patch3: opensips.patch.reg 1.40 +Patch4: opensips.patch.rtpproxy 1.41 1.42 # build information 1.43 Prefix: %{l_prefix} 1.44 @@ -169,11 +166,11 @@ 1.45 1.46 %track 1.47 prog opensips = { 1.48 - version = %{V_major}-%{V_minor} 1.49 + version = %{version} 1.50 url = http://www.opensips.org/pub/opensips/ 1.51 regex = (\d+\.\d+\.\d+)/ 1.52 url = http://www.opensips.org/pub/opensips/__NEWVER__/src/ 1.53 - regex = opensips-(__VER__)-tls_src\.tar\.gz 1.54 + regex = opensips-(__VER__)_src\.tar\.gz 1.55 } 1.56 prog opensips:rtpproxy = { 1.57 version = %{V_rtpproxy} 1.58 @@ -182,15 +179,14 @@ 1.59 } 1.60 1.61 %prep 1.62 - %setup -q -n opensips-%{V_major}-%{V_minor}-tls 1.63 - %setup -q -n opensips-%{V_major}-%{V_minor}-tls -T -D -a 1 1.64 + %setup -q -n opensips-%{version}-tls 1.65 + %setup -q -n opensips-%{version}-tls -T -D -a 1 1.66 %patch -p0 1.67 %patch -p0 -P 1 1.68 %patch -p0 -P 2 1.69 %patch -p0 -P 3 1.70 - %patch -p0 -P 4 1.71 ( cd rtpproxy-%{V_rtpproxy} 1.72 - %patch -p0 -P 5 1.73 + %patch -p0 -P 4 1.74 ) || exit $? 1.75 %{l_shtool} subst \ 1.76 -e 's;^#! */bin/sh;#! %{l_prefix}/bin/bash;' \ 1.77 @@ -254,9 +250,12 @@ 1.78 scripts/opensipsctl 1.79 %{l_shtool} subst \ 1.80 -e 's;\(DB_PATH="\)[^"][^"]*;\1%{l_prefix}/var/opensips/db;' \ 1.81 + -e 's;start opensips \(with 64MB share memory\).*;start \1 instead of default 32MB;' \ 1.82 + -e 's;\(# STARTOPTIONS=.*\);\1"-m 64";' \ 1.83 scripts/osipsconsolerc \ 1.84 scripts/opensipsctlrc 1.85 %{l_shtool} subst \ 1.86 + -e 's;=/var/run/\(opensips.pid\);=%{l_prefix}/var/opensips/\1;g' \ 1.87 -e 's;/var/run/\(opensips.pid\);%{l_prefix}/var/opensips/\1;g' \ 1.88 -e 's;\(my \$fifo_reply_path\) = "/tmp/";\1 = "%{l_prefix}/var/opensips/";' \ 1.89 -e 's;\(my \$HISTORY_FILE\) = "/tmp/osipsconsole_history";\1 = "%{l_prefix}/var/opensips/osipsconsole_history";' \ 1.90 @@ -305,9 +304,6 @@ 1.91 -e 's;\(script_flags(int\));\1,null);' \ 1.92 scripts/dbtext/opensips/dialog 1.93 %{l_shtool} subst \ 1.94 - -e 's;\(gw_name(string).*\) *$;\1 user(string,null) realm(string,null) passwd(string,null);' \ 1.95 - scripts/dbtext/opensips/gw 1.96 - %{l_shtool} subst \ 1.97 -e 's;body(string);body(blob);' \ 1.98 -e 's;sender(string);sender(string,null);' \ 1.99 scripts/dbtext/opensips/presentity 1.100 @@ -481,7 +477,7 @@ 1.101 utils 1.102 1.103 # build modules 1.104 - %{l_make} %{l_mflags} \ 1.105 + %{l_make} %{l_mflags -O} \ 1.106 CC="%{l_cc}" \ 1.107 %if "%{with_sctp}" == "yes" 1.108 SCTP=1 \ 1.109 @@ -511,7 +507,7 @@ 1.110 rm -rf $RPM_BUILD_ROOT 1.111 1.112 # select modules 1.113 - 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' 1.114 + 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' 1.115 %if "%{with_croute}" == "yes" 1.116 modslist="$modslist carrierroute" 1.117 %endif 1.118 @@ -579,16 +575,12 @@ 1.119 $RPM_BUILD_ROOT%{l_prefix}/etc/opensips 1.120 %{l_shtool} install -c -m 644 %{l_value -s -a} \ 1.121 %{SOURCE opensips.cfg} \ 1.122 - %{SOURCE opensipsctlrc} \ 1.123 $RPM_BUILD_ROOT%{l_prefix}/etc/opensips/ 1.124 1.125 - # conditionally install osipsconsole resources 1.126 -%if "%{with_cons}" == "yes" 1.127 - %{l_shtool} install -c -m 644 %{l_value -s -a} \ 1.128 - %{SOURCE osipsconsolerc} \ 1.129 - $RPM_BUILD_ROOT%{l_prefix}/etc/opensips/ 1.130 -%else 1.131 + # conditionally remove osipsconsole resources 1.132 +%if "%{with_cons}" != "yes" 1.133 rm $RPM_BUILD_ROOT%{l_prefix}/sbin/osipsconsole 1.134 + rm $RPM_BUILD_ROOT%{l_prefix}/etc/opensips/osipsconsolerc 1.135 %endif 1.136 1.137 # install OSSP fsl configuration