opensips/opensips.spec

changeset 410
b1bf69b8f573
parent 397
c98ae03f4266
child 412
577aba7f4106
equal deleted inserted replaced
7:a4e88f3c3939 8:681c75cab88e
32 Packager: OpenPKG Foundation e.V. 32 Packager: OpenPKG Foundation e.V.
33 Distribution: OpenPKG Community 33 Distribution: OpenPKG Community
34 Class: PLUS 34 Class: PLUS
35 Group: VoIP 35 Group: VoIP
36 License: GPL 36 License: GPL
37 Version: 1.7.1 37 Version: 1.7.2
38 Release: 20111120 38 Release: 20120208
39 39
40 # package options 40 # package options
41 %option with_cons yes 41 %option with_cons yes
42 %option with_fsl yes 42 %option with_fsl yes
43 %option with_ssl yes 43 %option with_ssl yes
61 Source1: http://www.b2bua.org/chrome/site/rtpproxy-%{V_rtpproxy}.tar.gz 61 Source1: http://www.b2bua.org/chrome/site/rtpproxy-%{V_rtpproxy}.tar.gz
62 Source2: rc.opensips 62 Source2: rc.opensips
63 Source3: fsl.opensips 63 Source3: fsl.opensips
64 Source4: opensips.cfg 64 Source4: opensips.cfg
65 Patch0: opensips.patch 65 Patch0: opensips.patch
66 Patch1: opensips.patch.dict 66 Patch1: opensips.patch.ctlrc
67 Patch2: opensips.patch.uac 67 Patch2: opensips.patch.dict
68 Patch3: opensips.patch.reg 68 Patch3: opensips.patch.uac
69 Patch4: opensips.patch.rtpproxy 69 Patch4: opensips.patch.reg
70 Patch5: opensips.patch.rtpproxy
70 71
71 # build information 72 # build information
72 Prefix: %{l_prefix} 73 Prefix: %{l_prefix}
73 BuildRoot: %{l_buildroot} 74 BuildRoot: %{l_buildroot}
74 BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc, flex, bison, sed 75 BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc, flex, bison, sed
183 %setup -q -n opensips-%{version}-tls -T -D -a 1 184 %setup -q -n opensips-%{version}-tls -T -D -a 1
184 %patch -p0 185 %patch -p0
185 %patch -p0 -P 1 186 %patch -p0 -P 1
186 %patch -p0 -P 2 187 %patch -p0 -P 2
187 %patch -p0 -P 3 188 %patch -p0 -P 3
189 %patch -p0 -P 4
188 ( cd rtpproxy-%{V_rtpproxy} 190 ( cd rtpproxy-%{V_rtpproxy}
189 %patch -p0 -P 4 191 %patch -p0 -P 5
190 ) || exit $? 192 ) || exit $?
191 %{l_shtool} subst \ 193 %{l_shtool} subst \
192 -e 's;^#! */bin/sh;#! %{l_prefix}/bin/bash;' \ 194 -e 's;^#! */bin/sh;#! %{l_prefix}/bin/bash;' \
193 scripts/opensipsctl 195 scripts/opensipsctl
194 %{l_shtool} subst \ 196 %{l_shtool} subst \
195 -e 's;^#! */bin/bash;#! %{l_prefix}/bin/bash;' \ 197 -e 's;^#! */bin/bash;#! %{l_prefix}/bin/bash;' \
196 modules/seas/doc/xml2sgml.sh \ 198 modules/seas/doc/xml2sgml.sh \
197 scripts/opensipsdbctl \ 199 scripts/opensipsdbctl \
198 test/* 200 test/*.sh
199 %{l_shtool} subst \ 201 %{l_shtool} subst \
200 %if "%{with_dbgmem}" == "yes" 202 %if "%{with_dbgmem}" == "yes"
201 -e 's;\(-DF_MALLOC\);#\1;' \ 203 -e 's;\(-DF_MALLOC\);#\1;' \
202 -e 's;#\(-DDBG_QM_MALLOC\);\1;' \ 204 -e 's;#\(-DDBG_QM_MALLOC\);\1;' \
203 %endif 205 %endif
247 -e 's;/usr/local/\(etc/opensips/opensipsctlrc\);%{l_prefix}/\1;' \ 249 -e 's;/usr/local/\(etc/opensips/opensipsctlrc\);%{l_prefix}/\1;' \
248 -e 's;PATH=\$PATH:/usr/local/sbin;PATH=%{l_prefix}/sbin:$PATH;' \ 250 -e 's;PATH=\$PATH:/usr/local/sbin;PATH=%{l_prefix}/sbin:$PATH;' \
249 scripts/opensipsdbctl \ 251 scripts/opensipsdbctl \
250 scripts/opensipsctl 252 scripts/opensipsctl
251 %{l_shtool} subst \ 253 %{l_shtool} subst \
252 -e 's;\(DB_PATH="\)[^"][^"]*;\1%{l_prefix}/var/opensips/db;' \
253 -e 's;start opensips \(with 64MB share memory\).*;start \1 instead of default 32MB;' \
254 -e 's;\(# STARTOPTIONS=.*\);\1"-m 64";' \
255 scripts/osipsconsolerc \
256 scripts/opensipsctlrc
257 %{l_shtool} subst \
258 -e 's;=/var/run/\(opensips.pid\);=%{l_prefix}/var/opensips/\1;g' \
259 -e 's;/var/run/\(opensips.pid\);%{l_prefix}/var/opensips/\1;g' \ 254 -e 's;/var/run/\(opensips.pid\);%{l_prefix}/var/opensips/\1;g' \
260 -e 's;\(my \$fifo_reply_path\) = "/tmp/";\1 = "%{l_prefix}/var/opensips/";' \ 255 -e 's;\(my \$fifo_reply_path\) = "/tmp/";\1 = "%{l_prefix}/var/opensips/";' \
261 -e 's;\(my \$HISTORY_FILE\) = "/tmp/osipsconsole_history";\1 = "%{l_prefix}/var/opensips/osipsconsole_history";' \ 256 -e 's;\(my \$HISTORY_FILE\) = "/tmp/osipsconsole_history";\1 = "%{l_prefix}/var/opensips/osipsconsole_history";' \
262 scripts/opensipsctl \ 257 scripts/opensipsctl \
263 scripts/opensipsctlrc \
264 scripts/osipsconsole \ 258 scripts/osipsconsole \
265 scripts/osipsconsolerc
266 %{l_shtool} subst \ 259 %{l_shtool} subst \
267 -e 's;/usr/local;;g' \ 260 -e 's;/usr/local;;g' \
268 -e 's;\(/etc/opensips/\)\.\(opensipsctlrc\);%{l_prefix}\1\2;g' \ 261 -e 's;\(/etc/opensips/\)\.\(opensipsctlrc\);%{l_prefix}\1\2;g' \
269 scripts/opensipsctl.8 262 scripts/opensipsctl.8
270 %{l_shtool} subst \ 263 %{l_shtool} subst \
349 %{l_shtool} subst \ 342 %{l_shtool} subst \
350 -e 's;^\(DEFS+=\).*\\$;\1 \\;' \ 343 -e 's;^\(DEFS+=\).*\\$;\1 \\;' \
351 -e "s;\-I[^ \t][^ \t]*;`%{l_prefix}/bin/pkg-config --cflags-only-I libcurl libxml-2.0`;g" \ 344 -e "s;\-I[^ \t][^ \t]*;`%{l_prefix}/bin/pkg-config --cflags-only-I libcurl libxml-2.0`;g" \
352 -e "s;^\(LIBS=\).*;\1`%{l_prefix}/bin/pkg-config --libs libcurl libxml-2.0`;" \ 345 -e "s;^\(LIBS=\).*;\1`%{l_prefix}/bin/pkg-config --libs libcurl libxml-2.0`;" \
353 modules/xcap_client/Makefile 346 modules/xcap_client/Makefile
347 %{l_shtool} subst \
348 -e 's;^\(DEFS+= *\);\1 -D__EXTENSIONS__;' \
349 modules/presence_xml/Makefile \
354 %{l_shtool} subst \ 350 %{l_shtool} subst \
355 -e 's;^\(DEFS+=\).*\\$;\1 \\;' \ 351 -e 's;^\(DEFS+=\).*\\$;\1 \\;' \
356 -e "s;\-I[^ \t][^ \t]*;`%{l_prefix}/bin/pkg-config --cflags-only-I libxml-2.0`;g" \ 352 -e "s;\-I[^ \t][^ \t]*;`%{l_prefix}/bin/pkg-config --cflags-only-I libxml-2.0`;g" \
357 -e "s;^\(LIBS=\).*;\1`%{l_prefix}/bin/pkg-config --libs libxml-2.0`;" \ 353 -e "s;^\(LIBS=\).*;\1`%{l_prefix}/bin/pkg-config --libs libxml-2.0`;" \
358 modules/cpl-c/Makefile \ 354 modules/cpl-c/Makefile \
502 ./configure 498 ./configure
503 %{l_make} %{l_mflags -O} 499 %{l_make} %{l_mflags -O}
504 ) || exit $? 500 ) || exit $?
505 501
506 %install 502 %install
503 # clean build cruft
507 rm -rf $RPM_BUILD_ROOT 504 rm -rf $RPM_BUILD_ROOT
508 505
509 # select modules 506 # select modules
510 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' 507 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'
511 %if "%{with_croute}" == "yes" 508 %if "%{with_croute}" == "yes"

mercurial