%define name    kamailio
%define ver     4.1.2
%define rel     0
%define _sharedir %{_prefix}/share

%define MYSQL_MODULES           mysql
%define POSTGRES_MODULES        postgres
%define UNIXODBC_MODULES        unixodbc
%define LDAP_MODULES            ldap
%define XMLRPC_MODULES          xml
%define PERL_MODULES            perl
%define PYTHON_MODULES          python
%define LUA_MODULES             lua
%define UTILS_MODULES           utils
%define PURPLE_MODULES          purple
%define MEMCACHED_MODULES       memcached
%define TLS_MODULES             tls
%define XMPP_MODULES            xmpp
%define CPL_MODULES             cpl
%define SNMPSTATS_MODULES       snmpstats
%define CARRIERROUTE_MODULES    carrierroute
%define PRESENCE_MODULES        presence
%define RADIUS_MODULES          radius
%define GEOIP_MODULES           geoip

Summary:      Kamailio, very fast and flexible SIP Server
Name:         %name
Version:      %ver
Release:      %rel
Packager:     Ovidiu Sas <osas@voipembedded.com>
License:      GPL
Group:        System Environment/Daemons
Source0:      http://kamailio.org/pub/kamailio/%{ver}/%{name}-%{ver}_src.tar.gz
Source1:      kamailio.init
Source2:      kamailio.default
URL:          http://kamailio.org/
Vendor:       kamailio.org
BuildRoot:    %{_tmppath}/%{name}-%{ver}-buildroot
Conflicts:    kamailio-mysql < %ver, kamailio-postgres < %ver, kamailio-unixodbc < %ver, kamailio-ldap < %ver, kamailio-xmlrpc < %ver, kamailio-perl < %ver, kamailio-python < %ver, kamailio-lua < %ver, kamailio-utils < %ver, kamailio-purple < %ver, kamailio-memcached  < %ver, kamailio-tls  < %ver, kamailio-xmpp  < %ver, kamailio-cpl  < %ver, kamailio-snmpstats  < %ver, kamailio-carrierroute  < %ver, kamailio-presence  < %ver, kamailio-radius  < %ver, kamailio-geoip  < %ver
BuildPrereq:  make flex bison pcre-devel

%description
Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, kamailio can handle thousands calls
per second even on low-budget hardware. A C Shell like scripting language
provides full control over the server's behaviour. It's modular
architecture allows only required functionality to be loaded.
Currently the following modules are available: digest authentication,
CPL scripts, instant messaging, MySQL and UNIXODBC support, a presence agent,
radius authentication, record routing, an SMS gateway, a
transaction and dialog module, OSP module, statistics support,
registrar and user location, SNMP, SIMPLE Presence and Perl programming
interface.

%package  mysql
Summary:  MySQL connectivity for the Kamailio.
Group:    System Environment/Daemons
Requires: kamailio = %ver
BuildPrereq:  mysql-devel zlib-devel

%description mysql
The kamailio-mysql package contains MySQL database connectivity that you
need to use digest authentication module or persistent user location
entries.


%package  postgres
Summary:  MPOSTGRES connectivity for the Kamailio.
Group:    System Environment/Daemons
Requires: kamailio = %ver
BuildPrereq:  postgresql-devel

%description postgres
The kamailio-postgres package contains Postgres database connectivity that you
need to use digest authentication module or persistent user location
entries.


%package  unixodbc
Summary:  UNIXODBC connectivity for Kamailio.
Group:    System Environment/Daemons
Requires: kamailio = %ver
BuildPrereq:  unixODBC-devel

%description unixodbc
The kamailio-unixodbc package contains UNIXODBC database connectivity support
that is required by other modules with database dependencies.


%package  utils
Summary:  Utils for Kamailio.
Group:    System Environment/Daemons
Requires: kamailio = %ver

%description utils
The kamailio-utils package provides a set utility functions for Kamailio


%package  cpl
Summary:  CPL module (CPL interpreter engine) for Kamailio
Group:    System Environment/Daemons
Requires: kamailio = %ver
BuildPrereq:  libxml2-devel

%description cpl
The kamailio-cpl package provides a CPL interpreter engine for Kamailio


%package  radius
Summary:  Kamailio radius support for AAA API.
Group:    System Environment/Daemons
Requires: kamailio = %ver
BuildPrereq:  radiusclient-ng-devel

%description radius
The kamailio-radius package contains modules for radius authentication, group
membership and uri checking.


%package  snmpstats
Summary:  SNMP AgentX subagent module for Kamailio
Group:    System Environment/Daemons
Requires: kamailio = %ver, net-snmp-utils
BuildPrereq:  lm_sensors-devel net-snmp-devel

%description snmpstats
The kamailio-snmpstats package snmpstats module for Kamailio.  This module acts
as an AgentX subagent which connects to a master agent.


%package  presence
Summary:  sip presence user agent support for Kamailio
Group:    System Environment/Daemons
Requires: kamailio = %ver
BuildPrereq:  libxml2-devel, curl-devel

%description presence
The kamailio-presence package contains a sip Presence Agent.


%package  xmpp
Summary:  SIP2XMPP message translation support for Kamailio.
Group:    System Environment/Daemons
Requires: kamailio = %ver
BuildPrereq:  expat-devel

%description xmpp
The kamailio-xmpp package contains a SIP to XMPP message translator.


%package  tls
Summary:  TLS transport protocol for Kamailio.
Group:    System Environment/Daemons
Requires: kamailio = %ver
BuildPrereq:  openssl-devel

%description tls
The kamailio-tls package contains the SIP TLSt transport mechanism for Kamailio.


%package  carrierroute
Summary:  Routing module for Kamailio.
Group:    System Environment/Daemons
Requires: kamailio = %ver
BuildPrereq:  libconfuse-devel

%description carrierroute
The kamailio-carrierroute package contains a fast routing engine.


%package  purple
Summary:  Provides the purple module, a multi-protocol IM gateway.
Group:    System Environment/Daemons
Requires: kamailio = %ver
BuildPrereq: libpurple-devel

%description purple
The kamailio-purple package provides the purple module, a multi-protocol instant
messaging gateway module.


%package  ldap
Summary:  LDAP modules for Kamailio.
Group:    System Environment/Daemons
Requires: kamailio = %ver
BuildPrereq: openldap-devel

%description ldap
The kamailio-ldap package provides the ldap and h350 modules for Kamailio,
enabling LDAP queries from the Kamailio config and storage of SIP account
data in an LDAP directory.


#%package  memcached
#Summary:  Distributed hash table for Kamailio.
#Group:    System Environment/Daemons
#Requires: kamailio = %ver
#BuildPrereq:  libmemcached-devel
#
#%description memcached
#The kamailio-memcached package provides access to a distributed hash table memcached.


#%package  xmlrpc
#Summary:  XMLRPC support for Kamailio's Management Interface.
#Group:    System Environment/Daemons
#Requires: kamailio = %ver
#BuildPrereq:  libxml2-devel xmlrpc-c-devel
#
#%description xmlrpc
#The kamailio-xmlrpc package provides the XMLRPC transport implementations for Kamailio's
#Management and Control Interface.


%package  perl
Summary:  Perl extensions and database driver for Kamailio.
Group:    System Environment/Daemons 
Requires: kamailio = %ver
BuildPrereq: mod_perl-devel

%description perl
The kamailio-perl package provides an interface for Kamailio to write Perl extensions and
the perlvdb database driver for Kamailio.


%package  lua
Summary:  Lua extensions for Kamailio.
Group:    System Environment/Daemons
Requires: kamailio = %ver
BuildPrereq: lua-devel

%description lua
The kamailio-lua package provides an interface for Kamailio to write Python extensions


%package  python
Summary:  Python extensions for Kamailio.
Group:    System Environment/Daemons
Requires: kamailio = %ver
BuildPrereq: python-devel

%description python
The kamailio-python package provides an interface for Kamailio to write Python extensions


%package  geoip
Summary:  GeoIP extensions for Kamailio.
Group:    System Environment/Daemons
Requires: kamailio = %ver
BuildPrereq: geoip-devel

%description geoip
The kamailio-geoip package provides a GeoIP interface for Kamailio




%prep
%setup -n %{name}-%{ver}

%build
make FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$RPM_BUILD_ROOT basedir=$RPM_BUILD_ROOT cfg_target=/%{_sysconfdir}/kamailio/ modules_dirs="modules modules_k"
make
make every-module skip_modules="iptrtpproxy" group_include="kstandard"
make every-module group_include="k%MYSQL_MODULES"
make every-module group_include="k%POSTGRES_MODULES"
make every-module group_include="k%UNIXODBC_MODULES"
make every-module group_include="k%UTILS_MODULES"
make every-module group_include="k%CPL_MODULES"
make every-module group_include="k%RADIUS_MODULES"
make every-module group_include="k%SNMPSTATS_MODULES"
make every-module group_include="k%PRESENCE_MODULES"
make every-module group_include="k%XMPP_MODULES"
make every-module group_include="k%TLS_MODULES"
make every-module group_include="k%CARRIERROUTE_MODULES"
make every-module group_include="k%PURPLE_MODULES"
make every-module group_include="k%LDAP_MODULES"
#make every-module group_include="k%MEMCACHED_MODULES"
#make every-module group_include="k%XMLRPC_MODULES"
make every-module group_include="k%PERL_MODULES"
make every-module group_include="k%LUA_MODULES"
make every-module group_include="k%PYTHON_MODULES"
make every-module group_include="k%GEOIP_MODULES"

%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"

make install
make install-modules-all skip_modules="iptrtpproxy" group_include="kstandard"
make install-modules-all group_include="k%MYSQL_MODULES"
make install-modules-all group_include="k%POSTGRES_MODULES"
make install-modules-all group_include="k%UNIXODBC_MODULES"
make install-modules-all group_include="k%UTILS_MODULES"
make install-modules-all group_include="k%CPL_MODULES"
make install-modules-all group_include="k%SNMPSTATS_MODULES"
make install-modules-all group_include="k%RADIUS_MODULES"
make install-modules-all group_include="k%PRESENCE_MODULES"
make install-modules-all group_include="k%XMPP_MODULES"
make install-modules-all group_include="k%TLS_MODULES"
make install-modules-all group_include="k%CARRIERROUTE_MODULES"
make install-modules-all group_include="k%PURPLE_MODULES"
make install-modules-all group_include="k%LDAP_MODULES"
#make install-modules-all group_include="k%MEMCACHED_MODULES"
#make install-modules-all group_include="k%XMLRPC_MODULES"
make install-modules-all group_include="k%PERL_MODULES"
make install-modules-all group_include="k%LUA_MODULES"
make install-modules-all group_include="k%PYTHON_MODULES"
make install-modules-all group_include="k%GEOIP_MODULES"


mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d
install -m755 $RPM_SOURCE_DIR/kamailio.init \
              $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/kamailio

mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/default
install -m755 $RPM_SOURCE_DIR/kamailio.default \
              $RPM_BUILD_ROOT/%{_sysconfdir}/default/kamailio


%pre
/usr/sbin/groupadd -r kamailio 2> /dev/null || :
/usr/sbin/useradd -r -g kamailio -s /bin/false -c "Kamailio daemon" -d \
                  %{_libdir}/kamailio kamailio 2> /dev/null || :


%clean
rm -rf "$RPM_BUILD_ROOT"
                
%post           
/sbin/chkconfig --add kamailio

%preun          
if [ $1 = 0 ]; then
    /sbin/service kamailio stop > /dev/null 2>&1
    /sbin/chkconfig --del kamailio
fi
                

%files
%defattr(-,root,root)
%dir %{_docdir}/kamailio
%doc %{_docdir}/kamailio/AUTHORS
%doc %{_docdir}/kamailio/NEWS
%doc %{_docdir}/kamailio/INSTALL
%doc %{_docdir}/kamailio/README
%doc %{_docdir}/kamailio/README-MODULES
%doc %{_docdir}/kamailio/modules/README.auth
%doc %{_docdir}/kamailio/modules/README.avpops
%doc %{_docdir}/kamailio/modules/README.blst
%doc %{_docdir}/kamailio/modules/README.cfg_db
%doc %{_docdir}/kamailio/modules/README.cfg_rpc
%doc %{_docdir}/kamailio/modules/README.counters
%doc %{_docdir}/kamailio/modules/README.ctl
%doc %{_docdir}/kamailio/modules/README.db_flatstore
%doc %{_docdir}/kamailio/modules/README.debugger
%doc %{_docdir}/kamailio/modules/README.dialplan
%doc %{_docdir}/kamailio/modules/README.enum
%doc %{_docdir}/kamailio/modules/README.lcr
%doc %{_docdir}/kamailio/modules/README.malloc_test
%doc %{_docdir}/kamailio/modules/README.matrix
%doc %{_docdir}/kamailio/modules/README.mediaproxy
%doc %{_docdir}/kamailio/modules/README.mi_rpc
%doc %{_docdir}/kamailio/modules/README.mqueue
%doc %{_docdir}/kamailio/modules/README.mtree
%doc %{_docdir}/kamailio/modules/README.pdb
%doc %{_docdir}/kamailio/modules/README.pipelimit
%doc %{_docdir}/kamailio/modules/README.prefix_route
#%doc %{_docdir}/kamailio/modules/README.privacy
%doc %{_docdir}/kamailio/modules/README.ratelimit
%doc %{_docdir}/kamailio/modules/README.sanity
%doc %{_docdir}/kamailio/modules/README.sl
%doc %{_docdir}/kamailio/modules/README.sms
%doc %{_docdir}/kamailio/modules/README.textopsx
%doc %{_docdir}/kamailio/modules/README.tm
%doc %{_docdir}/kamailio/modules/README.topoh
%doc %{_docdir}/kamailio/modules/README.xhttp
%doc %{_docdir}/kamailio/modules_k/README.acc
%doc %{_docdir}/kamailio/modules_k/README.alias_db
%doc %{_docdir}/kamailio/modules_k/README.auth_db
%doc %{_docdir}/kamailio/modules_k/README.auth_diameter
%doc %{_docdir}/kamailio/modules_k/README.benchmark
%doc %{_docdir}/kamailio/modules_k/README.call_control
%doc %{_docdir}/kamailio/modules_k/README.cfgutils
%doc %{_docdir}/kamailio/modules_k/README.db_text
%doc %{_docdir}/kamailio/modules_k/README.dialog
%doc %{_docdir}/kamailio/modules_k/README.dispatcher
%doc %{_docdir}/kamailio/modules_k/README.diversion
%doc %{_docdir}/kamailio/modules_k/README.domain
%doc %{_docdir}/kamailio/modules_k/README.domainpolicy
%doc %{_docdir}/kamailio/modules_k/README.drouting
%doc %{_docdir}/kamailio/modules_k/README.exec
%doc %{_docdir}/kamailio/modules_k/README.group
%doc %{_docdir}/kamailio/modules_k/README.htable
%doc %{_docdir}/kamailio/modules_k/README.imc
%doc %{_docdir}/kamailio/modules_k/README.kex
%doc %{_docdir}/kamailio/modules_k/README.maxfwd
%doc %{_docdir}/kamailio/modules_k/README.mi_datagram
%doc %{_docdir}/kamailio/modules_k/README.mi_fifo
%doc %{_docdir}/kamailio/modules_k/README.msilo
%doc %{_docdir}/kamailio/modules_k/README.nat_traversal
%doc %{_docdir}/kamailio/modules_k/README.nathelper
%doc %{_docdir}/kamailio/modules_k/README.path
%doc %{_docdir}/kamailio/modules_k/README.pdt
%doc %{_docdir}/kamailio/modules_k/README.permissions
%doc %{_docdir}/kamailio/modules_k/README.pike
%doc %{_docdir}/kamailio/modules_k/README.pua_mi
%doc %{_docdir}/kamailio/modules_k/README.pv
%doc %{_docdir}/kamailio/modules_k/README.qos
%doc %{_docdir}/kamailio/modules_k/README.regex
%doc %{_docdir}/kamailio/modules_k/README.registrar
%doc %{_docdir}/kamailio/modules_k/README.rr
%doc %{_docdir}/kamailio/modules_k/README.rtimer
%doc %{_docdir}/kamailio/modules_k/README.rtpproxy
%doc %{_docdir}/kamailio/modules_k/README.seas
%doc %{_docdir}/kamailio/modules_k/README.siptrace
%doc %{_docdir}/kamailio/modules_k/README.siputils
%doc %{_docdir}/kamailio/modules_k/README.speeddial
%doc %{_docdir}/kamailio/modules_k/README.sqlops
%doc %{_docdir}/kamailio/modules_k/README.sst
%doc %{_docdir}/kamailio/modules_k/README.statistics
%doc %{_docdir}/kamailio/modules_k/README.textops
%doc %{_docdir}/kamailio/modules_k/README.tmx
%doc %{_docdir}/kamailio/modules_k/README.uac
%doc %{_docdir}/kamailio/modules_k/README.uac_redirect
%doc %{_docdir}/kamailio/modules_k/README.uri_db
%doc %{_docdir}/kamailio/modules_k/README.userblacklist
%doc %{_docdir}/kamailio/modules_k/README.usrloc
%doc %{_docdir}/kamailio/modules_k/README.xlog


%dir %{_sysconfdir}/kamailio
%config(noreplace) %{_sysconfdir}/kamailio/*
%config %{_sysconfdir}/rc.d/init.d/*
%config %{_sysconfdir}/default/*

%dir %{_libdir}/kamailio
%{_libdir}/kamailio/libkcore.so
%{_libdir}/kamailio/libkcore.so.1
%{_libdir}/kamailio/libkcore.so.1.0
%{_libdir}/kamailio/libkmi.so
%{_libdir}/kamailio/libkmi.so.1
%{_libdir}/kamailio/libkmi.so.1.0
%{_libdir}/kamailio/libsrdb1.so
%{_libdir}/kamailio/libsrdb1.so.1
%{_libdir}/kamailio/libsrdb1.so.1.0
%{_libdir}/kamailio/libsrdb2.so
%{_libdir}/kamailio/libsrdb2.so.1
%{_libdir}/kamailio/libsrdb2.so.1.0
%{_libdir}/kamailio/libtrie.so
%{_libdir}/kamailio/libtrie.so.1
%{_libdir}/kamailio/libtrie.so.1.0
%dir %{_libdir}/kamailio/modules
%{_libdir}/kamailio/modules/auth.so
%{_libdir}/kamailio/modules/avpops.so
%{_libdir}/kamailio/modules/blst.so
%{_libdir}/kamailio/modules/cfg_db.so
%{_libdir}/kamailio/modules/cfg_rpc.so
%{_libdir}/kamailio/modules/counters.so
%{_libdir}/kamailio/modules/ctl.so
%{_libdir}/kamailio/modules/db_flatstore.so
%{_libdir}/kamailio/modules/debugger.so
%{_libdir}/kamailio/modules/dialplan.so
%{_libdir}/kamailio/modules/enum.so
%{_libdir}/kamailio/modules/lcr.so
%{_libdir}/kamailio/modules/malloc_test.so
%{_libdir}/kamailio/modules/matrix.so
%{_libdir}/kamailio/modules/mediaproxy.so
%{_libdir}/kamailio/modules/mi_rpc.so
%{_libdir}/kamailio/modules/mqueue.so
%{_libdir}/kamailio/modules/mtree.so
%{_libdir}/kamailio/modules/pdb.so
%{_libdir}/kamailio/modules/pipelimit.so
%{_libdir}/kamailio/modules/prefix_route.so
%{_libdir}/kamailio/modules/privacy.so
%{_libdir}/kamailio/modules/ratelimit.so
%{_libdir}/kamailio/modules/sanity.so
%{_libdir}/kamailio/modules/sl.so
%{_libdir}/kamailio/modules/sms.so
%{_libdir}/kamailio/modules/tm.so
%{_libdir}/kamailio/modules/textopsx.so
%{_libdir}/kamailio/modules/topoh.so
%{_libdir}/kamailio/modules/xhttp.so
%dir %{_libdir}/kamailio/modules_k
%{_libdir}/kamailio/modules_k/acc.so
%{_libdir}/kamailio/modules_k/alias_db.so
%{_libdir}/kamailio/modules_k/auth_db.so
%{_libdir}/kamailio/modules_k/auth_diameter.so
%{_libdir}/kamailio/modules_k/benchmark.so
%{_libdir}/kamailio/modules_k/call_control.so
%{_libdir}/kamailio/modules_k/cfgutils.so
%{_libdir}/kamailio/modules_k/db_text.so
%{_libdir}/kamailio/modules_k/dialog.so
%{_libdir}/kamailio/modules_k/dispatcher.so
%{_libdir}/kamailio/modules_k/diversion.so
%{_libdir}/kamailio/modules_k/domain.so
%{_libdir}/kamailio/modules_k/domainpolicy.so
%{_libdir}/kamailio/modules_k/drouting.so
%{_libdir}/kamailio/modules_k/exec.so
%{_libdir}/kamailio/modules_k/group.so
%{_libdir}/kamailio/modules_k/htable.so
%{_libdir}/kamailio/modules_k/imc.so
%{_libdir}/kamailio/modules_k/kex.so
%{_libdir}/kamailio/modules_k/maxfwd.so
%{_libdir}/kamailio/modules_k/mi_datagram.so
%{_libdir}/kamailio/modules_k/mi_fifo.so
%{_libdir}/kamailio/modules_k/msilo.so
%{_libdir}/kamailio/modules_k/nat_traversal.so
%{_libdir}/kamailio/modules_k/nathelper.so
%{_libdir}/kamailio/modules_k/path.so
%{_libdir}/kamailio/modules_k/pdt.so
%{_libdir}/kamailio/modules_k/permissions.so
%{_libdir}/kamailio/modules_k/pike.so
%{_libdir}/kamailio/modules_k/pua_mi.so
%{_libdir}/kamailio/modules_k/pv.so
%{_libdir}/kamailio/modules_k/qos.so
%{_libdir}/kamailio/modules_k/regex.so
%{_libdir}/kamailio/modules_k/registrar.so
%{_libdir}/kamailio/modules_k/rr.so
%{_libdir}/kamailio/modules_k/rtimer.so
%{_libdir}/kamailio/modules_k/rtpproxy.so
%{_libdir}/kamailio/modules_k/seas.so
%{_libdir}/kamailio/modules_k/siptrace.so
%{_libdir}/kamailio/modules_k/siputils.so
%{_libdir}/kamailio/modules_k/speeddial.so
%{_libdir}/kamailio/modules_k/sqlops.so
%{_libdir}/kamailio/modules_k/sst.so
%{_libdir}/kamailio/modules_k/statistics.so
%{_libdir}/kamailio/modules_k/textops.so
%{_libdir}/kamailio/modules_k/tmx.so
%{_libdir}/kamailio/modules_k/uac.so
%{_libdir}/kamailio/modules_k/uac_redirect.so
%{_libdir}/kamailio/modules_k/uri_db.so
%{_libdir}/kamailio/modules_k/userblacklist.so
%{_libdir}/kamailio/modules_k/usrloc.so
%{_libdir}/kamailio/modules_k/xlog.so


%{_sbindir}/kamailio
%{_sbindir}/kamctl
%{_sbindir}/kamdbctl
%{_sbindir}/kamcmd
%{_libdir}/kamailio/kamctl/dbtextdb/dbtextdb.py
%{_libdir}/kamailio/kamctl/dbtextdb/dbtextdb.pyc
%{_libdir}/kamailio/kamctl/dbtextdb/dbtextdb.pyo
%{_libdir}/kamailio/kamctl/kamctl.base
%{_libdir}/kamailio/kamctl/kamctl.ctlbase
%{_libdir}/kamailio/kamctl/kamctl.dbtext
%{_libdir}/kamailio/kamctl/kamctl.fifo
%{_libdir}/kamailio/kamctl/kamctl.ser
%{_libdir}/kamailio/kamctl/kamctl.ser_mi
%{_libdir}/kamailio/kamctl/kamctl.sqlbase
%{_libdir}/kamailio/kamctl/kamctl.unixsock
%{_libdir}/kamailio/kamctl/kamdbctl.base
%{_libdir}/kamailio/kamctl/kamdbctl.dbtext

%{_mandir}/man5/*
%{_mandir}/man8/*

%{_sharedir}/kamailio/dbtext/kamailio/*


%files mysql
%defattr(-,root,root)
%{_libdir}/kamailio/modules/db_mysql.so
%{_libdir}/kamailio/kamctl/kamctl.mysql
%{_libdir}/kamailio/kamctl/kamdbctl.mysql
%{_sharedir}/kamailio/mysql/*


%files postgres
%defattr(-,root,root)
%doc %{_docdir}/kamailio/modules/README.db_postgres
%{_libdir}/kamailio/modules/db_postgres.so
%{_libdir}/kamailio/kamctl/kamctl.pgsql
%{_libdir}/kamailio/kamctl/kamdbctl.pgsql
%{_sharedir}/kamailio/postgres/*


%files unixodbc
%defattr(-,root,root)
%doc %{_docdir}/kamailio/modules_k/README.db_unixodbc
%{_libdir}/kamailio/modules_k/db_unixodbc.so


%files utils
%defattr(-,root,root)
%{_docdir}/kamailio/modules/README.utils
%{_libdir}/kamailio/modules/utils.so


%files cpl
%defattr(-,root,root)
%{_docdir}/kamailio/modules_k/README.cpl-c
%{_libdir}/kamailio/modules_k/cpl-c.so


%files radius
%defattr(-,root,root)
%{_docdir}/kamailio/modules_k/README.acc_radius
%{_docdir}/kamailio/modules_k/README.auth_radius
%{_docdir}/kamailio/modules_k/README.misc_radius
%{_docdir}/kamailio/modules/README.peering
%{_libdir}/kamailio/modules_k/acc_radius.so
%{_libdir}/kamailio/modules_k/auth_radius.so
%{_libdir}/kamailio/modules_k/misc_radius.so
%{_libdir}/kamailio/modules/peering.so


%files snmpstats
%defattr(-,root,root)
%{_docdir}/kamailio/modules_k/README.snmpstats
%{_libdir}/kamailio/modules_k/snmpstats.so


%files presence
%defattr(-,root,root)
%doc %{_docdir}/kamailio/modules_k/README.presence
%doc %{_docdir}/kamailio/modules_k/README.presence_conference
%doc %{_docdir}/kamailio/modules_k/README.presence_dialoginfo
%doc %{_docdir}/kamailio/modules_k/README.presence_mwi
%doc %{_docdir}/kamailio/modules_k/README.presence_xml
%doc %{_docdir}/kamailio/modules_k/README.pua
%doc %{_docdir}/kamailio/modules_k/README.pua_bla
%doc %{_docdir}/kamailio/modules_k/README.pua_dialoginfo
%doc %{_docdir}/kamailio/modules_k/README.pua_mi
%doc %{_docdir}/kamailio/modules_k/README.pua_usrloc
%doc %{_docdir}/kamailio/modules_k/README.pua_xmpp
%doc %{_docdir}/kamailio/modules_k/README.rls
%doc %{_docdir}/kamailio/modules_k/README.xcap_client
%doc %{_docdir}/kamailio/modules_k/README.xcap_server
%{_libdir}/kamailio/modules_k/presence.so
%{_libdir}/kamailio/modules_k/presence_conference.so
%{_libdir}/kamailio/modules_k/presence_dialoginfo.so
%{_libdir}/kamailio/modules_k/presence_mwi.so
%{_libdir}/kamailio/modules_k/presence_xml.so
%{_libdir}/kamailio/modules_k/pua.so
%{_libdir}/kamailio/modules_k/pua_bla.so
%{_libdir}/kamailio/modules_k/pua_dialoginfo.so
%{_libdir}/kamailio/modules_k/pua_mi.so
%{_libdir}/kamailio/modules_k/pua_usrloc.so
%{_libdir}/kamailio/modules_k/pua_xmpp.so
%{_libdir}/kamailio/modules_k/rls.so
%{_libdir}/kamailio/modules_k/xcap_client.so
%{_libdir}/kamailio/modules_k/xcap_server.so


%files xmpp
%defattr(-,root,root)
%doc %{_docdir}/kamailio/modules_k/README.xmpp
%{_libdir}/kamailio/modules_k/xmpp.so


%files tls
%defattr(-,root,root)
%doc %{_docdir}/kamailio/modules/README.tls
%{_libdir}/kamailio/modules/tls.so


%files carrierroute
%defattr(-,root,root)
%doc %{_docdir}/kamailio/modules/README.carrierroute
%{_libdir}/kamailio/modules/carrierroute.so


%files purple
%defattr(-,root,root)
%doc %{_docdir}/kamailio/modules_k/README.purple
%{_libdir}/kamailio/modules_k/purple.so


%files ldap
%defattr(-,root,root)
%doc %{_docdir}/kamailio/modules_k/README.h350
%doc %{_docdir}/kamailio/modules_k/README.ldap
%{_libdir}/kamailio/modules_k/h350.so
%{_libdir}/kamailio/modules_k/ldap.so


#%files memcached
#%defattr(-,root,root)
#%doc %{_docdir}/kamailio/modules_k/README.memcached
#%{_libdir}/kamailio/modules_k/memcached.so


#%files xmlrpc
#%defattr(-,root,root)
#%doc %{_docdir}/kamailio/modules_k/README.memcached
#%{_libdir}/kamailio/modules_k/memcached.so


%files perl
%defattr(-,root,root)
%doc %{_docdir}/kamailio/modules_k/README.perl
%doc %{_docdir}/kamailio/modules_k/README.perlvdb
%{_libdir}/kamailio/modules_k/perl.so
%{_libdir}/kamailio/modules_k/perlvdb.so
%{_libdir}/kamailio/perl/OpenSER.pm
%{_libdir}/kamailio/perl/OpenSER/Constants.pm
%{_libdir}/kamailio/perl/OpenSER/LDAPUtils/LDAPConf.pm
%{_libdir}/kamailio/perl/OpenSER/LDAPUtils/LDAPConnection.pm
%{_libdir}/kamailio/perl/OpenSER/Message.pm
%{_libdir}/kamailio/perl/OpenSER/Utils/Debug.pm
%{_libdir}/kamailio/perl/OpenSER/Utils/PhoneNumbers.pm
%{_libdir}/kamailio/perl/OpenSER/VDB.pm
%{_libdir}/kamailio/perl/OpenSER/VDB/Adapter/AccountingSIPtrace.pm
%{_libdir}/kamailio/perl/OpenSER/VDB/Adapter/Alias.pm
%{_libdir}/kamailio/perl/OpenSER/VDB/Adapter/Auth.pm
%{_libdir}/kamailio/perl/OpenSER/VDB/Adapter/Describe.pm
%{_libdir}/kamailio/perl/OpenSER/VDB/Adapter/Speeddial.pm
%{_libdir}/kamailio/perl/OpenSER/VDB/Adapter/TableVersions.pm
%{_libdir}/kamailio/perl/OpenSER/VDB/Column.pm
%{_libdir}/kamailio/perl/OpenSER/VDB/Pair.pm
%{_libdir}/kamailio/perl/OpenSER/VDB/ReqCond.pm
%{_libdir}/kamailio/perl/OpenSER/VDB/Result.pm
%{_libdir}/kamailio/perl/OpenSER/VDB/VTab.pm
%{_libdir}/kamailio/perl/OpenSER/VDB/Value.pm

%files lua
%defattr(-,root,root)
%doc %{_docdir}/kamailio/modules/README.app_lua
%{_libdir}/kamailio/modules/app_lua.so


%files python
%defattr(-,root,root)
%doc %{_docdir}/kamailio/modules/README.app_python
%{_libdir}/kamailio/modules/app_python.so


%files geoip
%defattr(-,root,root)
%doc %{_docdir}/kamailio/modules/README.geoip
%{_libdir}/kamailio/modules/geoip.so



%changelog
* Mon Oct 4 2010 Ovidiu Sas <osas@voipembedded.com>
 - Update for kamailio 3.1

* Tue Mar 23 2010 Ovidiu Sas <osas@voipembedded.com>
 - First version of the spec file for kamailio 3.0
