kamailio/kamailio.spec

changeset 464
3e2a08d916c6
parent 391
9ea3ce683273
child 548
efb4f295e1cf
equal deleted inserted replaced
1:a832d78c752a 2:4fbf16c42c88
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.
29 Packager: Michael Schloh von Bennewitz 29 Packager: Michael Schloh von Bennewitz
30 Distribution: Europalab Networks Production 30 Distribution: Europalab Networks Production
31 Class: PLUS 31 Class: PLUS
32 Group: VoIP 32 Group: VoIP
33 License: GPL 33 License: GPL
34 Version: 3.1.5 34 Version: 3.2.2
35 Release: 20111001 35 Release: 20120208
36 36
37 # package options 37 # package options
38 %option with_cons yes 38 %option with_cons yes
39 %option with_fsl yes 39 %option with_fsl yes
40 %option with_ssl yes 40 %option with_ssl yes
46 %option with_snmp no 46 %option with_snmp no
47 %option with_bdb no 47 %option with_bdb no
48 %option with_mysql no 48 %option with_mysql no
49 %option with_osp no 49 %option with_osp no
50 %option with_pgsql no 50 %option with_pgsql no
51 %option with_sqlite no
51 %option with_odbc no 52 %option with_odbc no
52 %option with_geoip no 53 %option with_geoip no
53 %option with_lua no 54 %option with_lua no
54 %option with_python no 55 %option with_python no
55 56
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"
260 282
261 # build configuration 283 # build configuration
262 %{l_make} %{l_mflags} \ 284 %{l_make} %{l_mflags} \
263 CC="%{l_cc}" \ 285 CC="%{l_cc}" \
264 FLAVOUR=kamailio \ 286 FLAVOUR=kamailio \
287 DESTDIR=$RPM_BUILD_ROOT \
288 INSTALL="%{l_shtool} install -c" \
289 TAR="tar" \
265 %if "%{with_sctp}" == "yes" 290 %if "%{with_sctp}" == "yes"
266 SCTP=1 \ 291 SCTP=1 \
267 %endif 292 %endif
268 %if "%{with_ssl}" == "yes" 293 %if "%{with_ssl}" == "yes"
269 TLS_HOOKS=1 \ 294 TLS_HOOKS=1 \
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

mercurial