kamailio/kamailio.spec

changeset 408
751f89d647ed
parent 391
9ea3ce683273
child 548
efb4f295e1cf
     1.1 --- a/kamailio/kamailio.spec	Thu Mar 22 20:53:42 2012 +0100
     1.2 +++ b/kamailio/kamailio.spec	Thu Mar 22 21:02:46 2012 +0100
     1.3 @@ -1,6 +1,6 @@
     1.4  ##
     1.5  ##  kamailio.spec -- OpenPKG RPM Package Specification
     1.6 -##  Copyright (c) 2011 Michael Schloh von Bennewitz <michael@schloh.com>
     1.7 +##  Copyright (c) 2012 Michael Schloh von Bennewitz <michael@schloh.com>
     1.8  ##
     1.9  ##  Permission to use, copy, modify, and distribute this software for
    1.10  ##  any purpose with or without fee is hereby granted, provided that
    1.11 @@ -31,8 +31,8 @@
    1.12  Class:        PLUS
    1.13  Group:        VoIP
    1.14  License:      GPL
    1.15 -Version:      3.1.5
    1.16 -Release:      20111001
    1.17 +Version:      3.2.2
    1.18 +Release:      20120208
    1.19  
    1.20  #   package options
    1.21  %option       with_cons    yes
    1.22 @@ -48,6 +48,7 @@
    1.23  %option       with_mysql   no
    1.24  %option       with_osp     no
    1.25  %option       with_pgsql   no
    1.26 +%option       with_sqlite  no
    1.27  %option       with_odbc    no
    1.28  %option       with_geoip   no
    1.29  %option       with_lua     no
    1.30 @@ -211,10 +212,28 @@
    1.31      %{l_shtool} subst \
    1.32          -e 's;\(-keyout.*\);\1 || true;' \
    1.33          modules/tls/sip-router_cert.sh
    1.34 +    %{l_shtool} subst \
    1.35 +        -e 's;^#! */bin/bash;#! %{l_prefix}/bin/bash;' \
    1.36 +        -e 's; /\(etc/kamailio\); %{l_prefix}/\1;' \
    1.37 +        -e 's;-f /usr/local/etc/kamailio/kamctlrc;false;' \
    1.38 +        -e 's; /usr/local/etc/kamailio/kamctlrc;unleash-betty-boop;' \
    1.39 +        -e 's;-f ~/.kamctlrc;false;g' \
    1.40 +        -e 's;-f ./kamctlrc;false;g' \
    1.41 +        -e 's;\(ETCDIR="\)/usr/local/\(etc/kamailio"\);\1%{l_prefix}/\2;' \
    1.42 +        -e 's;PATH=\$PATH:/usr/local/sbin;PATH=%{l_prefix}/sbin:$PATH;' \
    1.43 +        -e 's;\(MYLIBDIR="\)/usr/local/\(lib/kamailio/kamctl"\);\1%{l_prefix}/\2;' \
    1.44 +        utils/kamctl/kam*ctl
    1.45 +    %{l_shtool} subst \
    1.46 +        -e 's;/var/run/\(kamailio.pid\);%{l_prefix}/var/kamailio/\1;g' \
    1.47 +        utils/kamctl/kamctl.base \
    1.48 +        utils/kamctl/kamctlrc
    1.49 +    %{l_shtool} subst \
    1.50 +        -e 's;\(#include.*\)memcache\.h;\1libmemcached/memcached.h;' \
    1.51 +        modules_k/memcached/memcached.h
    1.52  
    1.53  %build
    1.54      #   select modules
    1.55 -    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'
    1.56 +    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'
    1.57  %if "%{with_ssl}" == "yes"
    1.58      modslist="$modslist tls"
    1.59  %endif
    1.60 @@ -245,6 +264,9 @@
    1.61  %if "%{with_pgsql}" == "yes"
    1.62      modslist="$modslist db_postgres"
    1.63  %endif
    1.64 +%if "%{with_sqlite}" == "yes"
    1.65 +    modslist="$modslist db_sqlite"
    1.66 +%endif
    1.67  %if "%{with_odbc}" == "yes"
    1.68      modslist="$modslist db_unixodbc"
    1.69  %endif
    1.70 @@ -262,6 +284,9 @@
    1.71      %{l_make} %{l_mflags} \
    1.72          CC="%{l_cc}" \
    1.73          FLAVOUR=kamailio \
    1.74 +        DESTDIR=$RPM_BUILD_ROOT \
    1.75 +        INSTALL="%{l_shtool} install -c" \
    1.76 +        TAR="tar" \
    1.77  %if "%{with_sctp}" == "yes"
    1.78          SCTP=1 \
    1.79  %endif
    1.80 @@ -316,7 +341,7 @@
    1.81      rm -rf $RPM_BUILD_ROOT
    1.82  
    1.83      #   select modules
    1.84 -    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'
    1.85 +    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'
    1.86  %if "%{with_ssl}" == "yes"
    1.87      modslist="$modslist tls"
    1.88  %endif
    1.89 @@ -362,24 +387,13 @@
    1.90  
    1.91      #   install program, utils, and modules
    1.92      %{l_make} %{l_mflags} \
    1.93 -        INSTALL="%{l_shtool} install -c" \
    1.94 -        INSTALL_CFG="%{l_shtool} install -c" \
    1.95 -        INSTALL_BIN="%{l_shtool} install -c" \
    1.96 -        INSTALL_SCRIPT="%{l_shtool} install -c" \
    1.97 -        INSTALL_MODULES="%{l_shtool} install -c" \
    1.98 -        INSTALL_LIB="%{l_shtool} install -c" \
    1.99 -        INSTALL_DOC="%{l_shtool} install -c" \
   1.100 -        INSTALL_MAN="%{l_shtool} install -c" \
   1.101 -        INSTALL_SHARE="%{l_shtool} install -c" \
   1.102 -        basedir=$RPM_BUILD_ROOT \
   1.103 -        prefix=%{l_prefix} \
   1.104 -        doc-dir=share/kamailio/doc \
   1.105 -        man-dir=man \
   1.106 -        data-dir=share/kamailio \
   1.107          include_modules="$modslist" \
   1.108          skip_modules="" \
   1.109          install
   1.110  
   1.111 +    #   pare unused documentation
   1.112 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/kamailio/docmodules*
   1.113 +
   1.114      #   strip down installation
   1.115      strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
   1.116  

mercurial