| 1 ## |
1 ## |
| 2 ## kamailio.spec -- OpenPKG RPM Package Specification |
2 ## kamailio.spec -- OpenPKG RPM Package Specification |
| 3 ## Copyright (c) 2011 Michael Schloh von Bennewitz <michael@schloh.com> |
3 ## Copyright (c) 2012 Michael Schloh von Bennewitz <michael@schloh.com> |
| 4 ## |
4 ## |
| 5 ## Permission to use, copy, modify, and distribute this software for |
5 ## Permission to use, copy, modify, and distribute this software for |
| 6 ## any purpose with or without fee is hereby granted, provided that |
6 ## any purpose with or without fee is hereby granted, provided that |
| 7 ## the above copyright notice and this permission notice appear in all |
7 ## the above copyright notice and this permission notice appear in all |
| 8 ## copies. |
8 ## copies. |
| 209 modules/db_mysql/Makefile \ |
210 modules/db_mysql/Makefile \ |
| 210 modules/xmlrpc/Makefile |
211 modules/xmlrpc/Makefile |
| 211 %{l_shtool} subst \ |
212 %{l_shtool} subst \ |
| 212 -e 's;\(-keyout.*\);\1 || true;' \ |
213 -e 's;\(-keyout.*\);\1 || true;' \ |
| 213 modules/tls/sip-router_cert.sh |
214 modules/tls/sip-router_cert.sh |
| |
215 %{l_shtool} subst \ |
| |
216 -e 's;^#! */bin/bash;#! %{l_prefix}/bin/bash;' \ |
| |
217 -e 's; /\(etc/kamailio\); %{l_prefix}/\1;' \ |
| |
218 -e 's;-f /usr/local/etc/kamailio/kamctlrc;false;' \ |
| |
219 -e 's; /usr/local/etc/kamailio/kamctlrc;unleash-betty-boop;' \ |
| |
220 -e 's;-f ~/.kamctlrc;false;g' \ |
| |
221 -e 's;-f ./kamctlrc;false;g' \ |
| |
222 -e 's;\(ETCDIR="\)/usr/local/\(etc/kamailio"\);\1%{l_prefix}/\2;' \ |
| |
223 -e 's;PATH=\$PATH:/usr/local/sbin;PATH=%{l_prefix}/sbin:$PATH;' \ |
| |
224 -e 's;\(MYLIBDIR="\)/usr/local/\(lib/kamailio/kamctl"\);\1%{l_prefix}/\2;' \ |
| |
225 utils/kamctl/kam*ctl |
| |
226 %{l_shtool} subst \ |
| |
227 -e 's;/var/run/\(kamailio.pid\);%{l_prefix}/var/kamailio/\1;g' \ |
| |
228 utils/kamctl/kamctl.base \ |
| |
229 utils/kamctl/kamctlrc |
| |
230 %{l_shtool} subst \ |
| |
231 -e 's;\(#include.*\)memcache\.h;\1libmemcached/memcached.h;' \ |
| |
232 modules_k/memcached/memcached.h |
| 214 |
233 |
| 215 %build |
234 %build |
| 216 # select modules |
235 # select modules |
| 217 modslist='acc alias_db auth auth_identity avp avpops avp_db benchmark blst call_control cfgutils cfg_db cfg_rpc counters cpl-c ctl db_text db_flatstore db_ops debugger dialog dialplan dispatcher diversion domain domainpolicy drouting eval exec enum fifo gflags group htable identity imc kex lcr malloc_test mangler matrix maxfwd mi_datagram mi_fifo mi_rpc mediaproxy mqueue msilo mtree nathelper nat_traversal options path pdb pdt peering perl perlvdb permissions pike pipelimit prefix_route presence presence_conference presence_dialoginfo presence_mwi presence_xml privacy pua pua_bla pua_dialoginfo pua_mi pua_usrloc pua_xmpp pv qos ratelimit regex registrar rr rls rtimer rtpproxy sanity seas siptrace siputils sl sms speeddial sqlops sst statistics textops textopsx timer tm tmx topoh uac uac_redirect uri uri_db userblacklist usrloc utils xcap xcap_client xcap_server xhttp xlog xmlops xmlrpc xmpp' |
236 modslist='acc alias_db auth auth_identity avp avpops avp_db benchmark blst call_control cfgutils cfg_db cfg_rpc counters cpl-c ctl db_text db_flatstore db_ops debugger dialog dialplan dispatcher diversion domain domainpolicy drouting eval exec enum fifo gflags group htable imc kex lcr malloc_test mangler matrix maxfwd mi_datagram mi_fifo mi_rpc mediaproxy mqueue msilo mtree nathelper nat_traversal options path pdb pdt peering perl perlvdb permissions pike pipelimit prefix_route presence presence_b2b presence_conference presence_dialoginfo presence_mwi presence_reginfo presence_xml pua pua_bla pua_dialoginfo pua_mi pua_reginfo pua_usrloc pua_xmpp pv qos ratelimit regex registrar rr rls rtimer rtpproxy sanity sdpops seas sipcapture siptrace siputils sl sms speeddial sqlops sst statistics textops textopsx timer tm tmx topoh uac uac_redirect uri uri_db userblacklist usrloc utils xcap xcap_client xcap_server xhttp xlog xmlops xmlrpc xmpp' |
| 218 %if "%{with_ssl}" == "yes" |
237 %if "%{with_ssl}" == "yes" |
| 219 modslist="$modslist tls" |
238 modslist="$modslist tls" |
| 220 %endif |
239 %endif |
| 221 %if "%{with_croute}" == "yes" |
240 %if "%{with_croute}" == "yes" |
| 222 modslist="$modslist carrierroute" |
241 modslist="$modslist carrierroute" |
| 242 %if "%{with_mysql}" == "yes" |
261 %if "%{with_mysql}" == "yes" |
| 243 modslist="$modslist db_mysql" |
262 modslist="$modslist db_mysql" |
| 244 %endif |
263 %endif |
| 245 %if "%{with_pgsql}" == "yes" |
264 %if "%{with_pgsql}" == "yes" |
| 246 modslist="$modslist db_postgres" |
265 modslist="$modslist db_postgres" |
| |
266 %endif |
| |
267 %if "%{with_sqlite}" == "yes" |
| |
268 modslist="$modslist db_sqlite" |
| 247 %endif |
269 %endif |
| 248 %if "%{with_odbc}" == "yes" |
270 %if "%{with_odbc}" == "yes" |
| 249 modslist="$modslist db_unixodbc" |
271 modslist="$modslist db_unixodbc" |
| 250 %endif |
272 %endif |
| 251 %if "%{with_lua}" == "yes" |
273 %if "%{with_lua}" == "yes" |
| 314 |
339 |
| 315 %install |
340 %install |
| 316 rm -rf $RPM_BUILD_ROOT |
341 rm -rf $RPM_BUILD_ROOT |
| 317 |
342 |
| 318 # select modules |
343 # select modules |
| 319 modslist='acc alias_db auth auth_identity avp avpops avp_db benchmark blst call_control cfgutils cfg_db cfg_rpc counters cpl-c ctl db_text db_flatstore db_ops debugger dialog dialplan dispatcher diversion domain domainpolicy drouting eval exec enum fifo gflags group htable identity imc kex lcr malloc_test mangler matrix maxfwd mi_datagram mi_fifo mi_rpc mediaproxy mqueue msilo mtree nathelper nat_traversal options path pdb pdt peering perl perlvdb permissions pike pipelimit prefix_route presence presence_conference presence_dialoginfo presence_mwi presence_xml privacy pua pua_bla pua_dialoginfo pua_mi pua_usrloc pua_xmpp pv qos ratelimit regex registrar rr rls rtimer rtpproxy sanity seas siptrace siputils sl sms speeddial sqlops sst statistics textops textopsx timer tm tmx topoh uac uac_redirect uri uri_db userblacklist usrloc utils xcap xcap_client xcap_server xhttp xlog xmlops xmlrpc xmpp' |
344 modslist='acc alias_db auth auth_identity avp avpops avp_db benchmark blst call_control cfgutils cfg_db cfg_rpc counters cpl-c ctl db_text db_flatstore db_ops debugger dialog dialplan dispatcher diversion domain domainpolicy drouting eval exec enum fifo gflags group htable imc kex lcr malloc_test mangler matrix maxfwd mi_datagram mi_fifo mi_rpc mediaproxy mqueue msilo mtree nathelper nat_traversal options path pdb pdt peering perl perlvdb permissions pike pipelimit prefix_route presence presence_b2b presence_conference presence_dialoginfo presence_mwi presence_reginfo presence_xml pua pua_bla pua_dialoginfo pua_mi pua_reginfo pua_usrloc pua_xmpp pv qos ratelimit regex registrar rr rls rtimer rtpproxy sanity sdpops seas sipcapture siptrace siputils sl sms speeddial sqlops sst statistics textops textopsx timer tm tmx topoh uac uac_redirect uri uri_db userblacklist usrloc utils xcap xcap_client xcap_server xhttp xlog xmlops xmlrpc xmpp' |
| 320 %if "%{with_ssl}" == "yes" |
345 %if "%{with_ssl}" == "yes" |
| 321 modslist="$modslist tls" |
346 modslist="$modslist tls" |
| 322 %endif |
347 %endif |
| 323 %if "%{with_croute}" == "yes" |
348 %if "%{with_croute}" == "yes" |
| 324 modslist="$modslist carrierroute" |
349 modslist="$modslist carrierroute" |
| 360 modslist="$modslist geoip" |
385 modslist="$modslist geoip" |
| 361 %endif |
386 %endif |
| 362 |
387 |
| 363 # install program, utils, and modules |
388 # install program, utils, and modules |
| 364 %{l_make} %{l_mflags} \ |
389 %{l_make} %{l_mflags} \ |
| 365 INSTALL="%{l_shtool} install -c" \ |
|
| 366 INSTALL_CFG="%{l_shtool} install -c" \ |
|
| 367 INSTALL_BIN="%{l_shtool} install -c" \ |
|
| 368 INSTALL_SCRIPT="%{l_shtool} install -c" \ |
|
| 369 INSTALL_MODULES="%{l_shtool} install -c" \ |
|
| 370 INSTALL_LIB="%{l_shtool} install -c" \ |
|
| 371 INSTALL_DOC="%{l_shtool} install -c" \ |
|
| 372 INSTALL_MAN="%{l_shtool} install -c" \ |
|
| 373 INSTALL_SHARE="%{l_shtool} install -c" \ |
|
| 374 basedir=$RPM_BUILD_ROOT \ |
|
| 375 prefix=%{l_prefix} \ |
|
| 376 doc-dir=share/kamailio/doc \ |
|
| 377 man-dir=man \ |
|
| 378 data-dir=share/kamailio \ |
|
| 379 include_modules="$modslist" \ |
390 include_modules="$modslist" \ |
| 380 skip_modules="" \ |
391 skip_modules="" \ |
| 381 install |
392 install |
| |
393 |
| |
394 # pare unused documentation |
| |
395 rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/kamailio/docmodules* |
| 382 |
396 |
| 383 # strip down installation |
397 # strip down installation |
| 384 strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true |
398 strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true |
| 385 |
399 |
| 386 # create installation hierarchy |
400 # create installation hierarchy |