Преглед на файлове

pkg/kamailio/deb: merge changes from Debian

Victor Seva преди 11 години
родител
ревизия
09b7a15e24
променени са 41 файла, в които са добавени 1870 реда и са изтрити 2468 реда
  1. 1 1
      pkg/kamailio/deb/debian/compat
  2. 331 323
      pkg/kamailio/deb/debian/control
  3. 1 0
      pkg/kamailio/deb/debian/kamailio-berkeley-bin.dirs
  4. 4 3
      pkg/kamailio/deb/debian/kamailio.README.Debian
  5. 8 18
      pkg/kamailio/deb/debian/kamailio.default
  6. 100 179
      pkg/kamailio/deb/debian/kamailio.init
  7. 2 26
      pkg/kamailio/deb/debian/kamailio.postinst
  8. 53 86
      pkg/kamailio/deb/debian/rules
  9. 1 0
      pkg/kamailio/deb/debian/source/format
  10. 3 0
      pkg/kamailio/deb/debian/watch
  11. 1 1
      pkg/kamailio/deb/jessie/compat
  12. 331 323
      pkg/kamailio/deb/jessie/control
  13. 1 0
      pkg/kamailio/deb/jessie/kamailio-berkeley-bin.dirs
  14. 4 3
      pkg/kamailio/deb/jessie/kamailio.README.Debian
  15. 8 18
      pkg/kamailio/deb/jessie/kamailio.default
  16. 100 179
      pkg/kamailio/deb/jessie/kamailio.init
  17. 2 26
      pkg/kamailio/deb/jessie/kamailio.postinst
  18. 53 86
      pkg/kamailio/deb/jessie/rules
  19. 1 0
      pkg/kamailio/deb/jessie/source/format
  20. 3 0
      pkg/kamailio/deb/jessie/watch
  21. 1 0
      pkg/kamailio/deb/squeeze/changelog
  22. 1 1
      pkg/kamailio/deb/squeeze/compat
  23. 214 266
      pkg/kamailio/deb/squeeze/control
  24. 1 0
      pkg/kamailio/deb/squeeze/kamailio-berkeley-bin.dirs
  25. 4 3
      pkg/kamailio/deb/squeeze/kamailio.README.Debian
  26. 8 18
      pkg/kamailio/deb/squeeze/kamailio.default
  27. 100 179
      pkg/kamailio/deb/squeeze/kamailio.init
  28. 2 26
      pkg/kamailio/deb/squeeze/kamailio.postinst
  29. 43 86
      pkg/kamailio/deb/squeeze/rules
  30. 1 0
      pkg/kamailio/deb/squeeze/source/format
  31. 3 0
      pkg/kamailio/deb/squeeze/watch
  32. 1 1
      pkg/kamailio/deb/wheezy/compat
  33. 311 304
      pkg/kamailio/deb/wheezy/control
  34. 1 0
      pkg/kamailio/deb/wheezy/kamailio-berkeley-bin.dirs
  35. 4 3
      pkg/kamailio/deb/wheezy/kamailio.README.Debian
  36. 8 18
      pkg/kamailio/deb/wheezy/kamailio.default
  37. 100 179
      pkg/kamailio/deb/wheezy/kamailio.init
  38. 2 26
      pkg/kamailio/deb/wheezy/kamailio.postinst
  39. 53 86
      pkg/kamailio/deb/wheezy/rules
  40. 1 0
      pkg/kamailio/deb/wheezy/source/format
  41. 3 0
      pkg/kamailio/deb/wheezy/watch

+ 1 - 1
pkg/kamailio/deb/debian/compat

@@ -1 +1 @@
-5
+9

+ 331 - 323
pkg/kamailio/deb/debian/control

@@ -1,80 +1,58 @@
 Source: kamailio
 Source: kamailio
 Section: net
 Section: net
 Priority: optional
 Priority: optional
-Maintainer: Jon Bonilla <[email protected]>
+Maintainer: Debian VoIP Team <[email protected]>
+Uploaders: Victor Seva <[email protected]>, Tzafrir Cohen <[email protected]>
 Build-Depends: bison,
 Build-Depends: bison,
-               debhelper (>= 5),
-               docbook-xml,
-               dpatch,
-               dpkg-dev (>= 1.13.19),
-               flex,
-               libconfuse-dev,
-               libcurl3-openssl-dev,
-               libdb-dev (>= 4.6.19),
-               libevent-dev,
-               libexpat1-dev,
-               libgcj12-dev,
-               libgeoip-dev (>= 1.4.5),
-               libhiredis-dev (>= 0.10.0),
-               libjson0-dev,
-               libldap2-dev,
-               liblua5.1-0-dev,
-               libmemcached-dev,
-               libmono-2.0-dev,
-               libmysqlclient-dev,
-               libncurses5-dev,
-               libpcre3-dev,
-               libperl-dev,
-               libpq-dev,
-               libpurple-dev,
-               libradiusclient-ng-dev,
-               libreadline-dev,
-               libsasl2-dev,
-               libsctp-dev,
-               libsnmp-dev,
-               libsqlite3-dev,
-               libssl-dev,
-               libxml2-dev,
-               libxmlrpc-c3-dev,
-               libunistring-dev,
-               libval-dev,
-               openssl,
-               python,
-               python-dev,
-               unixodbc-dev,
-               xsltproc,
-               zlib1g-dev
-Standards-Version: 3.9.3
+    debhelper (>= 9),
+    docbook-xml,
+    dpkg-dev (>= 1.16.1.1),
+    flex,
+    libconfuse-dev,
+    libcurl4-openssl-dev,
+    libdb-dev (>= 4.6.19),
+    libevent-dev,
+    libexpat1-dev,
+    libgcj12-dev,
+    libgeoip-dev (>= 1.4.5),
+    libhiredis-dev (>= 0.10.0),
+    libjson0-dev,
+    libldap2-dev,
+    liblua5.1-0-dev,
+    libmemcached-dev,
+    libmono-2.0-dev,
+    libmysqlclient-dev,
+    libncurses5-dev,
+    libpcre3-dev,
+    libperl-dev,
+    libpq-dev,
+    libpurple-dev,
+    libradiusclient-ng-dev,
+    libreadline-dev,
+    libsasl2-dev,
+    libsctp-dev,
+    libsnmp-dev,
+    libsqlite3-dev,
+    libunistring-dev,
+    libval-dev,
+    libxml2-dev,
+    libxmlrpc-c3-dev,
+    openssl,
+    python,
+    python-dev,
+    unixodbc-dev,
+    xsltproc
+Standards-Version: 3.9.4
 Homepage: http://www.kamailio.org/
 Homepage: http://www.kamailio.org/
+Vcs-git: git://anonscm.debian.org/pkg-voip/kamailio.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-voip/kamailio.git
 
 
 Package: kamailio
 Package: kamailio
-Architecture: any
-Depends: adduser,
-         ${misc:Depends},
-         ${shlibs:Depends}
-Conflicts: kamailio-regex-modules
-Suggests: kamailio-autheph-modules,
-          kamailio-berkeley-modules,
-          kamailio-carrierroute-modules,
-          kamailio-cpl-modules,
-          kamailio-dbg,
-          kamailio-dnssec-modules,
-          kamailio-java-modules,
-          kamailio-ldap-modules,
-          kamailio-lua-modules,
-          kamailio-mono-modules,
-          kamailio-mysql-modules,
-          kamailio-perl-modules,
-          kamailio-postgres-modules,
-          kamailio-presence-modules,
-          kamailio-python-modules,
-          kamailio-radius-modules,
-          kamailio-sctp-modules,
-          kamailio-snmpstats-modules,
-          kamailio-tls-modules,
-          kamailio-unixodbc-modules,
-          kamailio-xml-modules,
-          kamailio-xmpp-modules
+Architecture: linux-any
+Multi-Arch: foreign
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, python, adduser
+Suggests: kamailio-mysql-modules, kamailio-postgres-modules, kamailio-unixodbc-modules, kamailio-cpl-modules, kamailio-radius-modules, kamailio-presence-modules, kamailio-xml-modules, kamailio-perl-modules, kamailio-snmpstats-modules, kamailio-xmpp-modules, kamailio-carrierroute-modules, kamailio-berkeley-modules, kamailio-ldap-modules, kamailio-python-modules, kamailio-redis-modules, kamailio-lua-modules, kamailio-mono-modules
 Description: very fast and configurable SIP proxy
 Description: very fast and configurable SIP proxy
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -84,31 +62,138 @@ Description: very fast and configurable SIP proxy
  behaviour. Its modular architecture allows only required functionality to be
  behaviour. Its modular architecture allows only required functionality to be
  loaded.
  loaded.
  .
  .
- Among others, the following modules are available: Digest Authentication, CPL
- scripts, Instant Messaging, MySQL support, Presence Agent, Radius
- Authentication, Record Routing, SMS Gateway, Jabber/XMPP Gateway, Transaction
- Module, Registrar and User Location, XMLRPC Interface.
+ Among others, the following modules are available: digest authentication, CPL
+ scripts, instant messaging, MySQL support, presence agent, RADIUS
+ authentication, record routing, SMS gateway, Jabber/XMPP gateway, transaction
+ module, registrar and user location, XML-RPC interface.
  .
  .
  This package contains the main Kamailio binary along with the principal modules
  This package contains the main Kamailio binary along with the principal modules
  and support binaries.
  and support binaries.
 
 
 Package: kamailio-dbg
 Package: kamailio-dbg
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Description: Debugging symbols for Kamailio SIP proxy
+Priority: extra
+Section: debug
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, kamailio (= ${binary:Version})
+Description: very fast and configurable SIP proxy [debug symbols]
+ 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.
+ .
+ This package contains the debugging symbols for the Kamailio binaries and
+ modules. You only need to install it if you need to debug Kamailio.
+
+Package: kamailio-geoip-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: contains the geoip module
+ 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.
+ .
+ This package provides the geoip module, an extension allowing to
+ use GeoIP API within configuration file.
+
+Package: kamailio-sqlite-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Recommends: sqlite3
+Description: SQLite database connectivity module for Kamailio
+ 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.
+ .
+ This package provides the SQLite database driver for Kamailio.
+
+Package: kamailio-json-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: Json parser and jsonrpc modules for Kamailio
+ 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.
+ .
+ This package provides json parser for Kamailio's configuration file
+ and the JSON-RPC client over netstrings.
+
+Package: kamailio-memcached-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Replaces: kamailio-memcached-module
+Description: Provides the memcached module, an interface to the memcached server
+ 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.
+ .
+ This package provides the memcached module, an interface to the memcached
+ server, a high-performance, distributed memory object caching system.
+
+Package: kamailio-lua-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: contains the app_lua module
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides gdb debugging symbols  for Kamailio
+ This package provides the app_lua module, an extension allowing to
+ execute embedded Lua applications within configuration file.
+
+Package: kamailio-mono-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: contains the app_mono module
+ 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.
+ .
+ This package provides the app_mono module, an extension allowing to
+ execute embedded Mono applications within configuration file.
+
+Package: kamailio-python-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, python-dev, kamailio (= ${binary:Version})
+Description: contains the app_python module
+ 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.
+ .
+ This package provides the app_python module, an extension allowing to
+ execute embedded Python applications within configuration file.
+
+Package: kamailio-redis-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: Redis database connectivity module for Kamailio
+ 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.
+ .
+ This package provides the Redis NOSQL database driver for Kamailio.
 
 
 Package: kamailio-mysql-modules
 Package: kamailio-mysql-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         mysql-client,
-         ${shlibs:Depends}
-Replaces: kamailio-mysql-module
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version}), mysql-client
 Description: MySQL database connectivity module for Kamailio
 Description: MySQL database connectivity module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -117,11 +202,10 @@ Description: MySQL database connectivity module for Kamailio
  This package provides the MySQL database driver for Kamailio.
  This package provides the MySQL database driver for Kamailio.
 
 
 Package: kamailio-postgres-modules
 Package: kamailio-postgres-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         postgresql-client,
-         ${shlibs:Depends}
-Replaces: kamailio-postgres-module
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version}), postgresql-client
 Description: PostgreSQL database connectivity module for Kamailio
 Description: PostgreSQL database connectivity module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -130,10 +214,10 @@ Description: PostgreSQL database connectivity module for Kamailio
  This package provides the PostgreSQL database driver for Kamailio.
  This package provides the PostgreSQL database driver for Kamailio.
 
 
 Package: kamailio-cpl-modules
 Package: kamailio-cpl-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-cpl-module
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: CPL module (CPL interpreter engine) for Kamailio
 Description: CPL module (CPL interpreter engine) for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -143,23 +227,24 @@ Description: CPL module (CPL interpreter engine) for Kamailio
  Kamailio, turning Kamailio into a CPL server (storage and interpreter).
  Kamailio, turning Kamailio into a CPL server (storage and interpreter).
 
 
 Package: kamailio-radius-modules
 Package: kamailio-radius-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Description: radius modules for Kamailio
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: RADIUS modules for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides a set of Radius modules for Kamailio, for
- authentication, peering, group membership and messages URIs checking
- against a Radius Server.
+ This package provides a set of RADIUS modules for Kamailio, for
+ authentication, peering, group membership and messages URIs checking against a
+ RADIUS server.
 
 
 Package: kamailio-unixodbc-modules
 Package: kamailio-unixodbc-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-unixodbc-module
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: unixODBC database connectivity module for Kamailio
 Description: unixODBC database connectivity module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -168,9 +253,10 @@ Description: unixODBC database connectivity module for Kamailio
  This package provides the unixODBC database driver for Kamailio.
  This package provides the unixODBC database driver for Kamailio.
 
 
 Package: kamailio-presence-modules
 Package: kamailio-presence-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: SIMPLE presence modules for Kamailio
 Description: SIMPLE presence modules for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -180,35 +266,11 @@ Description: SIMPLE presence modules for Kamailio
  server and presence user agent for RICH presence, registrar-based presence,
  server and presence user agent for RICH presence, registrar-based presence,
  external triggered presence and XCAP support.
  external triggered presence and XCAP support.
 
 
-Package: kamailio-xml-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-xml-module,
-          kamailio-xmlrpc-module
-Provides: kamailio-xmlrpc-modules
-Description: XML based extensions for Kamailio's Management Interface
- 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.
- .
- This package provides:
- - the XMLRPC transport implementations for Kamailio's
- Management and Control Interface.
- - xmlops module for XPath operations in configuration file
-
-Package: kamailio-xmlrpc-modules
-Architecture: any
-Depends: kamailio-xml-modules (= ${binary:Version})
-Description: Transitional package for kamailio-xml-modules
- Dummy package for transition handling
-
 Package: kamailio-perl-modules
 Package: kamailio-perl-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-perl-module
-Conflicts: kamailio-perl-module
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: Perl extensions and database driver for Kamailio
 Description: Perl extensions and database driver for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -218,11 +280,10 @@ Description: Perl extensions and database driver for Kamailio
  the perlvdb database driver for Kamailio.
  the perlvdb database driver for Kamailio.
 
 
 Package: kamailio-snmpstats-modules
 Package: kamailio-snmpstats-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         snmpd,
-         ${shlibs:Depends}
-Replaces: kamailio-snmpstats-module
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version}), snmpd
 Description: SNMP AgentX subagent module for Kamailio
 Description: SNMP AgentX subagent module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -231,11 +292,24 @@ Description: SNMP AgentX subagent module for Kamailio
  This package provides the snmpstats module for Kamailio. This module acts
  This package provides the snmpstats module for Kamailio. This module acts
  as an AgentX subagent which connects to a master agent.
  as an AgentX subagent which connects to a master agent.
 
 
+Package: kamailio-purple-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: Provides the purple module, a multi-protocol IM gateway
+ 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.
+ .
+ This package provides the purple module, a multi-protocol instant
+ messaging gateway module.
+
 Package: kamailio-xmpp-modules
 Package: kamailio-xmpp-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-xmpp-module
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: XMPP gateway module for Kamailio
 Description: XMPP gateway module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -243,12 +317,29 @@ Description: XMPP gateway module for Kamailio
  .
  .
  This package provides the SIP to XMPP IM translator module for Kamailio.
  This package provides the SIP to XMPP IM translator module for Kamailio.
 
 
+Package: kamailio-xml-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Replaces: kamailio-xml-module, kamailio-xmlrpc-module
+Provides: kamailio-xmlrpc-modules
+Description: XML based extensions for Kamailio's Management Interface
+ 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.
+ .
+ This package provides:
+ - the XMLRPC transport implementations for Kamailio's
+ Management and Control Interface.
+ - xmlops module for XPath operations in configuration file
+
 Package: kamailio-carrierroute-modules
 Package: kamailio-carrierroute-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-carrierroute-module
-Description: Carrierroute module for Kamailio
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: carrierroute module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
@@ -257,24 +348,38 @@ Description: Carrierroute module for Kamailio
  solution for routing, balancing and blacklisting.
  solution for routing, balancing and blacklisting.
 
 
 Package: kamailio-berkeley-modules
 Package: kamailio-berkeley-modules
-Architecture: any
-Depends: db4.6-util,
-         kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-berkeley-module
-Description: Berkeley Database module for Kamailio
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version}), db5.1-util
+Description: Berkeley database module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides the berkeley database module for Kamailio, a
+ This package provides the Berkeley database module for Kamailio, a
  high-performance embedded DB kernel. All database tables are stored
  high-performance embedded DB kernel. All database tables are stored
  in files, no additional server is necessary.
  in files, no additional server is necessary.
 
 
+Package: kamailio-berkeley-bin
+Architecture: linux-any
+Multi-Arch: foreign
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: Berkeley database module for Kamailio - helper program
+ 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.
+ .
+ This package provides helper modules for the Berkeley database module for
+ Kamailio, a high-performance embedded DB kernel. You should normally
+ install kamailio-berkeley-modules and not this package directly.
+
 Package: kamailio-ldap-modules
 Package: kamailio-ldap-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: LDAP modules for Kamailio
 Description: LDAP modules for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -284,11 +389,24 @@ Description: LDAP modules for Kamailio
  queries from the Kamailio config and storage of SIP account data in an LDAP
  queries from the Kamailio config and storage of SIP account data in an LDAP
  directory.
  directory.
 
 
+Package: kamailio-ims-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: IMS module for Kamailio
+ 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.
+ .
+ This package contains various Diameter interfaces and modules for Kamailio
+ to run as an IMS core.
+
 Package: kamailio-utils-modules
 Package: kamailio-utils-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-utils-module
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: Provides a set utility functions for Kamailio
 Description: Provides a set utility functions for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -297,125 +415,92 @@ Description: Provides a set utility functions for Kamailio
  Provides a set of utility functions for Kamailio, which are not related
  Provides a set of utility functions for Kamailio, which are not related
  to the server configuration.
  to the server configuration.
 
 
-Package: kamailio-purple-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-purple-module
-Description: Provides the purple module, a multi-protocol IM gateway
+Package: kamailio-sctp-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: sctp module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides the purple module, a multi-protocol instant
- messaging gateway module.
+ This package provides the sctp module for Kamailio.
 
 
-Package: kamailio-memcached-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-memcached-module
-Description: Provides the memcached module, an interface to the memcached server
+Package: kamailio-java-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends},
+         ${shlibs:Depends},
+         gjc-jre,
+         kamailio (= ${binary:Version})
+Description: contains the app_java module
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides the memcached module, an interface to the memcached
- server, a high-performance, distributed memory object caching system.
+ This package provides the app_java module, an extension allowing to
+ execute embedded Java applications within configuration file.
 
 
 Package: kamailio-tls-modules
 Package: kamailio-tls-modules
-Architecture: any
-Depends: kamailio (= ${Source-Version}),
-         ${shlibs:Depends}
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: contains the TLS kamailio transport module
 Description: contains the TLS kamailio transport module
- This has been split out of the main kamailio package, so that kamailio will not
- depend on openssl. This module will enable you to use the TLS transport.
-
-Package: kamailio-lua-modules
-Architecture: any
-Depends: kamailio (= ${Source-Version}),
-         ${shlibs:Depends}
-Description: contains the app_lua module
- 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.
- .
- This package provides the app_lua module, an extension allowing to
- execute embedded Lua applications within configuration file.
+ This has been split out of the main kamailio package, so that kamailio will
+ not depend on openssl. This module will enable you to use the TLS transport.
 
 
-Package: kamailio-mono-modules
-Architecture: any
-Depends: kamailio (= ${Source-Version}),
-         ${shlibs:Depends}
-Description: contains the app_mono module
+Package: kamailio-outbound-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: Outbound module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides the app_mono module, an extension allowing to
- execute embedded Mono applications within configuration file.
+ This package contains the module implementing SIP outbound extension.
 
 
-Package: kamailio-python-modules
-Architecture: any
-Depends: kamailio (= ${Source-Version}),
-         ${shlibs:Depends}
-Description: contains the app_python module
+Package: kamailio-websocket-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: Websocket module for kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides the app_python module, an extension allowing to
- execute embedded Python applications within configuration file.
+ This package contains the module implementing WebSocket transport layer.
 
 
-Package: kamailio-geoip-modules
-Architecture: any
+Package: kamailio-dnssec-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
 Depends: kamailio (= ${Source-Version}),
 Depends: kamailio (= ${Source-Version}),
          ${shlibs:Depends}
          ${shlibs:Depends}
-Description: contains the geoip module
- 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.
- .
- This package provides the geoip module, an extension allowing to
- use GeoIP API within configuration file.
-
-Package: kamailio-redis-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         libhiredis0.10,
-         ${shlibs:Depends}
-Description: Redis database connectivity module for Kamailio
- 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.
- .
- This package provides the Redis NOSQL database driver for Kamailio.
-
-Package: kamailio-sqlite-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         libsqlite3-0,
-         ${shlibs:Depends}
-Description: SQLite database connectivity module for Kamailio
+Description: contains the dnssec module
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides the SQLite database driver for Kamailio.
+ This package provides the dnssec module for Kamailio.
 
 
-Package: kamailio-json-modules
-Architecture: any
+Package: kamailio-autheph-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
 Depends: kamailio (= ${binary:Version}),
 Depends: kamailio (= ${binary:Version}),
-         libevent-1.4-2,
-         libjson0,
          ${shlibs:Depends}
          ${shlibs:Depends}
-Description: Json parser and jsonrpc modules for Kamailio
+Description: authentication using ephemeral credentials module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides json parser for Kamailio's configuration file
- and the JSON-RPC client over netstrings.
+ This package provides the ephemeral module for Kamailio.
 
 
 Package: kamailio-nth
 Package: kamailio-nth
 Architecture: any
 Architecture: any
@@ -438,80 +523,3 @@ Depends: binutils,
 Description: Kamailio - package for "nice to have" installation
 Description: Kamailio - package for "nice to have" installation
  This is a meta-package for easy installation various useful tools that may be
  This is a meta-package for easy installation various useful tools that may be
  handy on server with Kamailio installed.
  handy on server with Kamailio installed.
-
-Package: kamailio-ims-modules
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: Kamailio - IMS Modules
- 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.
- .
- This package contains various Diameter interfaces and modules for Kamailio
- to run as an IMS core.
-
-Package: kamailio-outbound-modules
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: Kamailio - Outbound Module
- 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.
- .
- This package contains the module implementing SIP outbound extension.
-
-Package: kamailio-websocket-modules
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: Kamailio - Websocket Module
- 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.
- .
- This package contains the module implementing WebSocket transport layer.
-
-Package: kamailio-autheph-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Description: authentication using ephemeral credentials module for Kamailio
- 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.
- .
- This package provides the ephemeral module for Kamailio.
-
-Package: kamailio-sctp-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Description: authentication using ephemeral credentials module for Kamailio
- 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.
- .
- This package provides the sctp module for Kamailio.
-
-Package: kamailio-java-modules
-Architecture: any
-Depends: kamailio (= ${Source-Version}),
-         gcj-jre,
-         ${shlibs:Depends}
-Description: contains the app_java module
- 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.
- .
- This package provides the app_java module, an extension allowing to
- execute embedded Java applications within configuration file.
-
-Package: kamailio-dnssec-modules
-Architecture: any
-Depends: kamailio (= ${Source-Version}),
-         ${shlibs:Depends}
-Description: contains the dnssec module
- 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.
- .
- This package provides the dnssec module for Kamailio.

+ 1 - 0
pkg/kamailio/deb/debian/kamailio-berkeley-bin.dirs

@@ -0,0 +1 @@
+usr/sbin

+ 4 - 3
pkg/kamailio/deb/debian/kamailio.README.Debian

@@ -1,5 +1,5 @@
 Kamailio for Debian
 Kamailio for Debian
-------------------
+-------------------
 
 
 * init script check for fork=no
 * init script check for fork=no
 -------------------------------
 -------------------------------
@@ -15,7 +15,7 @@ as a conffile.
 
 
 
 
 * Kamailio setup
 * Kamailio setup
----------------
+----------------
 
 
 To setup Kamailio, you need to:
 To setup Kamailio, you need to:
  - configure Kamailio properly to suit your needs
  - configure Kamailio properly to suit your needs
@@ -35,4 +35,5 @@ Set the DUMP_CORE parameter in /etc/default/kamailio to "yes" if you want to
 get a core dump in case Kamailio crashes. The debug symbols for Kamailio are
 get a core dump in case Kamailio crashes. The debug symbols for Kamailio are
 provided by the kamailio-dbg package.
 provided by the kamailio-dbg package.
 
 
--- Julien BLACHE <[email protected]>, Fri, 08 Sep 2006 14:43:21 +0200
+
+ -- Victor Seva <[email protected]>  Wed, 11 Dec 2013 16:07:11 +0100

+ 8 - 18
pkg/kamailio/deb/debian/kamailio.default

@@ -3,31 +3,21 @@
 #
 #
 
 
 # Set to yes to enable kamailio, once configured properly.
 # Set to yes to enable kamailio, once configured properly.
-RUN_KAMAILIO=no
+#RUN_KAMAILIO=yes
 
 
 # User to run as
 # User to run as
-USER=kamailio
+#USER=kamailio
 
 
 # Group to run as
 # Group to run as
-GROUP=kamailio
+#GROUP=kamailio
 
 
-# Amount of shared memory to allocate for the running Kamailio server (in Mb)
-SHM_MEMORY=64
-
-# Amount of private memory for each Kamailio process (in Mb)
-PKG_MEMORY=4
-
-# Switch to USER and GROUP by start-stop-daemon or by kamailio itself
-# - with recent kernels, changing user ID inside applicaton prevents
-#   dumping core files. If the value is 'yes', the suid is done by
-#   start-stop-daemon, otherwise it is done by kamailio itself
-SSD_SUID=no
+# Amount of memory to allocate for the running Kamailio server (in Mb)
+#MEMORY=64
 
 
 # Enable the server to leave a core file when it crashes.
 # Enable the server to leave a core file when it crashes.
 # Set this to 'yes' to enable Kamailio to leave a core file when it crashes
 # Set this to 'yes' to enable Kamailio to leave a core file when it crashes
 # or 'no' to disable this feature. This option is case sensitive and only
 # or 'no' to disable this feature. This option is case sensitive and only
 # accepts 'yes' and 'no' and only in lowercase letters.
 # accepts 'yes' and 'no' and only in lowercase letters.
-# On some systems (e.g. Ubuntu 6.10, Debian 4.0) it is necessary to specify
-# a directory for the core files to get a dump. Look into the kamailio
-# init file for an example configuration.
-DUMP_CORE=no
+# On some systems it is necessary to specify a directory for the core files
+# to get a dump. Look into the kamailio init file for an example configuration.
+#DUMP_CORE=yes

+ 100 - 179
pkg/kamailio/deb/debian/kamailio.init

@@ -3,238 +3,159 @@
 ### BEGIN INIT INFO
 ### BEGIN INIT INFO
 # Provides:          kamailio
 # Provides:          kamailio
 # Required-Start:    $syslog $network $local_fs $remote_fs $time
 # Required-Start:    $syslog $network $local_fs $remote_fs $time
+# Should-Start:      $named slapd mysql postgresql snmpd radiusd
+# Should-Stop:       $named slapd mysql postgresql snmpd radiusd
 # Required-Stop:     $syslog $network $local_fs $remote_fs
 # Required-Stop:     $syslog $network $local_fs $remote_fs
 # Default-Start:     2 3 4 5
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
 # Default-Stop:      0 1 6
-# Should-Start:      postgresql mysql radius
-# Should-Stop:       postgresql mysql radius
 # Short-Description: Start the Kamailio SIP proxy server
 # Short-Description: Start the Kamailio SIP proxy server
 # Description:       Start the Kamailio SIP proxy server
 # Description:       Start the Kamailio SIP proxy server
 ### END INIT INFO
 ### END INIT INFO
 
 
+. /lib/lsb/init-functions
 
 
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 DAEMON=/usr/sbin/kamailio
 DAEMON=/usr/sbin/kamailio
 NAME=kamailio
 NAME=kamailio
-DESC=Kamailio
+DESC="Kamailio SIP server"
 HOMEDIR=/var/run/kamailio
 HOMEDIR=/var/run/kamailio
 PIDFILE=$HOMEDIR/$NAME.pid
 PIDFILE=$HOMEDIR/$NAME.pid
 DEFAULTS=/etc/default/kamailio
 DEFAULTS=/etc/default/kamailio
-CFGFILE=/etc/kamailio/kamailio.cfg
 RUN_KAMAILIO=no
 RUN_KAMAILIO=no
-
+USER=kamailio
+GROUP=kamailio
+# Amount of memory to allocate for the running Kamailio server (in Mb)
+MEMORY=64
+DUMP_CORE=no
 
 
 # Do not start kamailio if fork=no is set in the config file
 # Do not start kamailio if fork=no is set in the config file
-# otherwise the boot process will just stop.
+# otherwise the boot process will just stop
 check_fork ()
 check_fork ()
 {
 {
-  if grep -q "^[[:space:]]*fork[[:space:]]*=[[:space:]]*no.*" $CFGFILE; then
-    echo "Not starting $DESC: fork=no specified in config file. Run /etc/init.d/kamailio debug instead."
-    exit 1
-  fi
+    if grep -q "^[[:space:]]*fork[[:space:]]*=[[:space:]]*no.*" /etc/kamailio/kamailio.cfg; then
+	log_failure_msg "Not starting $DESC: fork=no specified in config file; run /etc/init.d/kamailio debug instead"
+	exit 0
+    fi
 }
 }
 
 
-
 check_kamailio_config ()
 check_kamailio_config ()
 {
 {
-  # Check if kamailio configuration is valid before starting the server.
-  set +e
-  out=$($DAEMON -f $CFGFILE -M $PKG_MEMORY -c 2>&1 > /dev/null)
-  retcode=$?
-  set -e
-  if [ "$retcode" != '0' ]; then
-    echo "Not starting $DESC: invalid configuration file!"
-    echo -e "\n$out\n"
-    exit 1
-  fi
-}
-
-
-check_homedir ()
-{
-  # Create HOMEDIR directory in case it doesn't exist.
-  # Useful in Ubuntu as /var/run/ content is deleted in shutdown.
-  if [ ! -d $HOMEDIR ]; then
-    mkdir $HOMEDIR
-  fi
-
-  # Set the appropiate owner and group
-  chown ${USER}:${GROUP} $HOMEDIR
+	# Check if kamailio configuration is valid before starting the server
+	set +e
+	out=$($DAEMON -c 2>&1 > /dev/null)
+	retcode=$?
+	set -e
+	if [ "$retcode" != '0' ]; then
+	    log_failure_msg "Not starting $DESC: invalid configuration file!"
+	    log_failure_msg
+	    log_failure_msg "$out"
+	    log_faiulre_msg
+	    exit 1
+	fi
 }
 }
 
 
-
 create_radius_seqfile ()
 create_radius_seqfile ()
 {
 {
-  # Create a radius sequence file to be used by the radius client if
-  # radius accounting is enabled. This is needed to avoid any issue
-  # with the file not being writable if kamailio first starts as user
-  # root because DUMP_CORE is enabled and creates this file as user
-  # root and then later it switches back to user kamailio and cannot
-  # write to the file. If the file exists before kamailio starts, it
-  # won't change it's ownership and will be writable for both root
-  # and kamailio, no matter what options are chosen at install time
-  RADIUS_SEQ_FILE=$HOMEDIR/kamailio_radius.seq
-
-  if [ ! -f $RADIUS_SEQ_FILE ]; then
-      touch $RADIUS_SEQ_FILE
-  fi
-
-  chown ${USER}:${GROUP} $RADIUS_SEQ_FILE
-  chmod 660 $RADIUS_SEQ_FILE
+    # Create a radius sequence file to be used by the radius client if
+    # radius accounting is enabled. This is needed to avoid any issue
+    # with the file not being writable if kamailio first starts as user
+    # root because DUMP_CORE is enabled and creates this file as user
+    # root and then later it switches back to user kamailio and cannot
+    # write to the file. If the file exists before kamailio starts, it
+    # won't change it's ownership and will be writable for both root
+    # and kamailio, no matter what options are chosen at install time
+    RADIUS_SEQ_FILE=/var/run/kamailio/kamailio_radius.seq
+    if [ -d /var/run/kamailio ]; then
+	chown ${USER}:${GROUP} /var/run/kamailio
+
+	if [ ! -f $RADIUS_SEQ_FILE ]; then
+	    touch $RADIUS_SEQ_FILE
+	fi
+
+	chown ${USER}:${GROUP} $RADIUS_SEQ_FILE
+	chmod 660 $RADIUS_SEQ_FILE
+    fi
 }
 }
 
 
+test -f $DAEMON || exit 0
 
 
-if [ ! -f $DAEMON ]; then
-  echo "No $DESC daemon at $DAEMON."
-  case "$1" in
-  status)
-    # LSB - 4: program or service status is unknown.
-    exit 4
-    ;;
-  *)
-    # LSB - 5: program is not installed.
-    exit 5
-    ;;
-  esac
-fi
-
-
-# Load startup options if available.
+# Load startup options if available
 if [ -f $DEFAULTS ]; then
 if [ -f $DEFAULTS ]; then
-  . $DEFAULTS || true
+   . $DEFAULTS || true
 fi
 fi
 
 
-
 if [ "$RUN_KAMAILIO" != "yes" ]; then
 if [ "$RUN_KAMAILIO" != "yes" ]; then
-  echo "$DESC not yet configured. Edit $DEFAULTS first."
-  exit 0
+    log_failure_msg "Kamailio not yet configured. Edit /etc/default/kamailio first."
+    exit 0
 fi
 fi
 
 
-
 set -e
 set -e
 
 
-
-SHM_MEMORY=$((`echo $SHM_MEMORY | sed -e 's/[^0-9]//g'`))
-PKG_MEMORY=$((`echo $PKG_MEMORY | sed -e 's/[^0-9]//g'`))
-[ $SHM_MEMORY -le 0 ] && SHM_MEMORY=64
-[ $PKG_MEMORY -le 0 ] && PKG_MEMORY=4
+MEMORY=$((`echo $MEMORY | sed -e 's/[^0-9]//g'`))
 [ -z "$USER" ]  && USER=kamailio
 [ -z "$USER" ]  && USER=kamailio
 [ -z "$GROUP" ] && GROUP=kamailio
 [ -z "$GROUP" ] && GROUP=kamailio
-
+[ $MEMORY -le 0 ] && MEMORY=32
 
 
 if test "$DUMP_CORE" = "yes" ; then
 if test "$DUMP_CORE" = "yes" ; then
-  # set proper ulimit.
-  ulimit -c unlimited
-
-  # directory for the core dump files.
-  # COREDIR=/tmp/corefiles
-  # [ -d $COREDIR ] || mkdir $COREDIR
-  # chmod 777 $COREDIR
-  # echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
+    # set proper ulimit
+    ulimit -c unlimited
+    
+    # directory for the core dump files
+    # COREDIR=/home/corefiles
+    # [ -d $COREDIR ] || mkdir $COREDIR
+    # chmod 777 $COREDIR
+    # echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
 fi
 fi
 
 
-
-if [ "$SSD_SUID" != "yes" ]; then
-  OPTIONS="-f $CFGFILE -P $PIDFILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP"
-  SSDOPTS=""
-else
-  OPTIONS="-f $CFGFILE -P $PIDFILE -m $SHM_MEMORY -M $PKG_MEMORY"
-  SSDOPTS="--chuid $USER:$GROUP"
+# /var/run can be a tmpfs
+if [ ! -d $HOMEDIR ]; then
+    mkdir -p $HOMEDIR
 fi
 fi
 
 
-
-start_kamailio_daemon ()
-{
-  start-stop-daemon --start --quiet --pidfile $PIDFILE $SSDOPTS \
-    --exec $DAEMON -- $OPTIONS
-  res=$?
-
-  echo -n "$NAME "
-  if [ $res -eq 0 ] ; then
-    echo "started."
-    exit 0
-  else
-    if [ ! -r "$PIDFILE" ]; then
-      echo "error, failed to start."
-      exit 1
-    elif read pid < "$PIDFILE" && ps -p "$pid" > /dev/null 2>&1; then
-      echo "already running."
-      exit 0
-    else
-      echo "error, failed to start ($PIDFILE exists)."
-      exit 1
-    fi
-  fi
-}
-
+OPTIONS="-P $PIDFILE -m $MEMORY -u $USER -g $GROUP"
 
 
 case "$1" in
 case "$1" in
   start|debug)
   start|debug)
-    check_kamailio_config
-    check_homedir
-    create_radius_seqfile
-
-    if [ "$1" != "debug" ]; then
-      check_fork
-    fi
-
-    echo "Starting $DESC:"
-    set +e
-    start_kamailio_daemon
-    ;;
-
+	check_kamailio_config
+	create_radius_seqfile
+
+	if [ "$1" != "debug" ]; then
+	    check_fork
+	fi
+
+	log_daemon_msg "Starting $DESC: $NAME"
+	start-stop-daemon --start --quiet --pidfile $PIDFILE \
+		--exec $DAEMON -- $OPTIONS || log_failure_msg " already running"
+	log_end_msg 0
+	;;
   stop)
   stop)
-    echo -n "Stopping $DESC: $NAME "
-    set +e
-    start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
-      --exec $DAEMON
-
-    if [ $? -eq 0 ] ; then
-      echo "stopped."
-      exit 0
-    else
-      echo "failed to stop."
-      exit 1
-    fi
-    ;;
-    
+	log_daemon_msg "Stopping $DESC: $NAME"
+	start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
+		--exec $DAEMON
+	log_end_msg 0
+	;;
   restart|force-reload)
   restart|force-reload)
-    check_kamailio_config
-    check_homedir
-    create_radius_seqfile
-
-    echo "Restarting $DESC:"
-    set +e
-    start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE --retry=5 \
-      --exec $DAEMON
-    if [ $? -ne 0 ] ; then
-      echo "$NAME failed to stop."
-      exit 1
-    fi
-    start_kamailio_daemon
-    ;;
-
+	check_kamailio_config
+	create_radius_seqfile
+
+	log_daemon_msg "Restarting $DESC: $NAME"
+	start-stop-daemon --oknodo --stop --quiet --pidfile \
+		$PIDFILE --exec $DAEMON
+	sleep 1
+	start-stop-daemon --start --quiet --pidfile \
+		$PIDFILE --exec $DAEMON  -- $OPTIONS
+	log_end_msg 0
+	;;
   status)
   status)
-    echo -n "Status of $DESC: $NAME "
-    if [ ! -r "$PIDFILE" ]; then
-      echo "is not running."
-      exit 3
-    fi
-    if read pid < "$PIDFILE" && ps -p "$pid" > /dev/null 2>&1; then
-      echo "is running."
-      exit 0
-    else
-      echo "is not running but $PIDFILE exists."
-      exit 1
-    fi
-    ;;
-
+	log_daemon_msg "Status of $DESC: "
+	
+	status_of_porc "$PIDFILE" $NAME $NAME
+	;;
   *)
   *)
-    N=/etc/init.d/$NAME
-    echo "Usage: $N {start|stop|restart|force-reload|debug|status}" >&2
-    exit 1
-    ;;
+	N=/etc/init.d/$NAME
+	echo "Usage: $N {start|stop|restart|force-reload|status|debug}" >&2
+	exit 1
+	;;
 esac
 esac
 
 
-
 exit 0
 exit 0

+ 2 - 26
pkg/kamailio/deb/debian/kamailio.postinst

@@ -1,36 +1,12 @@
 #! /bin/sh
 #! /bin/sh
-#
-# $Id$
-
-PKG=kamailio
-DEFAULTS=/etc/default/kamailio
-HOMEDIR=/var/run/kamailio
 
 
 set -e
 set -e
 
 
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-#
-# quoting from the policy:
-#     Any necessary prompting should almost always be confined to the
-#     post-installation script, and should be protected with a conditional
-#     so that unnecessary prompting doesn't happen if a package's
-#     installation fails and the `postinst' is called with `abort-upgrade',
-#     `abort-remove' or `abort-deconfigure'.
-
 case "$1" in
 case "$1" in
     configure)
     configure)
         adduser --quiet --system --group --disabled-password \
         adduser --quiet --system --group --disabled-password \
-                --shell /bin/false --gecos "Kamailio" \
-                --home $HOMEDIR kamailio || true
+                --shell /bin/false --gecos "Kamailio SIP Server" \
+                --home /var/run/kamailio kamailio || true
 
 
         ;;
         ;;
 
 

+ 53 - 86
pkg/kamailio/deb/debian/rules

@@ -1,64 +1,52 @@
 #!/usr/bin/make -f
 #!/usr/bin/make -f
 # Sample debian/rules that uses debhelper.
 # Sample debian/rules that uses debhelper.
 # GNU copyright 1997 to 1999 by Joey Hess.
 # GNU copyright 1997 to 1999 by Joey Hess.
-#
-# $Id$
-#
-# History:
-# --------
-#  2009-07-08  updated for sip-router (andrei)
-#  2009-12-10  updated for kamailio 3.0 (daniel)
 
 
+DEBVERSION:=$(shell head -n 1 debian/changelog \
+                    | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION:=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
+
+FILENAME := kamailio_$(UPVERSION).orig.tar.gz
+URL := http://www.kamailio.org/pub/kamailio/$(UPVERSION)/src/kamailio-$(UPVERSION)_src.tar.gz
+
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
 
 
 # Uncomment this to turn on verbose mode.
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 #export DH_VERBOSE=1
 
 
-# This is the debhelper compatibility version to use.
-# export DH_COMPAT=4
-#  -- already set in compat
-export DEB_BUILD_OPTIONS:="$(DEB_BUILD_OPTIONS) debug"
-
 # java stuff using libgcj12
 # java stuff using libgcj12
 export JAVA_HOME=/usr/lib/jvm/java-gcj-4.6
 export JAVA_HOME=/usr/lib/jvm/java-gcj-4.6
 
 
 # modules not in the "main" kamailio package
 # modules not in the "main" kamailio package
-EXCLUDED_MODULES= 
+EXCLUDED_MODULES=
 
 
 # extra modules to skip, because they are not compilable now
 # extra modules to skip, because they are not compilable now
 # - regardless if they go to the main kamailio package or to some module package,
 # - regardless if they go to the main kamailio package or to some module package,
 # they will be excluded from compile and install of all
 # they will be excluded from compile and install of all
 EXTRA_EXCLUDED_MODULES=bdb dbtext oracle pa iptrtpproxy
 EXTRA_EXCLUDED_MODULES=bdb dbtext oracle pa iptrtpproxy
-#EXTRA_EXCLUDED_MODULES=
-
-# possible module directories that can appear in MODULES_SP
-# (only used for deducing a module name)
-MDIRS=modules
-
-# modules packaged in separate packages (complete with full modules_* path)
-# with the package name: kamailio-$(module_name)-module
-MODULES_SP=
 
 
 # module groups that are packaged in seperate packages
 # module groups that are packaged in seperate packages
 # (with the name kamailio-$(group_name)-modules)
 # (with the name kamailio-$(group_name)-modules)
 # Note: the order is important (should be in dependency order, the one
 # Note: the order is important (should be in dependency order, the one
 # on which other depend first)
 # on which other depend first)
 PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
 PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
-			   ldap xml perl utils purple memcached tls \
-			   snmpstats carrierroute xmpp cpl lua python geoip \
-			   redis sqlite json mono ims outbound websocket \
-			   autheph sctp java dnssec
+			   ldap xml perl utils lua memcached \
+			   snmpstats carrierroute xmpp cpl redis python geoip\
+			   sqlite json mono ims sctp java \
+			   purple tls outbound websocket autheph dnssec
 
 
 # name of libdir in the path for libraries (e.g., lib for 32b, lib64 for 64b)
 # name of libdir in the path for libraries (e.g., lib for 32b, lib64 for 64b)
-LIBDIR ?= lib
+LIBDIR ?= lib/$(DEB_HOST_MULTIARCH)
 
 
 # directories with possible duplicate libraries (that should be deleted
 # directories with possible duplicate libraries (that should be deleted
 # from current module* packages)
 # from current module* packages)
 DUP_LIBS_DIRS=$(CURDIR)/debian/kamailio/usr/$(LIBDIR)/kamailio \
 DUP_LIBS_DIRS=$(CURDIR)/debian/kamailio/usr/$(LIBDIR)/kamailio \
 			$(CURDIR)/debian/kamailio-db-modules/usr/$(LIBDIR)/kamailio
 			$(CURDIR)/debian/kamailio-db-modules/usr/$(LIBDIR)/kamailio
 
 
-# modules names out of modules sp
-MODULES_SP_NAMES=$(filter-out $(MDIRS),$(subst /, ,$(MODULES_SP)))
-
 # "function" to get package short name out of a dir/module_name
 # "function" to get package short name out of a dir/module_name
 # it also transforms db_foo into foo
 # it also transforms db_foo into foo
 mod_name=$(subst db_,,$(lastword $(subst /, ,$(1))))
 mod_name=$(subst db_,,$(lastword $(subst /, ,$(1))))
@@ -71,53 +59,25 @@ define PACKAGE_GRP_BUILD_template
 endef
 endef
 
 
 
 
-define PACKAGE_MODULE_BUILD_template
-	# package all the modules MODULES_SP in separate packages
-	$(foreach mod,$(MODULES_SP),\
-		$(MAKE) modules modules="$(mod)"
-	)
-endef
-
-
 define PACKAGE_GRP_INSTALL_template
 define PACKAGE_GRP_INSTALL_template
 	$(foreach grp,$(PACKAGE_GROUPS),\
 	$(foreach grp,$(PACKAGE_GROUPS),\
-		$(MAKE) install-modules-all group_include="k$(grp)" \
+		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
 		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		doc-dir=share/doc/kamailio-$(grp)-modules
 		doc-dir=share/doc/kamailio-$(grp)-modules
 		# eliminate duplicate libs
 		# eliminate duplicate libs
 		-for d in $(DUP_LIBS_DIRS); do \
 		-for d in $(DUP_LIBS_DIRS); do \
 			test "$$d" != "$(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio" &&\
 			test "$$d" != "$(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio" &&\
-			for r in $$d/lib*; do \
-				if [ "$$r" != "$$d/lib*" ]; then \
-					echo "removing $(grp) lib `basename $$r` present also in $$d";\
-					rm -f $(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
-				fi \
+			for r in `find $$d -name 'lib*'|xargs`; do \
+				echo "removing $(grp) lib `basename $$r` present also in $$d";\
+				rm -f $(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
 			done ; \
 			done ; \
 		done
 		done
+		find $(CURDIR)/debian/kamailio-$(grp)-modules -depth -empty -type d -exec rmdir {} \;
 	)
 	)
 endef
 endef
 
 
 
 
-define PACKAGE_MODULE_INSTALL_template
-	$(foreach mod,$(MODULES_SP),
-		$(MAKE) install-modules-all modules="$(mod)" \
-				modules_s="" modules_k="" \
-				basedir=$(CURDIR)/debian/kamailio-$(call mod_name,$(mod))-module \
-				doc-dir=share/doc/kamailio-$(call mod_name,$(mod))-module
-		# eliminate duplicate libs
-		-for d in $(DUP_LIBS_DIRS); do \
-			test "$$d" != "$(CURDIR)/debian/kamailio-$(call mod_name,$(mod))-module/usr/$(LIBDIR)/kamailio" &&\
-			for r in $$d/lib*; do \
-				if [ "$$r" != "$$d/lib*" ]; then \
-					echo "removing $(call mod_name, $(mod)) lib `basename $$r` present also in $$d";\
-					rm -f $(CURDIR)/debian/kamailio-$(call mod_name,$(mod))-module/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
-				fi \
-			done ; \
-		done
-	)
-endef
-
 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
 	CFLAGS += -g
 	CFLAGS += -g
 endif
 endif
@@ -125,6 +85,11 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 	INSTALL_PROGRAM += -s
 	INSTALL_PROGRAM += -s
 endif
 endif
 
 
+# CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
+# LDFLAGS -> LD_EXTRA_OPTS
+CUSTOM_BUILDFLAGS:=$(shell dpkg-buildflags --export=configure| \
+sed -e 's/" CPPFLAGS="/ /' -e 's/CFLAGS/CC_EXTRA_OPTS/g' -e 's/LDFLAGS/LD_EXTRA_OPTS/g')
+
 configure: configure-stamp
 configure: configure-stamp
 configure-stamp:
 configure-stamp:
 	dh_testdir
 	dh_testdir
@@ -133,17 +98,19 @@ configure-stamp:
 			cfg_target=/etc/kamailio/ \
 			cfg_target=/etc/kamailio/ \
 			basedir=$(CURDIR)/debian/kamailio \
 			basedir=$(CURDIR)/debian/kamailio \
 			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
 			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
+			$(CUSTOM_BUILDFLAGS) \
 			group_include="kstandard"
 			group_include="kstandard"
 
 
 	touch configure-stamp
 	touch configure-stamp
 
 
 
 
 build: build-stamp
 build: build-stamp
-
-build-stamp: configure-stamp 
+build-arch: build-stamp
+build-indep: build-stamp
+build-stamp: configure-stamp
 	dh_testdir
 	dh_testdir
 	# Add here commands to compile the package.
 	# Add here commands to compile the package.
-	$(MAKE) all
+	$(MAKE) all quiet=verbose
 	# make groups
 	# make groups
 	$(call PACKAGE_GRP_BUILD_template)
 	$(call PACKAGE_GRP_BUILD_template)
 	# make single-module packages
 	# make single-module packages
@@ -155,57 +122,47 @@ clean:
 	dh_testroot
 	dh_testroot
 	rm -f build-stamp configure-stamp
 	rm -f build-stamp configure-stamp
 	# Add here commands to clean up after the build process.
 	# Add here commands to clean up after the build process.
-	-$(MAKE) maintainer-clean
+	$(MAKE) maintainer-clean
 	dh_clean
 	dh_clean
 
 
 install: build
 install: build
 	dh_testdir
 	dh_testdir
 	dh_testroot
 	dh_testroot
-	dh_clean -k
+	dh_prep
 	dh_installdirs
 	dh_installdirs
 	# Add here commands to install the package into debian/kamailio
 	# Add here commands to install the package into debian/kamailio
-	$(MAKE) install group_include="kstandard"
-	# fix etc/kamailio dir location -- not needed -- andrei
-	# mv -f $(CURDIR)/debian/kamailio/usr/etc $(CURDIR)/debian/kamailio
+	$(MAKE) install LIBDIR=$(LIBDIR) group_include="kstandard"
 	# make group packages
 	# make group packages
 	$(call PACKAGE_GRP_INSTALL_template)
 	$(call PACKAGE_GRP_INSTALL_template)
-	# make single module packages
-	$(call PACKAGE_MODULE_INSTALL_template)
+	mv $(CURDIR)/debian/kamailio-berkeley-modules/usr/sbin/kambdb_recover \
+		$(CURDIR)/debian/kamailio-berkeley-bin/usr/sbin/kambdb_recover
 	# install /etc/default/kamailio file
 	# install /etc/default/kamailio file
 	mkdir -p $(CURDIR)/debian/kamailio/etc/default
 	mkdir -p $(CURDIR)/debian/kamailio/etc/default
 	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
 	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
-	#dh_movefiles
-
 
 
 
 
 # This single target is used to build all the packages, all at once, or
 # This single target is used to build all the packages, all at once, or
 # one at a time. So keep in mind: any options passed to commands here will
 # one at a time. So keep in mind: any options passed to commands here will
 # affect _all_ packages. Anything you want to only affect one package
 # affect _all_ packages. Anything you want to only affect one package
 # should be put in another target, such as the install target.
 # should be put in another target, such as the install target.
-binary-common: 
+binary-common:
 	dh_testdir
 	dh_testdir
 	dh_testroot
 	dh_testroot
-	dh_installdebconf	
+	dh_installdebconf
 	dh_installdocs
 	dh_installdocs
 	dh_installexamples
 	dh_installexamples
 	dh_installmenu
 	dh_installmenu
-#	dh_installlogrotate
-#	dh_installemacsen
-#	dh_installpam
-#	dh_installmime
-	dh_installinit  -- defaults 23
+	dh_installinit -pkamailio -- defaults 23
 	dh_installcron
 	dh_installcron
 	dh_installman
 	dh_installman
 	dh_installinfo
 	dh_installinfo
-#	dh_undocumented
-	dh_installchangelogs ChangeLog 
+	dh_installchangelogs ChangeLog
 	dh_link
 	dh_link
 	dh_strip --dbg-package=kamailio-dbg
 	dh_strip --dbg-package=kamailio-dbg
-	dh_compress 
+	dh_compress
 	dh_fixperms
 	dh_fixperms
 	dh_makeshlibs
 	dh_makeshlibs
 	dh_installdeb
 	dh_installdeb
-#	dh_perl
 	dh_shlibdeps
 	dh_shlibdeps
 	dh_gencontrol
 	dh_gencontrol
 	dh_md5sums
 	dh_md5sums
@@ -226,6 +183,16 @@ binary-arch: build install
 binary-%: build install
 binary-%: build install
 	$(MAKE) -f debian/rules binary-common DH_OPTIONS=-p$*
 	$(MAKE) -f debian/rules binary-common DH_OPTIONS=-p$*
 
 
+print-version:
+	@@echo "Debian version:          $(DEBVERSION)"
+	@@echo "Upstream version:        $(UPVERSION)"
+
+get-orig-source:
+	@@dh_testdir
+	@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
+	@@echo Downloading $(FILENAME) from $(URL) ...
+	@@wget -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL)
+
 binary: binary-indep binary-arch
 binary: binary-indep binary-arch
 .PHONY: build clean binary-indep binary-arch binary install configure
 .PHONY: build clean binary-indep binary-arch binary install configure
 
 

+ 1 - 0
pkg/kamailio/deb/debian/source/format

@@ -0,0 +1 @@
+3.0 (native)

+ 3 - 0
pkg/kamailio/deb/debian/watch

@@ -0,0 +1,3 @@
+version=3
+opts=dversionmangle=s/\~svn([\d]+)//; \
+http://www.kamailio.org/pub/kamailio/([\d.]+)/src/kamailio-([\d.]+)_src\.tar\.gz

+ 1 - 1
pkg/kamailio/deb/jessie/compat

@@ -1 +1 @@
-5
+9

+ 331 - 323
pkg/kamailio/deb/jessie/control

@@ -1,80 +1,58 @@
 Source: kamailio
 Source: kamailio
 Section: net
 Section: net
 Priority: optional
 Priority: optional
-Maintainer: Jon Bonilla <[email protected]>
+Maintainer: Debian VoIP Team <[email protected]>
+Uploaders: Victor Seva <[email protected]>, Tzafrir Cohen <[email protected]>
 Build-Depends: bison,
 Build-Depends: bison,
-               debhelper (>= 5),
-               docbook-xml,
-               dpatch,
-               dpkg-dev (>= 1.13.19),
-               flex,
-               libconfuse-dev,
-               libcurl3-openssl-dev,
-               libdb-dev (>= 4.6.19),
-               libevent-dev,
-               libexpat1-dev,
-               libgcj12-dev,
-               libgeoip-dev (>= 1.4.5),
-               libhiredis-dev (>= 0.10.0),
-               libjson0-dev,
-               libldap2-dev,
-               liblua5.1-0-dev,
-               libmemcached-dev,
-               libmono-2.0-dev,
-               libmysqlclient-dev,
-               libncurses5-dev,
-               libpcre3-dev,
-               libperl-dev,
-               libpq-dev,
-               libpurple-dev,
-               libradiusclient-ng-dev,
-               libreadline-dev,
-               libsasl2-dev,
-               libsctp-dev,
-               libsnmp-dev,
-               libsqlite3-dev,
-               libssl-dev,
-               libxml2-dev,
-               libxmlrpc-c3-dev,
-               libunistring-dev,
-               libval-dev,
-               openssl,
-               python,
-               python-dev,
-               unixodbc-dev,
-               xsltproc,
-               zlib1g-dev
-Standards-Version: 3.9.3
+    debhelper (>= 9),
+    docbook-xml,
+    dpkg-dev (>= 1.16.1.1),
+    flex,
+    libconfuse-dev,
+    libcurl4-openssl-dev,
+    libdb-dev (>= 4.6.19),
+    libevent-dev,
+    libexpat1-dev,
+    libgcj12-dev,
+    libgeoip-dev (>= 1.4.5),
+    libhiredis-dev (>= 0.10.0),
+    libjson0-dev,
+    libldap2-dev,
+    liblua5.1-0-dev,
+    libmemcached-dev,
+    libmono-2.0-dev,
+    libmysqlclient-dev,
+    libncurses5-dev,
+    libpcre3-dev,
+    libperl-dev,
+    libpq-dev,
+    libpurple-dev,
+    libradiusclient-ng-dev,
+    libreadline-dev,
+    libsasl2-dev,
+    libsctp-dev,
+    libsnmp-dev,
+    libsqlite3-dev,
+    libunistring-dev,
+    libval-dev,
+    libxml2-dev,
+    libxmlrpc-c3-dev,
+    openssl,
+    python,
+    python-dev,
+    unixodbc-dev,
+    xsltproc
+Standards-Version: 3.9.4
 Homepage: http://www.kamailio.org/
 Homepage: http://www.kamailio.org/
+Vcs-git: git://anonscm.debian.org/pkg-voip/kamailio.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-voip/kamailio.git
 
 
 Package: kamailio
 Package: kamailio
-Architecture: any
-Depends: adduser,
-         ${misc:Depends},
-         ${shlibs:Depends}
-Conflicts: kamailio-regex-modules
-Suggests: kamailio-autheph-modules,
-          kamailio-berkeley-modules,
-          kamailio-carrierroute-modules,
-          kamailio-cpl-modules,
-          kamailio-dbg,
-          kamailio-dnssec-modules,
-          kamailio-java-modules,
-          kamailio-ldap-modules,
-          kamailio-lua-modules,
-          kamailio-mono-modules,
-          kamailio-mysql-modules,
-          kamailio-perl-modules,
-          kamailio-postgres-modules,
-          kamailio-presence-modules,
-          kamailio-python-modules,
-          kamailio-radius-modules,
-          kamailio-sctp-modules,
-          kamailio-snmpstats-modules,
-          kamailio-tls-modules,
-          kamailio-unixodbc-modules,
-          kamailio-xml-modules,
-          kamailio-xmpp-modules
+Architecture: linux-any
+Multi-Arch: foreign
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, python, adduser
+Suggests: kamailio-mysql-modules, kamailio-postgres-modules, kamailio-unixodbc-modules, kamailio-cpl-modules, kamailio-radius-modules, kamailio-presence-modules, kamailio-xml-modules, kamailio-perl-modules, kamailio-snmpstats-modules, kamailio-xmpp-modules, kamailio-carrierroute-modules, kamailio-berkeley-modules, kamailio-ldap-modules, kamailio-python-modules, kamailio-redis-modules, kamailio-lua-modules, kamailio-mono-modules
 Description: very fast and configurable SIP proxy
 Description: very fast and configurable SIP proxy
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -84,31 +62,138 @@ Description: very fast and configurable SIP proxy
  behaviour. Its modular architecture allows only required functionality to be
  behaviour. Its modular architecture allows only required functionality to be
  loaded.
  loaded.
  .
  .
- Among others, the following modules are available: Digest Authentication, CPL
- scripts, Instant Messaging, MySQL support, Presence Agent, Radius
- Authentication, Record Routing, SMS Gateway, Jabber/XMPP Gateway, Transaction
- Module, Registrar and User Location, XMLRPC Interface.
+ Among others, the following modules are available: digest authentication, CPL
+ scripts, instant messaging, MySQL support, presence agent, RADIUS
+ authentication, record routing, SMS gateway, Jabber/XMPP gateway, transaction
+ module, registrar and user location, XML-RPC interface.
  .
  .
  This package contains the main Kamailio binary along with the principal modules
  This package contains the main Kamailio binary along with the principal modules
  and support binaries.
  and support binaries.
 
 
 Package: kamailio-dbg
 Package: kamailio-dbg
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Description: Debugging symbols for Kamailio SIP proxy
+Priority: extra
+Section: debug
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, kamailio (= ${binary:Version})
+Description: very fast and configurable SIP proxy [debug symbols]
+ 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.
+ .
+ This package contains the debugging symbols for the Kamailio binaries and
+ modules. You only need to install it if you need to debug Kamailio.
+
+Package: kamailio-geoip-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: contains the geoip module
+ 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.
+ .
+ This package provides the geoip module, an extension allowing to
+ use GeoIP API within configuration file.
+
+Package: kamailio-sqlite-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Recommends: sqlite3
+Description: SQLite database connectivity module for Kamailio
+ 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.
+ .
+ This package provides the SQLite database driver for Kamailio.
+
+Package: kamailio-json-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: Json parser and jsonrpc modules for Kamailio
+ 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.
+ .
+ This package provides json parser for Kamailio's configuration file
+ and the JSON-RPC client over netstrings.
+
+Package: kamailio-memcached-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Replaces: kamailio-memcached-module
+Description: Provides the memcached module, an interface to the memcached server
+ 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.
+ .
+ This package provides the memcached module, an interface to the memcached
+ server, a high-performance, distributed memory object caching system.
+
+Package: kamailio-lua-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: contains the app_lua module
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides gdb debugging symbols  for Kamailio
+ This package provides the app_lua module, an extension allowing to
+ execute embedded Lua applications within configuration file.
+
+Package: kamailio-mono-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: contains the app_mono module
+ 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.
+ .
+ This package provides the app_mono module, an extension allowing to
+ execute embedded Mono applications within configuration file.
+
+Package: kamailio-python-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, python-dev, kamailio (= ${binary:Version})
+Description: contains the app_python module
+ 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.
+ .
+ This package provides the app_python module, an extension allowing to
+ execute embedded Python applications within configuration file.
+
+Package: kamailio-redis-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: Redis database connectivity module for Kamailio
+ 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.
+ .
+ This package provides the Redis NOSQL database driver for Kamailio.
 
 
 Package: kamailio-mysql-modules
 Package: kamailio-mysql-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         mysql-client,
-         ${shlibs:Depends}
-Replaces: kamailio-mysql-module
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version}), mysql-client
 Description: MySQL database connectivity module for Kamailio
 Description: MySQL database connectivity module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -117,11 +202,10 @@ Description: MySQL database connectivity module for Kamailio
  This package provides the MySQL database driver for Kamailio.
  This package provides the MySQL database driver for Kamailio.
 
 
 Package: kamailio-postgres-modules
 Package: kamailio-postgres-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         postgresql-client,
-         ${shlibs:Depends}
-Replaces: kamailio-postgres-module
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version}), postgresql-client
 Description: PostgreSQL database connectivity module for Kamailio
 Description: PostgreSQL database connectivity module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -130,10 +214,10 @@ Description: PostgreSQL database connectivity module for Kamailio
  This package provides the PostgreSQL database driver for Kamailio.
  This package provides the PostgreSQL database driver for Kamailio.
 
 
 Package: kamailio-cpl-modules
 Package: kamailio-cpl-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-cpl-module
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: CPL module (CPL interpreter engine) for Kamailio
 Description: CPL module (CPL interpreter engine) for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -143,23 +227,24 @@ Description: CPL module (CPL interpreter engine) for Kamailio
  Kamailio, turning Kamailio into a CPL server (storage and interpreter).
  Kamailio, turning Kamailio into a CPL server (storage and interpreter).
 
 
 Package: kamailio-radius-modules
 Package: kamailio-radius-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Description: radius modules for Kamailio
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: RADIUS modules for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides a set of Radius modules for Kamailio, for
- authentication, peering, group membership and messages URIs checking
- against a Radius Server.
+ This package provides a set of RADIUS modules for Kamailio, for
+ authentication, peering, group membership and messages URIs checking against a
+ RADIUS server.
 
 
 Package: kamailio-unixodbc-modules
 Package: kamailio-unixodbc-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-unixodbc-module
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: unixODBC database connectivity module for Kamailio
 Description: unixODBC database connectivity module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -168,9 +253,10 @@ Description: unixODBC database connectivity module for Kamailio
  This package provides the unixODBC database driver for Kamailio.
  This package provides the unixODBC database driver for Kamailio.
 
 
 Package: kamailio-presence-modules
 Package: kamailio-presence-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: SIMPLE presence modules for Kamailio
 Description: SIMPLE presence modules for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -180,35 +266,11 @@ Description: SIMPLE presence modules for Kamailio
  server and presence user agent for RICH presence, registrar-based presence,
  server and presence user agent for RICH presence, registrar-based presence,
  external triggered presence and XCAP support.
  external triggered presence and XCAP support.
 
 
-Package: kamailio-xml-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-xml-module,
-          kamailio-xmlrpc-module
-Provides: kamailio-xmlrpc-modules
-Description: XML based extensions for Kamailio's Management Interface
- 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.
- .
- This package provides:
- - the XMLRPC transport implementations for Kamailio's
- Management and Control Interface.
- - xmlops module for XPath operations in configuration file
-
-Package: kamailio-xmlrpc-modules
-Architecture: any
-Depends: kamailio-xml-modules (= ${binary:Version})
-Description: Transitional package for kamailio-xml-modules
- Dummy package for transition handling
-
 Package: kamailio-perl-modules
 Package: kamailio-perl-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-perl-module
-Conflicts: kamailio-perl-module
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: Perl extensions and database driver for Kamailio
 Description: Perl extensions and database driver for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -218,11 +280,10 @@ Description: Perl extensions and database driver for Kamailio
  the perlvdb database driver for Kamailio.
  the perlvdb database driver for Kamailio.
 
 
 Package: kamailio-snmpstats-modules
 Package: kamailio-snmpstats-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         snmpd,
-         ${shlibs:Depends}
-Replaces: kamailio-snmpstats-module
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version}), snmpd
 Description: SNMP AgentX subagent module for Kamailio
 Description: SNMP AgentX subagent module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -231,11 +292,24 @@ Description: SNMP AgentX subagent module for Kamailio
  This package provides the snmpstats module for Kamailio. This module acts
  This package provides the snmpstats module for Kamailio. This module acts
  as an AgentX subagent which connects to a master agent.
  as an AgentX subagent which connects to a master agent.
 
 
+Package: kamailio-purple-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: Provides the purple module, a multi-protocol IM gateway
+ 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.
+ .
+ This package provides the purple module, a multi-protocol instant
+ messaging gateway module.
+
 Package: kamailio-xmpp-modules
 Package: kamailio-xmpp-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-xmpp-module
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: XMPP gateway module for Kamailio
 Description: XMPP gateway module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -243,12 +317,29 @@ Description: XMPP gateway module for Kamailio
  .
  .
  This package provides the SIP to XMPP IM translator module for Kamailio.
  This package provides the SIP to XMPP IM translator module for Kamailio.
 
 
+Package: kamailio-xml-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Replaces: kamailio-xml-module, kamailio-xmlrpc-module
+Provides: kamailio-xmlrpc-modules
+Description: XML based extensions for Kamailio's Management Interface
+ 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.
+ .
+ This package provides:
+ - the XMLRPC transport implementations for Kamailio's
+ Management and Control Interface.
+ - xmlops module for XPath operations in configuration file
+
 Package: kamailio-carrierroute-modules
 Package: kamailio-carrierroute-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-carrierroute-module
-Description: Carrierroute module for Kamailio
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: carrierroute module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
@@ -257,24 +348,38 @@ Description: Carrierroute module for Kamailio
  solution for routing, balancing and blacklisting.
  solution for routing, balancing and blacklisting.
 
 
 Package: kamailio-berkeley-modules
 Package: kamailio-berkeley-modules
-Architecture: any
-Depends: db4.6-util,
-         kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-berkeley-module
-Description: Berkeley Database module for Kamailio
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version}), db5.1-util
+Description: Berkeley database module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides the berkeley database module for Kamailio, a
+ This package provides the Berkeley database module for Kamailio, a
  high-performance embedded DB kernel. All database tables are stored
  high-performance embedded DB kernel. All database tables are stored
  in files, no additional server is necessary.
  in files, no additional server is necessary.
 
 
+Package: kamailio-berkeley-bin
+Architecture: linux-any
+Multi-Arch: foreign
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: Berkeley database module for Kamailio - helper program
+ 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.
+ .
+ This package provides helper modules for the Berkeley database module for
+ Kamailio, a high-performance embedded DB kernel. You should normally
+ install kamailio-berkeley-modules and not this package directly.
+
 Package: kamailio-ldap-modules
 Package: kamailio-ldap-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: LDAP modules for Kamailio
 Description: LDAP modules for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -284,11 +389,24 @@ Description: LDAP modules for Kamailio
  queries from the Kamailio config and storage of SIP account data in an LDAP
  queries from the Kamailio config and storage of SIP account data in an LDAP
  directory.
  directory.
 
 
+Package: kamailio-ims-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: IMS module for Kamailio
+ 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.
+ .
+ This package contains various Diameter interfaces and modules for Kamailio
+ to run as an IMS core.
+
 Package: kamailio-utils-modules
 Package: kamailio-utils-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-utils-module
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: Provides a set utility functions for Kamailio
 Description: Provides a set utility functions for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -297,125 +415,92 @@ Description: Provides a set utility functions for Kamailio
  Provides a set of utility functions for Kamailio, which are not related
  Provides a set of utility functions for Kamailio, which are not related
  to the server configuration.
  to the server configuration.
 
 
-Package: kamailio-purple-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-purple-module
-Description: Provides the purple module, a multi-protocol IM gateway
+Package: kamailio-sctp-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: sctp module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides the purple module, a multi-protocol instant
- messaging gateway module.
+ This package provides the sctp module for Kamailio.
 
 
-Package: kamailio-memcached-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-memcached-module
-Description: Provides the memcached module, an interface to the memcached server
+Package: kamailio-java-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends},
+         ${shlibs:Depends},
+         gjc-jre,
+         kamailio (= ${binary:Version})
+Description: contains the app_java module
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides the memcached module, an interface to the memcached
- server, a high-performance, distributed memory object caching system.
+ This package provides the app_java module, an extension allowing to
+ execute embedded Java applications within configuration file.
 
 
 Package: kamailio-tls-modules
 Package: kamailio-tls-modules
-Architecture: any
-Depends: kamailio (= ${Source-Version}),
-         ${shlibs:Depends}
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: contains the TLS kamailio transport module
 Description: contains the TLS kamailio transport module
- This has been split out of the main kamailio package, so that kamailio will not
- depend on openssl. This module will enable you to use the TLS transport.
-
-Package: kamailio-lua-modules
-Architecture: any
-Depends: kamailio (= ${Source-Version}),
-         ${shlibs:Depends}
-Description: contains the app_lua module
- 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.
- .
- This package provides the app_lua module, an extension allowing to
- execute embedded Lua applications within configuration file.
+ This has been split out of the main kamailio package, so that kamailio will
+ not depend on openssl. This module will enable you to use the TLS transport.
 
 
-Package: kamailio-mono-modules
-Architecture: any
-Depends: kamailio (= ${Source-Version}),
-         ${shlibs:Depends}
-Description: contains the app_mono module
+Package: kamailio-outbound-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: Outbound module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides the app_mono module, an extension allowing to
- execute embedded Mono applications within configuration file.
+ This package contains the module implementing SIP outbound extension.
 
 
-Package: kamailio-python-modules
-Architecture: any
-Depends: kamailio (= ${Source-Version}),
-         ${shlibs:Depends}
-Description: contains the app_python module
+Package: kamailio-websocket-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: Websocket module for kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides the app_python module, an extension allowing to
- execute embedded Python applications within configuration file.
+ This package contains the module implementing WebSocket transport layer.
 
 
-Package: kamailio-geoip-modules
-Architecture: any
+Package: kamailio-dnssec-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
 Depends: kamailio (= ${Source-Version}),
 Depends: kamailio (= ${Source-Version}),
          ${shlibs:Depends}
          ${shlibs:Depends}
-Description: contains the geoip module
- 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.
- .
- This package provides the geoip module, an extension allowing to
- use GeoIP API within configuration file.
-
-Package: kamailio-redis-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         libhiredis0.10,
-         ${shlibs:Depends}
-Description: Redis database connectivity module for Kamailio
- 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.
- .
- This package provides the Redis NOSQL database driver for Kamailio.
-
-Package: kamailio-sqlite-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         libsqlite3-0,
-         ${shlibs:Depends}
-Description: SQLite database connectivity module for Kamailio
+Description: contains the dnssec module
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides the SQLite database driver for Kamailio.
+ This package provides the dnssec module for Kamailio.
 
 
-Package: kamailio-json-modules
-Architecture: any
+Package: kamailio-autheph-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
 Depends: kamailio (= ${binary:Version}),
 Depends: kamailio (= ${binary:Version}),
-         libevent-1.4-2,
-         libjson0,
          ${shlibs:Depends}
          ${shlibs:Depends}
-Description: Json parser and jsonrpc modules for Kamailio
+Description: authentication using ephemeral credentials module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides json parser for Kamailio's configuration file
- and the JSON-RPC client over netstrings.
+ This package provides the ephemeral module for Kamailio.
 
 
 Package: kamailio-nth
 Package: kamailio-nth
 Architecture: any
 Architecture: any
@@ -438,80 +523,3 @@ Depends: binutils,
 Description: Kamailio - package for "nice to have" installation
 Description: Kamailio - package for "nice to have" installation
  This is a meta-package for easy installation various useful tools that may be
  This is a meta-package for easy installation various useful tools that may be
  handy on server with Kamailio installed.
  handy on server with Kamailio installed.
-
-Package: kamailio-ims-modules
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: Kamailio - IMS Modules
- 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.
- .
- This package contains various Diameter interfaces and modules for Kamailio
- to run as an IMS core.
-
-Package: kamailio-outbound-modules
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: Kamailio - Outbound Module
- 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.
- .
- This package contains the module implementing SIP outbound extension.
-
-Package: kamailio-websocket-modules
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: Kamailio - Websocket Module
- 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.
- .
- This package contains the module implementing WebSocket transport layer.
-
-Package: kamailio-autheph-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Description: authentication using ephemeral credentials module for Kamailio
- 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.
- .
- This package provides the ephemeral module for Kamailio.
-
-Package: kamailio-sctp-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Description: authentication using ephemeral credentials module for Kamailio
- 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.
- .
- This package provides the sctp module for Kamailio.
-
-Package: kamailio-java-modules
-Architecture: any
-Depends: kamailio (= ${Source-Version}),
-         gcj-jre,
-         ${shlibs:Depends}
-Description: contains the app_java module
- 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.
- .
- This package provides the app_java module, an extension allowing to
- execute embedded Java applications within configuration file.
-
-Package: kamailio-dnssec-modules
-Architecture: any
-Depends: kamailio (= ${Source-Version}),
-         ${shlibs:Depends}
-Description: contains the dnssec module
- 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.
- .
- This package provides the dnssec module for Kamailio.

+ 1 - 0
pkg/kamailio/deb/jessie/kamailio-berkeley-bin.dirs

@@ -0,0 +1 @@
+usr/sbin

+ 4 - 3
pkg/kamailio/deb/jessie/kamailio.README.Debian

@@ -1,5 +1,5 @@
 Kamailio for Debian
 Kamailio for Debian
-------------------
+-------------------
 
 
 * init script check for fork=no
 * init script check for fork=no
 -------------------------------
 -------------------------------
@@ -15,7 +15,7 @@ as a conffile.
 
 
 
 
 * Kamailio setup
 * Kamailio setup
----------------
+----------------
 
 
 To setup Kamailio, you need to:
 To setup Kamailio, you need to:
  - configure Kamailio properly to suit your needs
  - configure Kamailio properly to suit your needs
@@ -35,4 +35,5 @@ Set the DUMP_CORE parameter in /etc/default/kamailio to "yes" if you want to
 get a core dump in case Kamailio crashes. The debug symbols for Kamailio are
 get a core dump in case Kamailio crashes. The debug symbols for Kamailio are
 provided by the kamailio-dbg package.
 provided by the kamailio-dbg package.
 
 
--- Julien BLACHE <[email protected]>, Fri, 08 Sep 2006 14:43:21 +0200
+
+ -- Victor Seva <[email protected]>  Wed, 11 Dec 2013 16:07:11 +0100

+ 8 - 18
pkg/kamailio/deb/jessie/kamailio.default

@@ -3,31 +3,21 @@
 #
 #
 
 
 # Set to yes to enable kamailio, once configured properly.
 # Set to yes to enable kamailio, once configured properly.
-RUN_KAMAILIO=no
+#RUN_KAMAILIO=yes
 
 
 # User to run as
 # User to run as
-USER=kamailio
+#USER=kamailio
 
 
 # Group to run as
 # Group to run as
-GROUP=kamailio
+#GROUP=kamailio
 
 
-# Amount of shared memory to allocate for the running Kamailio server (in Mb)
-SHM_MEMORY=64
-
-# Amount of private memory for each Kamailio process (in Mb)
-PKG_MEMORY=4
-
-# Switch to USER and GROUP by start-stop-daemon or by kamailio itself
-# - with recent kernels, changing user ID inside applicaton prevents
-#   dumping core files. If the value is 'yes', the suid is done by
-#   start-stop-daemon, otherwise it is done by kamailio itself
-SSD_SUID=no
+# Amount of memory to allocate for the running Kamailio server (in Mb)
+#MEMORY=64
 
 
 # Enable the server to leave a core file when it crashes.
 # Enable the server to leave a core file when it crashes.
 # Set this to 'yes' to enable Kamailio to leave a core file when it crashes
 # Set this to 'yes' to enable Kamailio to leave a core file when it crashes
 # or 'no' to disable this feature. This option is case sensitive and only
 # or 'no' to disable this feature. This option is case sensitive and only
 # accepts 'yes' and 'no' and only in lowercase letters.
 # accepts 'yes' and 'no' and only in lowercase letters.
-# On some systems (e.g. Ubuntu 6.10, Debian 4.0) it is necessary to specify
-# a directory for the core files to get a dump. Look into the kamailio
-# init file for an example configuration.
-DUMP_CORE=no
+# On some systems it is necessary to specify a directory for the core files
+# to get a dump. Look into the kamailio init file for an example configuration.
+#DUMP_CORE=yes

+ 100 - 179
pkg/kamailio/deb/jessie/kamailio.init

@@ -3,238 +3,159 @@
 ### BEGIN INIT INFO
 ### BEGIN INIT INFO
 # Provides:          kamailio
 # Provides:          kamailio
 # Required-Start:    $syslog $network $local_fs $remote_fs $time
 # Required-Start:    $syslog $network $local_fs $remote_fs $time
+# Should-Start:      $named slapd mysql postgresql snmpd radiusd
+# Should-Stop:       $named slapd mysql postgresql snmpd radiusd
 # Required-Stop:     $syslog $network $local_fs $remote_fs
 # Required-Stop:     $syslog $network $local_fs $remote_fs
 # Default-Start:     2 3 4 5
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
 # Default-Stop:      0 1 6
-# Should-Start:      postgresql mysql radius
-# Should-Stop:       postgresql mysql radius
 # Short-Description: Start the Kamailio SIP proxy server
 # Short-Description: Start the Kamailio SIP proxy server
 # Description:       Start the Kamailio SIP proxy server
 # Description:       Start the Kamailio SIP proxy server
 ### END INIT INFO
 ### END INIT INFO
 
 
+. /lib/lsb/init-functions
 
 
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 DAEMON=/usr/sbin/kamailio
 DAEMON=/usr/sbin/kamailio
 NAME=kamailio
 NAME=kamailio
-DESC=Kamailio
+DESC="Kamailio SIP server"
 HOMEDIR=/var/run/kamailio
 HOMEDIR=/var/run/kamailio
 PIDFILE=$HOMEDIR/$NAME.pid
 PIDFILE=$HOMEDIR/$NAME.pid
 DEFAULTS=/etc/default/kamailio
 DEFAULTS=/etc/default/kamailio
-CFGFILE=/etc/kamailio/kamailio.cfg
 RUN_KAMAILIO=no
 RUN_KAMAILIO=no
-
+USER=kamailio
+GROUP=kamailio
+# Amount of memory to allocate for the running Kamailio server (in Mb)
+MEMORY=64
+DUMP_CORE=no
 
 
 # Do not start kamailio if fork=no is set in the config file
 # Do not start kamailio if fork=no is set in the config file
-# otherwise the boot process will just stop.
+# otherwise the boot process will just stop
 check_fork ()
 check_fork ()
 {
 {
-  if grep -q "^[[:space:]]*fork[[:space:]]*=[[:space:]]*no.*" $CFGFILE; then
-    echo "Not starting $DESC: fork=no specified in config file. Run /etc/init.d/kamailio debug instead."
-    exit 1
-  fi
+    if grep -q "^[[:space:]]*fork[[:space:]]*=[[:space:]]*no.*" /etc/kamailio/kamailio.cfg; then
+	log_failure_msg "Not starting $DESC: fork=no specified in config file; run /etc/init.d/kamailio debug instead"
+	exit 0
+    fi
 }
 }
 
 
-
 check_kamailio_config ()
 check_kamailio_config ()
 {
 {
-  # Check if kamailio configuration is valid before starting the server.
-  set +e
-  out=$($DAEMON -f $CFGFILE -M $PKG_MEMORY -c 2>&1 > /dev/null)
-  retcode=$?
-  set -e
-  if [ "$retcode" != '0' ]; then
-    echo "Not starting $DESC: invalid configuration file!"
-    echo -e "\n$out\n"
-    exit 1
-  fi
-}
-
-
-check_homedir ()
-{
-  # Create HOMEDIR directory in case it doesn't exist.
-  # Useful in Ubuntu as /var/run/ content is deleted in shutdown.
-  if [ ! -d $HOMEDIR ]; then
-    mkdir $HOMEDIR
-  fi
-
-  # Set the appropiate owner and group
-  chown ${USER}:${GROUP} $HOMEDIR
+	# Check if kamailio configuration is valid before starting the server
+	set +e
+	out=$($DAEMON -c 2>&1 > /dev/null)
+	retcode=$?
+	set -e
+	if [ "$retcode" != '0' ]; then
+	    log_failure_msg "Not starting $DESC: invalid configuration file!"
+	    log_failure_msg
+	    log_failure_msg "$out"
+	    log_faiulre_msg
+	    exit 1
+	fi
 }
 }
 
 
-
 create_radius_seqfile ()
 create_radius_seqfile ()
 {
 {
-  # Create a radius sequence file to be used by the radius client if
-  # radius accounting is enabled. This is needed to avoid any issue
-  # with the file not being writable if kamailio first starts as user
-  # root because DUMP_CORE is enabled and creates this file as user
-  # root and then later it switches back to user kamailio and cannot
-  # write to the file. If the file exists before kamailio starts, it
-  # won't change it's ownership and will be writable for both root
-  # and kamailio, no matter what options are chosen at install time
-  RADIUS_SEQ_FILE=$HOMEDIR/kamailio_radius.seq
-
-  if [ ! -f $RADIUS_SEQ_FILE ]; then
-      touch $RADIUS_SEQ_FILE
-  fi
-
-  chown ${USER}:${GROUP} $RADIUS_SEQ_FILE
-  chmod 660 $RADIUS_SEQ_FILE
+    # Create a radius sequence file to be used by the radius client if
+    # radius accounting is enabled. This is needed to avoid any issue
+    # with the file not being writable if kamailio first starts as user
+    # root because DUMP_CORE is enabled and creates this file as user
+    # root and then later it switches back to user kamailio and cannot
+    # write to the file. If the file exists before kamailio starts, it
+    # won't change it's ownership and will be writable for both root
+    # and kamailio, no matter what options are chosen at install time
+    RADIUS_SEQ_FILE=/var/run/kamailio/kamailio_radius.seq
+    if [ -d /var/run/kamailio ]; then
+	chown ${USER}:${GROUP} /var/run/kamailio
+
+	if [ ! -f $RADIUS_SEQ_FILE ]; then
+	    touch $RADIUS_SEQ_FILE
+	fi
+
+	chown ${USER}:${GROUP} $RADIUS_SEQ_FILE
+	chmod 660 $RADIUS_SEQ_FILE
+    fi
 }
 }
 
 
+test -f $DAEMON || exit 0
 
 
-if [ ! -f $DAEMON ]; then
-  echo "No $DESC daemon at $DAEMON."
-  case "$1" in
-  status)
-    # LSB - 4: program or service status is unknown.
-    exit 4
-    ;;
-  *)
-    # LSB - 5: program is not installed.
-    exit 5
-    ;;
-  esac
-fi
-
-
-# Load startup options if available.
+# Load startup options if available
 if [ -f $DEFAULTS ]; then
 if [ -f $DEFAULTS ]; then
-  . $DEFAULTS || true
+   . $DEFAULTS || true
 fi
 fi
 
 
-
 if [ "$RUN_KAMAILIO" != "yes" ]; then
 if [ "$RUN_KAMAILIO" != "yes" ]; then
-  echo "$DESC not yet configured. Edit $DEFAULTS first."
-  exit 0
+    log_failure_msg "Kamailio not yet configured. Edit /etc/default/kamailio first."
+    exit 0
 fi
 fi
 
 
-
 set -e
 set -e
 
 
-
-SHM_MEMORY=$((`echo $SHM_MEMORY | sed -e 's/[^0-9]//g'`))
-PKG_MEMORY=$((`echo $PKG_MEMORY | sed -e 's/[^0-9]//g'`))
-[ $SHM_MEMORY -le 0 ] && SHM_MEMORY=64
-[ $PKG_MEMORY -le 0 ] && PKG_MEMORY=4
+MEMORY=$((`echo $MEMORY | sed -e 's/[^0-9]//g'`))
 [ -z "$USER" ]  && USER=kamailio
 [ -z "$USER" ]  && USER=kamailio
 [ -z "$GROUP" ] && GROUP=kamailio
 [ -z "$GROUP" ] && GROUP=kamailio
-
+[ $MEMORY -le 0 ] && MEMORY=32
 
 
 if test "$DUMP_CORE" = "yes" ; then
 if test "$DUMP_CORE" = "yes" ; then
-  # set proper ulimit.
-  ulimit -c unlimited
-
-  # directory for the core dump files.
-  # COREDIR=/tmp/corefiles
-  # [ -d $COREDIR ] || mkdir $COREDIR
-  # chmod 777 $COREDIR
-  # echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
+    # set proper ulimit
+    ulimit -c unlimited
+    
+    # directory for the core dump files
+    # COREDIR=/home/corefiles
+    # [ -d $COREDIR ] || mkdir $COREDIR
+    # chmod 777 $COREDIR
+    # echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
 fi
 fi
 
 
-
-if [ "$SSD_SUID" != "yes" ]; then
-  OPTIONS="-f $CFGFILE -P $PIDFILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP"
-  SSDOPTS=""
-else
-  OPTIONS="-f $CFGFILE -P $PIDFILE -m $SHM_MEMORY -M $PKG_MEMORY"
-  SSDOPTS="--chuid $USER:$GROUP"
+# /var/run can be a tmpfs
+if [ ! -d $HOMEDIR ]; then
+    mkdir -p $HOMEDIR
 fi
 fi
 
 
-
-start_kamailio_daemon ()
-{
-  start-stop-daemon --start --quiet --pidfile $PIDFILE $SSDOPTS \
-    --exec $DAEMON -- $OPTIONS
-  res=$?
-
-  echo -n "$NAME "
-  if [ $res -eq 0 ] ; then
-    echo "started."
-    exit 0
-  else
-    if [ ! -r "$PIDFILE" ]; then
-      echo "error, failed to start."
-      exit 1
-    elif read pid < "$PIDFILE" && ps -p "$pid" > /dev/null 2>&1; then
-      echo "already running."
-      exit 0
-    else
-      echo "error, failed to start ($PIDFILE exists)."
-      exit 1
-    fi
-  fi
-}
-
+OPTIONS="-P $PIDFILE -m $MEMORY -u $USER -g $GROUP"
 
 
 case "$1" in
 case "$1" in
   start|debug)
   start|debug)
-    check_kamailio_config
-    check_homedir
-    create_radius_seqfile
-
-    if [ "$1" != "debug" ]; then
-      check_fork
-    fi
-
-    echo "Starting $DESC:"
-    set +e
-    start_kamailio_daemon
-    ;;
-
+	check_kamailio_config
+	create_radius_seqfile
+
+	if [ "$1" != "debug" ]; then
+	    check_fork
+	fi
+
+	log_daemon_msg "Starting $DESC: $NAME"
+	start-stop-daemon --start --quiet --pidfile $PIDFILE \
+		--exec $DAEMON -- $OPTIONS || log_failure_msg " already running"
+	log_end_msg 0
+	;;
   stop)
   stop)
-    echo -n "Stopping $DESC: $NAME "
-    set +e
-    start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
-      --exec $DAEMON
-
-    if [ $? -eq 0 ] ; then
-      echo "stopped."
-      exit 0
-    else
-      echo "failed to stop."
-      exit 1
-    fi
-    ;;
-    
+	log_daemon_msg "Stopping $DESC: $NAME"
+	start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
+		--exec $DAEMON
+	log_end_msg 0
+	;;
   restart|force-reload)
   restart|force-reload)
-    check_kamailio_config
-    check_homedir
-    create_radius_seqfile
-
-    echo "Restarting $DESC:"
-    set +e
-    start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE --retry=5 \
-      --exec $DAEMON
-    if [ $? -ne 0 ] ; then
-      echo "$NAME failed to stop."
-      exit 1
-    fi
-    start_kamailio_daemon
-    ;;
-
+	check_kamailio_config
+	create_radius_seqfile
+
+	log_daemon_msg "Restarting $DESC: $NAME"
+	start-stop-daemon --oknodo --stop --quiet --pidfile \
+		$PIDFILE --exec $DAEMON
+	sleep 1
+	start-stop-daemon --start --quiet --pidfile \
+		$PIDFILE --exec $DAEMON  -- $OPTIONS
+	log_end_msg 0
+	;;
   status)
   status)
-    echo -n "Status of $DESC: $NAME "
-    if [ ! -r "$PIDFILE" ]; then
-      echo "is not running."
-      exit 3
-    fi
-    if read pid < "$PIDFILE" && ps -p "$pid" > /dev/null 2>&1; then
-      echo "is running."
-      exit 0
-    else
-      echo "is not running but $PIDFILE exists."
-      exit 1
-    fi
-    ;;
-
+	log_daemon_msg "Status of $DESC: "
+	
+	status_of_porc "$PIDFILE" $NAME $NAME
+	;;
   *)
   *)
-    N=/etc/init.d/$NAME
-    echo "Usage: $N {start|stop|restart|force-reload|debug|status}" >&2
-    exit 1
-    ;;
+	N=/etc/init.d/$NAME
+	echo "Usage: $N {start|stop|restart|force-reload|status|debug}" >&2
+	exit 1
+	;;
 esac
 esac
 
 
-
 exit 0
 exit 0

+ 2 - 26
pkg/kamailio/deb/jessie/kamailio.postinst

@@ -1,36 +1,12 @@
 #! /bin/sh
 #! /bin/sh
-#
-# $Id$
-
-PKG=kamailio
-DEFAULTS=/etc/default/kamailio
-HOMEDIR=/var/run/kamailio
 
 
 set -e
 set -e
 
 
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-#
-# quoting from the policy:
-#     Any necessary prompting should almost always be confined to the
-#     post-installation script, and should be protected with a conditional
-#     so that unnecessary prompting doesn't happen if a package's
-#     installation fails and the `postinst' is called with `abort-upgrade',
-#     `abort-remove' or `abort-deconfigure'.
-
 case "$1" in
 case "$1" in
     configure)
     configure)
         adduser --quiet --system --group --disabled-password \
         adduser --quiet --system --group --disabled-password \
-                --shell /bin/false --gecos "Kamailio" \
-                --home $HOMEDIR kamailio || true
+                --shell /bin/false --gecos "Kamailio SIP Server" \
+                --home /var/run/kamailio kamailio || true
 
 
         ;;
         ;;
 
 

+ 53 - 86
pkg/kamailio/deb/jessie/rules

@@ -1,64 +1,52 @@
 #!/usr/bin/make -f
 #!/usr/bin/make -f
 # Sample debian/rules that uses debhelper.
 # Sample debian/rules that uses debhelper.
 # GNU copyright 1997 to 1999 by Joey Hess.
 # GNU copyright 1997 to 1999 by Joey Hess.
-#
-# $Id$
-#
-# History:
-# --------
-#  2009-07-08  updated for sip-router (andrei)
-#  2009-12-10  updated for kamailio 3.0 (daniel)
 
 
+DEBVERSION:=$(shell head -n 1 debian/changelog \
+                    | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION:=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
+
+FILENAME := kamailio_$(UPVERSION).orig.tar.gz
+URL := http://www.kamailio.org/pub/kamailio/$(UPVERSION)/src/kamailio-$(UPVERSION)_src.tar.gz
+
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
 
 
 # Uncomment this to turn on verbose mode.
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 #export DH_VERBOSE=1
 
 
-# This is the debhelper compatibility version to use.
-# export DH_COMPAT=4
-#  -- already set in compat
-export DEB_BUILD_OPTIONS:="$(DEB_BUILD_OPTIONS) debug"
-
 # java stuff using libgcj12
 # java stuff using libgcj12
 export JAVA_HOME=/usr/lib/jvm/java-gcj-4.6
 export JAVA_HOME=/usr/lib/jvm/java-gcj-4.6
 
 
 # modules not in the "main" kamailio package
 # modules not in the "main" kamailio package
-EXCLUDED_MODULES= 
+EXCLUDED_MODULES=
 
 
 # extra modules to skip, because they are not compilable now
 # extra modules to skip, because they are not compilable now
 # - regardless if they go to the main kamailio package or to some module package,
 # - regardless if they go to the main kamailio package or to some module package,
 # they will be excluded from compile and install of all
 # they will be excluded from compile and install of all
 EXTRA_EXCLUDED_MODULES=bdb dbtext oracle pa iptrtpproxy
 EXTRA_EXCLUDED_MODULES=bdb dbtext oracle pa iptrtpproxy
-#EXTRA_EXCLUDED_MODULES=
-
-# possible module directories that can appear in MODULES_SP
-# (only used for deducing a module name)
-MDIRS=modules
-
-# modules packaged in separate packages (complete with full modules_* path)
-# with the package name: kamailio-$(module_name)-module
-MODULES_SP=
 
 
 # module groups that are packaged in seperate packages
 # module groups that are packaged in seperate packages
 # (with the name kamailio-$(group_name)-modules)
 # (with the name kamailio-$(group_name)-modules)
 # Note: the order is important (should be in dependency order, the one
 # Note: the order is important (should be in dependency order, the one
 # on which other depend first)
 # on which other depend first)
 PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
 PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
-			   ldap xml perl utils purple memcached tls \
-			   snmpstats carrierroute xmpp cpl lua python geoip \
-			   redis sqlite json mono ims outbound websocket \
-			   autheph sctp java dnssec
+			   ldap xml perl utils lua memcached \
+			   snmpstats carrierroute xmpp cpl redis python geoip\
+			   sqlite json mono ims sctp java \
+			   purple tls outbound websocket autheph dnssec
 
 
 # name of libdir in the path for libraries (e.g., lib for 32b, lib64 for 64b)
 # name of libdir in the path for libraries (e.g., lib for 32b, lib64 for 64b)
-LIBDIR ?= lib
+LIBDIR ?= lib/$(DEB_HOST_MULTIARCH)
 
 
 # directories with possible duplicate libraries (that should be deleted
 # directories with possible duplicate libraries (that should be deleted
 # from current module* packages)
 # from current module* packages)
 DUP_LIBS_DIRS=$(CURDIR)/debian/kamailio/usr/$(LIBDIR)/kamailio \
 DUP_LIBS_DIRS=$(CURDIR)/debian/kamailio/usr/$(LIBDIR)/kamailio \
 			$(CURDIR)/debian/kamailio-db-modules/usr/$(LIBDIR)/kamailio
 			$(CURDIR)/debian/kamailio-db-modules/usr/$(LIBDIR)/kamailio
 
 
-# modules names out of modules sp
-MODULES_SP_NAMES=$(filter-out $(MDIRS),$(subst /, ,$(MODULES_SP)))
-
 # "function" to get package short name out of a dir/module_name
 # "function" to get package short name out of a dir/module_name
 # it also transforms db_foo into foo
 # it also transforms db_foo into foo
 mod_name=$(subst db_,,$(lastword $(subst /, ,$(1))))
 mod_name=$(subst db_,,$(lastword $(subst /, ,$(1))))
@@ -71,53 +59,25 @@ define PACKAGE_GRP_BUILD_template
 endef
 endef
 
 
 
 
-define PACKAGE_MODULE_BUILD_template
-	# package all the modules MODULES_SP in separate packages
-	$(foreach mod,$(MODULES_SP),\
-		$(MAKE) modules modules="$(mod)"
-	)
-endef
-
-
 define PACKAGE_GRP_INSTALL_template
 define PACKAGE_GRP_INSTALL_template
 	$(foreach grp,$(PACKAGE_GROUPS),\
 	$(foreach grp,$(PACKAGE_GROUPS),\
-		$(MAKE) install-modules-all group_include="k$(grp)" \
+		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
 		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		doc-dir=share/doc/kamailio-$(grp)-modules
 		doc-dir=share/doc/kamailio-$(grp)-modules
 		# eliminate duplicate libs
 		# eliminate duplicate libs
 		-for d in $(DUP_LIBS_DIRS); do \
 		-for d in $(DUP_LIBS_DIRS); do \
 			test "$$d" != "$(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio" &&\
 			test "$$d" != "$(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio" &&\
-			for r in $$d/lib*; do \
-				if [ "$$r" != "$$d/lib*" ]; then \
-					echo "removing $(grp) lib `basename $$r` present also in $$d";\
-					rm -f $(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
-				fi \
+			for r in `find $$d -name 'lib*'|xargs`; do \
+				echo "removing $(grp) lib `basename $$r` present also in $$d";\
+				rm -f $(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
 			done ; \
 			done ; \
 		done
 		done
+		find $(CURDIR)/debian/kamailio-$(grp)-modules -depth -empty -type d -exec rmdir {} \;
 	)
 	)
 endef
 endef
 
 
 
 
-define PACKAGE_MODULE_INSTALL_template
-	$(foreach mod,$(MODULES_SP),
-		$(MAKE) install-modules-all modules="$(mod)" \
-				modules_s="" modules_k="" \
-				basedir=$(CURDIR)/debian/kamailio-$(call mod_name,$(mod))-module \
-				doc-dir=share/doc/kamailio-$(call mod_name,$(mod))-module
-		# eliminate duplicate libs
-		-for d in $(DUP_LIBS_DIRS); do \
-			test "$$d" != "$(CURDIR)/debian/kamailio-$(call mod_name,$(mod))-module/usr/$(LIBDIR)/kamailio" &&\
-			for r in $$d/lib*; do \
-				if [ "$$r" != "$$d/lib*" ]; then \
-					echo "removing $(call mod_name, $(mod)) lib `basename $$r` present also in $$d";\
-					rm -f $(CURDIR)/debian/kamailio-$(call mod_name,$(mod))-module/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
-				fi \
-			done ; \
-		done
-	)
-endef
-
 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
 	CFLAGS += -g
 	CFLAGS += -g
 endif
 endif
@@ -125,6 +85,11 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 	INSTALL_PROGRAM += -s
 	INSTALL_PROGRAM += -s
 endif
 endif
 
 
+# CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
+# LDFLAGS -> LD_EXTRA_OPTS
+CUSTOM_BUILDFLAGS:=$(shell dpkg-buildflags --export=configure| \
+sed -e 's/" CPPFLAGS="/ /' -e 's/CFLAGS/CC_EXTRA_OPTS/g' -e 's/LDFLAGS/LD_EXTRA_OPTS/g')
+
 configure: configure-stamp
 configure: configure-stamp
 configure-stamp:
 configure-stamp:
 	dh_testdir
 	dh_testdir
@@ -133,17 +98,19 @@ configure-stamp:
 			cfg_target=/etc/kamailio/ \
 			cfg_target=/etc/kamailio/ \
 			basedir=$(CURDIR)/debian/kamailio \
 			basedir=$(CURDIR)/debian/kamailio \
 			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
 			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
+			$(CUSTOM_BUILDFLAGS) \
 			group_include="kstandard"
 			group_include="kstandard"
 
 
 	touch configure-stamp
 	touch configure-stamp
 
 
 
 
 build: build-stamp
 build: build-stamp
-
-build-stamp: configure-stamp 
+build-arch: build-stamp
+build-indep: build-stamp
+build-stamp: configure-stamp
 	dh_testdir
 	dh_testdir
 	# Add here commands to compile the package.
 	# Add here commands to compile the package.
-	$(MAKE) all
+	$(MAKE) all quiet=verbose
 	# make groups
 	# make groups
 	$(call PACKAGE_GRP_BUILD_template)
 	$(call PACKAGE_GRP_BUILD_template)
 	# make single-module packages
 	# make single-module packages
@@ -155,57 +122,47 @@ clean:
 	dh_testroot
 	dh_testroot
 	rm -f build-stamp configure-stamp
 	rm -f build-stamp configure-stamp
 	# Add here commands to clean up after the build process.
 	# Add here commands to clean up after the build process.
-	-$(MAKE) maintainer-clean
+	$(MAKE) maintainer-clean
 	dh_clean
 	dh_clean
 
 
 install: build
 install: build
 	dh_testdir
 	dh_testdir
 	dh_testroot
 	dh_testroot
-	dh_clean -k
+	dh_prep
 	dh_installdirs
 	dh_installdirs
 	# Add here commands to install the package into debian/kamailio
 	# Add here commands to install the package into debian/kamailio
-	$(MAKE) install group_include="kstandard"
-	# fix etc/kamailio dir location -- not needed -- andrei
-	# mv -f $(CURDIR)/debian/kamailio/usr/etc $(CURDIR)/debian/kamailio
+	$(MAKE) install LIBDIR=$(LIBDIR) group_include="kstandard"
 	# make group packages
 	# make group packages
 	$(call PACKAGE_GRP_INSTALL_template)
 	$(call PACKAGE_GRP_INSTALL_template)
-	# make single module packages
-	$(call PACKAGE_MODULE_INSTALL_template)
+	mv $(CURDIR)/debian/kamailio-berkeley-modules/usr/sbin/kambdb_recover \
+		$(CURDIR)/debian/kamailio-berkeley-bin/usr/sbin/kambdb_recover
 	# install /etc/default/kamailio file
 	# install /etc/default/kamailio file
 	mkdir -p $(CURDIR)/debian/kamailio/etc/default
 	mkdir -p $(CURDIR)/debian/kamailio/etc/default
 	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
 	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
-	#dh_movefiles
-
 
 
 
 
 # This single target is used to build all the packages, all at once, or
 # This single target is used to build all the packages, all at once, or
 # one at a time. So keep in mind: any options passed to commands here will
 # one at a time. So keep in mind: any options passed to commands here will
 # affect _all_ packages. Anything you want to only affect one package
 # affect _all_ packages. Anything you want to only affect one package
 # should be put in another target, such as the install target.
 # should be put in another target, such as the install target.
-binary-common: 
+binary-common:
 	dh_testdir
 	dh_testdir
 	dh_testroot
 	dh_testroot
-	dh_installdebconf	
+	dh_installdebconf
 	dh_installdocs
 	dh_installdocs
 	dh_installexamples
 	dh_installexamples
 	dh_installmenu
 	dh_installmenu
-#	dh_installlogrotate
-#	dh_installemacsen
-#	dh_installpam
-#	dh_installmime
-	dh_installinit  -- defaults 23
+	dh_installinit -pkamailio -- defaults 23
 	dh_installcron
 	dh_installcron
 	dh_installman
 	dh_installman
 	dh_installinfo
 	dh_installinfo
-#	dh_undocumented
-	dh_installchangelogs ChangeLog 
+	dh_installchangelogs ChangeLog
 	dh_link
 	dh_link
 	dh_strip --dbg-package=kamailio-dbg
 	dh_strip --dbg-package=kamailio-dbg
-	dh_compress 
+	dh_compress
 	dh_fixperms
 	dh_fixperms
 	dh_makeshlibs
 	dh_makeshlibs
 	dh_installdeb
 	dh_installdeb
-#	dh_perl
 	dh_shlibdeps
 	dh_shlibdeps
 	dh_gencontrol
 	dh_gencontrol
 	dh_md5sums
 	dh_md5sums
@@ -226,6 +183,16 @@ binary-arch: build install
 binary-%: build install
 binary-%: build install
 	$(MAKE) -f debian/rules binary-common DH_OPTIONS=-p$*
 	$(MAKE) -f debian/rules binary-common DH_OPTIONS=-p$*
 
 
+print-version:
+	@@echo "Debian version:          $(DEBVERSION)"
+	@@echo "Upstream version:        $(UPVERSION)"
+
+get-orig-source:
+	@@dh_testdir
+	@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
+	@@echo Downloading $(FILENAME) from $(URL) ...
+	@@wget -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL)
+
 binary: binary-indep binary-arch
 binary: binary-indep binary-arch
 .PHONY: build clean binary-indep binary-arch binary install configure
 .PHONY: build clean binary-indep binary-arch binary install configure
 
 

+ 1 - 0
pkg/kamailio/deb/jessie/source/format

@@ -0,0 +1 @@
+3.0 (native)

+ 3 - 0
pkg/kamailio/deb/jessie/watch

@@ -0,0 +1,3 @@
+version=3
+opts=dversionmangle=s/\~svn([\d]+)//; \
+http://www.kamailio.org/pub/kamailio/([\d.]+)/src/kamailio-([\d.]+)_src\.tar\.gz

+ 1 - 0
pkg/kamailio/deb/squeeze/changelog

@@ -3,6 +3,7 @@ kamailio (4.2.0~dev0) unstable; urgency=low
   * Added packages:
   * Added packages:
     - kamailio-autheph-modules
     - kamailio-autheph-modules
     - kamailio-sctp-modules
     - kamailio-sctp-modules
+    - kamailio-java-modules
 
 
  --  Victor Seva <[email protected]>  Tue, 03 Dec 2013 14:26:58 +0100
  --  Victor Seva <[email protected]>  Tue, 03 Dec 2013 14:26:58 +0100
 
 

+ 1 - 1
pkg/kamailio/deb/squeeze/compat

@@ -1 +1 @@
-5
+8

+ 214 - 266
pkg/kamailio/deb/squeeze/control

@@ -1,70 +1,51 @@
 Source: kamailio
 Source: kamailio
 Section: net
 Section: net
 Priority: optional
 Priority: optional
-Maintainer: Jon Bonilla <[email protected]>
+Maintainer: Debian VoIP Team <[email protected]>
+Uploaders: Victor Seva <[email protected]>, Tzafrir Cohen <[email protected]>
 Build-Depends: bison,
 Build-Depends: bison,
-               debhelper (>= 5),
-               docbook-xml,
-               dpatch,
-               dpkg-dev (>= 1.13.19),
-               flex,
-               libconfuse-dev,
-               libcurl3-openssl-dev,
-               libdb-dev (>= 4.6.19),
-               libevent-dev,
-               libexpat1-dev,
-               libgeoip-dev (>= 1.4.5),
-               libjson0-dev,
-               libldap2-dev,
-               liblua5.1-0-dev,
-               libmemcached-dev,
-               libmysqlclient-dev,
-               libncurses5-dev,
-               libpcre3-dev,
-               libperl-dev,
-               libpq-dev,
-               libradiusclient-ng-dev,
-               libreadline-dev,
-               libsasl2-dev,
-               libsctp-dev,
-               libsnmp-dev,
-               libsqlite3-dev,
-               libssl-dev,
-               libxml2-dev,
-               libxmlrpc-c3-dev,
-               libunistring-dev,
-               openssl,
-               python,
-               python-dev,
-               unixodbc-dev,
-               xsltproc,
-               zlib1g-dev
-Standards-Version: 3.9.3
+    debhelper,
+    docbook-xml,
+    dpkg-dev,
+    flex,
+    libconfuse-dev,
+    libcurl4-openssl-dev,
+    libdb-dev (>= 4.6.19),
+    libevent-dev,
+    libexpat1-dev,
+    libgeoip-dev (>= 1.4.5),
+    libjson0-dev,
+    libldap2-dev,
+    liblua5.1-0-dev,
+    libmemcached-dev,
+    libmysqlclient-dev,
+    libncurses5-dev,
+    libpcre3-dev,
+    libperl-dev,
+    libpq-dev,
+    libradiusclient-ng-dev,
+    libreadline-dev,
+    libsasl2-dev,
+    libsctp-dev,
+    libsnmp-dev,
+    libsqlite3-dev,
+    libunistring-dev,
+    libxml2-dev,
+    libxmlrpc-c3-dev,
+    openssl,
+    python,
+    python-dev,
+    unixodbc-dev,
+    xsltproc
+Standards-Version: 3.9.4
 Homepage: http://www.kamailio.org/
 Homepage: http://www.kamailio.org/
+Vcs-git: git://anonscm.debian.org/pkg-voip/kamailio.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-voip/kamailio.git
 
 
 Package: kamailio
 Package: kamailio
-Architecture: any
-Depends: adduser,
-         ${misc:Depends},
-         ${shlibs:Depends}
-Conflicts: kamailio-regex-modules
-Suggests: kamailio-berkeley-modules,
-          kamailio-carrierroute-modules,
-          kamailio-cpl-modules,
-          kamailio-dbg,
-          kamailio-ldap-modules,
-          kamailio-lua-modules,
-          kamailio-mysql-modules,
-          kamailio-perl-modules,
-          kamailio-postgres-modules,
-          kamailio-presence-modules,
-          kamailio-python-modules,
-          kamailio-radius-modules,
-          kamailio-snmpstats-modules,
-          kamailio-tls-modules,
-          kamailio-unixodbc-modules,
-          kamailio-xml-modules,
-          kamailio-xmpp-modules
+Architecture: linux-any
+Depends: ${shlibs:Depends}, ${misc:Depends}, python, adduser
+Suggests: kamailio-mysql-modules, kamailio-postgres-modules, kamailio-unixodbc-modules, kamailio-cpl-modules, kamailio-radius-modules, kamailio-presence-modules, kamailio-xml-modules, kamailio-perl-modules, kamailio-snmpstats-modules, kamailio-xmpp-modules, kamailio-carrierroute-modules, kamailio-berkeley-modules, kamailio-ldap-modules, kamailio-python-modules, kamailio-lua-modules
 Description: very fast and configurable SIP proxy
 Description: very fast and configurable SIP proxy
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -74,31 +55,97 @@ Description: very fast and configurable SIP proxy
  behaviour. Its modular architecture allows only required functionality to be
  behaviour. Its modular architecture allows only required functionality to be
  loaded.
  loaded.
  .
  .
- Among others, the following modules are available: Digest Authentication, CPL
- scripts, Instant Messaging, MySQL support, Presence Agent, Radius
- Authentication, Record Routing, SMS Gateway, Jabber/XMPP Gateway, Transaction
- Module, Registrar and User Location, XMLRPC Interface.
+ Among others, the following modules are available: digest authentication, CPL
+ scripts, instant messaging, MySQL support, presence agent, RADIUS
+ authentication, record routing, SMS gateway, Jabber/XMPP gateway, transaction
+ module, registrar and user location, XML-RPC interface.
  .
  .
  This package contains the main Kamailio binary along with the principal modules
  This package contains the main Kamailio binary along with the principal modules
  and support binaries.
  and support binaries.
 
 
 Package: kamailio-dbg
 Package: kamailio-dbg
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Description: Debugging symbols for Kamailio SIP proxy
+Priority: extra
+Section: debug
+Architecture: linux-any
+Depends: ${misc:Depends}, kamailio (= ${binary:Version})
+Description: very fast and configurable SIP proxy [debug symbols]
+ 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.
+ .
+ This package contains the debugging symbols for the Kamailio binaries and
+ modules. You only need to install it if you need to debug Kamailio.
+
+Package: kamailio-geoip-modules
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: contains the geoip module
+ 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.
+ .
+ This package provides the geoip module, an extension allowing to
+ use GeoIP API within configuration file.
+
+Package: kamailio-sqlite-modules
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Recommends: sqlite3
+Description: SQLite database connectivity module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides gdb debugging symbols  for Kamailio
+ This package provides the SQLite database driver for Kamailio.
+
+Package: kamailio-json-modules
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: Json parser and jsonrpc modules for Kamailio
+ 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.
+ .
+ This package provides json parser for Kamailio's configuration file
+ and the JSON-RPC client over netstrings.
+
+Package: kamailio-memcached-modules
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Replaces: kamailio-memcached-module
+Description: Provides the memcached module, an interface to the memcached server
+ 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.
+ .
+ This package provides the memcached module, an interface to the memcached
+ server, a high-performance, distributed memory object caching system.
+
+Package: kamailio-lua-modules
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: contains the app_lua module
+ 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.
+ .
+ This package provides the app_lua module, an extension allowing to
+ execute embedded Lua applications within configuration file.
+
+Package: kamailio-python-modules
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, python-dev, kamailio (= ${binary:Version})
+Description: contains the app_python module
+ 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.
+ .
+ This package provides the app_python module, an extension allowing to
+ execute embedded Python applications within configuration file.
 
 
 Package: kamailio-mysql-modules
 Package: kamailio-mysql-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         mysql-client,
-         ${shlibs:Depends}
-Replaces: kamailio-mysql-module
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version}), mysql-client
 Description: MySQL database connectivity module for Kamailio
 Description: MySQL database connectivity module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -107,11 +154,8 @@ Description: MySQL database connectivity module for Kamailio
  This package provides the MySQL database driver for Kamailio.
  This package provides the MySQL database driver for Kamailio.
 
 
 Package: kamailio-postgres-modules
 Package: kamailio-postgres-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         postgresql-client,
-         ${shlibs:Depends}
-Replaces: kamailio-postgres-module
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version}), postgresql-client
 Description: PostgreSQL database connectivity module for Kamailio
 Description: PostgreSQL database connectivity module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -120,10 +164,8 @@ Description: PostgreSQL database connectivity module for Kamailio
  This package provides the PostgreSQL database driver for Kamailio.
  This package provides the PostgreSQL database driver for Kamailio.
 
 
 Package: kamailio-cpl-modules
 Package: kamailio-cpl-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-cpl-module
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: CPL module (CPL interpreter engine) for Kamailio
 Description: CPL module (CPL interpreter engine) for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -133,23 +175,20 @@ Description: CPL module (CPL interpreter engine) for Kamailio
  Kamailio, turning Kamailio into a CPL server (storage and interpreter).
  Kamailio, turning Kamailio into a CPL server (storage and interpreter).
 
 
 Package: kamailio-radius-modules
 Package: kamailio-radius-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Description: radius modules for Kamailio
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: RADIUS modules for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides a set of Radius modules for Kamailio, for
- authentication, peering, group membership and messages URIs checking
- against a Radius Server.
+ This package provides a set of RADIUS modules for Kamailio, for
+ authentication, peering, group membership and messages URIs checking against a
+ RADIUS server.
 
 
 Package: kamailio-unixodbc-modules
 Package: kamailio-unixodbc-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-unixodbc-module
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: unixODBC database connectivity module for Kamailio
 Description: unixODBC database connectivity module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -158,9 +197,8 @@ Description: unixODBC database connectivity module for Kamailio
  This package provides the unixODBC database driver for Kamailio.
  This package provides the unixODBC database driver for Kamailio.
 
 
 Package: kamailio-presence-modules
 Package: kamailio-presence-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: SIMPLE presence modules for Kamailio
 Description: SIMPLE presence modules for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -170,35 +208,9 @@ Description: SIMPLE presence modules for Kamailio
  server and presence user agent for RICH presence, registrar-based presence,
  server and presence user agent for RICH presence, registrar-based presence,
  external triggered presence and XCAP support.
  external triggered presence and XCAP support.
 
 
-Package: kamailio-xml-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-xml-module,
-          kamailio-xmlrpc-module
-Provides: kamailio-xmlrpc-modules
-Description: XML based extensions for Kamailio's Management Interface
- 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.
- .
- This package provides:
- - the XMLRPC transport implementations for Kamailio's
- Management and Control Interface.
- - xmlops module for XPath operations in configuration file
-
-Package: kamailio-xmlrpc-modules
-Architecture: any
-Depends: kamailio-xml-modules (= ${binary:Version})
-Description: Transitional package for kamailio-xml-modules
- Dummy package for transition handling
-
 Package: kamailio-perl-modules
 Package: kamailio-perl-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-perl-module
-Conflicts: kamailio-perl-module
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: Perl extensions and database driver for Kamailio
 Description: Perl extensions and database driver for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -208,11 +220,8 @@ Description: Perl extensions and database driver for Kamailio
  the perlvdb database driver for Kamailio.
  the perlvdb database driver for Kamailio.
 
 
 Package: kamailio-snmpstats-modules
 Package: kamailio-snmpstats-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         snmpd,
-         ${shlibs:Depends}
-Replaces: kamailio-snmpstats-module
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version}), snmpd
 Description: SNMP AgentX subagent module for Kamailio
 Description: SNMP AgentX subagent module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -222,10 +231,8 @@ Description: SNMP AgentX subagent module for Kamailio
  as an AgentX subagent which connects to a master agent.
  as an AgentX subagent which connects to a master agent.
 
 
 Package: kamailio-xmpp-modules
 Package: kamailio-xmpp-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-xmpp-module
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: XMPP gateway module for Kamailio
 Description: XMPP gateway module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -233,12 +240,25 @@ Description: XMPP gateway module for Kamailio
  .
  .
  This package provides the SIP to XMPP IM translator module for Kamailio.
  This package provides the SIP to XMPP IM translator module for Kamailio.
 
 
+Package: kamailio-xml-modules
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Replaces: kamailio-xml-module, kamailio-xmlrpc-module
+Provides: kamailio-xmlrpc-modules
+Description: XML based extensions for Kamailio's Management Interface
+ 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.
+ .
+ This package provides:
+ - the XMLRPC transport implementations for Kamailio's
+ Management and Control Interface.
+ - xmlops module for XPath operations in configuration file
+
 Package: kamailio-carrierroute-modules
 Package: kamailio-carrierroute-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-carrierroute-module
-Description: Carrierroute module for Kamailio
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: carrierroute module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
@@ -247,24 +267,32 @@ Description: Carrierroute module for Kamailio
  solution for routing, balancing and blacklisting.
  solution for routing, balancing and blacklisting.
 
 
 Package: kamailio-berkeley-modules
 Package: kamailio-berkeley-modules
-Architecture: any
-Depends: db4.6-util,
-         kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-berkeley-module
-Description: Berkeley Database module for Kamailio
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version}), db5.1-util
+Description: Berkeley database module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides the berkeley database module for Kamailio, a
+ This package provides the Berkeley database module for Kamailio, a
  high-performance embedded DB kernel. All database tables are stored
  high-performance embedded DB kernel. All database tables are stored
  in files, no additional server is necessary.
  in files, no additional server is necessary.
 
 
+Package: kamailio-berkeley-bin
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: Berkeley database module for Kamailio - helper program
+ 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.
+ .
+ This package provides helper modules for the Berkeley database module for
+ Kamailio, a high-performance embedded DB kernel. You should normally
+ install kamailio-berkeley-modules and not this package directly.
+
 Package: kamailio-ldap-modules
 Package: kamailio-ldap-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: LDAP modules for Kamailio
 Description: LDAP modules for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -274,11 +302,20 @@ Description: LDAP modules for Kamailio
  queries from the Kamailio config and storage of SIP account data in an LDAP
  queries from the Kamailio config and storage of SIP account data in an LDAP
  directory.
  directory.
 
 
+Package: kamailio-ims-modules
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: IMS module for Kamailio
+ 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.
+ .
+ This package contains various Diameter interfaces and modules for Kamailio
+ to run as an IMS core.
+
 Package: kamailio-utils-modules
 Package: kamailio-utils-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-utils-module
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: Provides a set utility functions for Kamailio
 Description: Provides a set utility functions for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -287,88 +324,52 @@ Description: Provides a set utility functions for Kamailio
  Provides a set of utility functions for Kamailio, which are not related
  Provides a set of utility functions for Kamailio, which are not related
  to the server configuration.
  to the server configuration.
 
 
-Package: kamailio-memcached-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-memcached-module
-Description: Provides the memcached module, an interface to the memcached server
+Package: kamailio-sctp-modules
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: sctp module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides the memcached module, an interface to the memcached
- server, a high-performance, distributed memory object caching system.
+ This package provides the sctp module for Kamailio.
 
 
 Package: kamailio-tls-modules
 Package: kamailio-tls-modules
-Architecture: any
-Depends: kamailio (= ${Source-Version}),
-         ${shlibs:Depends}
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: contains the TLS kamailio transport module
 Description: contains the TLS kamailio transport module
- This has been split out of the main kamailio package, so that kamailio will not
- depend on openssl. This module will enable you to use the TLS transport.
+ This has been split out of the main kamailio package, so that kamailio will
+ not depend on openssl. This module will enable you to use the TLS transport.
 
 
-Package: kamailio-lua-modules
-Architecture: any
-Depends: kamailio (= ${Source-Version}),
-         ${shlibs:Depends}
-Description: contains the app_lua module
- 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.
- .
- This package provides the app_lua module, an extension allowing to
- execute embedded Lua applications within configuration file.
-
-Package: kamailio-python-modules
-Architecture: any
-Depends: kamailio (= ${Source-Version}),
-         ${shlibs:Depends}
-Description: contains the app_python module
- 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.
- .
- This package provides the app_python module, an extension allowing to
- execute embedded Python applications within configuration file.
-
-Package: kamailio-geoip-modules
-Architecture: any
-Depends: kamailio (= ${Source-Version}),
-         ${shlibs:Depends}
-Description: contains the geoip module
+Package: kamailio-outbound-modules
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: Outbound module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides the geoip module, an extension allowing to
- use GeoIP API within configuration file.
+ This package contains the module implementing SIP outbound extension.
 
 
-Package: kamailio-sqlite-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         libsqlite3-0,
-         ${shlibs:Depends}
-Description: SQLite database connectivity module for Kamailio
+Package: kamailio-websocket-modules
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: Websocket module for kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides the SQLite database driver for Kamailio.
+ This package contains the module implementing WebSocket transport layer.
 
 
-Package: kamailio-json-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         libevent-1.4-2,
-         libjson0,
-         ${shlibs:Depends}
-Description: Json parser and jsonrpc modules for Kamailio
+Package: kamailio-autheph-modules
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: authentication using ephemeral credentials module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides json parser for Kamailio's configuration file
- and the JSON-RPC client over netstrings.
+ This package provides the ephemeral module for Kamailio.
 
 
 Package: kamailio-nth
 Package: kamailio-nth
 Architecture: any
 Architecture: any
@@ -391,56 +392,3 @@ Depends: binutils,
 Description: Kamailio - package for "nice to have" installation
 Description: Kamailio - package for "nice to have" installation
  This is a meta-package for easy installation various useful tools that may be
  This is a meta-package for easy installation various useful tools that may be
  handy on server with Kamailio installed.
  handy on server with Kamailio installed.
-
-Package: kamailio-ims-modules
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: Kamailio - IMS Modules
- 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.
- .
- This package contains various Diameter interfaces and modules for Kamailio
- to run as an IMS core.
-
-Package: kamailio-outbound-modules
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: Kamailio - Outbound Module
- 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.
- .
- This package contains the module implementing SIP outbound extension.
-
-Package: kamailio-websocket-modules
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: Kamailio - Websocket Module
- 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.
- .
- This package contains the module implementing WebSocket transport layer.
-
-Package: kamailio-autheph-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Description: authentication using ephemeral credentials module for Kamailio
- 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.
- .
- This package provides the ephemeral module for Kamailio.
-
-Package: kamailio-sctp-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Description: authentication using ephemeral credentials module for Kamailio
- 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.
- .
- This package provides the sctp module for Kamailio.

+ 1 - 0
pkg/kamailio/deb/squeeze/kamailio-berkeley-bin.dirs

@@ -0,0 +1 @@
+usr/sbin

+ 4 - 3
pkg/kamailio/deb/squeeze/kamailio.README.Debian

@@ -1,5 +1,5 @@
 Kamailio for Debian
 Kamailio for Debian
-------------------
+-------------------
 
 
 * init script check for fork=no
 * init script check for fork=no
 -------------------------------
 -------------------------------
@@ -15,7 +15,7 @@ as a conffile.
 
 
 
 
 * Kamailio setup
 * Kamailio setup
----------------
+----------------
 
 
 To setup Kamailio, you need to:
 To setup Kamailio, you need to:
  - configure Kamailio properly to suit your needs
  - configure Kamailio properly to suit your needs
@@ -35,4 +35,5 @@ Set the DUMP_CORE parameter in /etc/default/kamailio to "yes" if you want to
 get a core dump in case Kamailio crashes. The debug symbols for Kamailio are
 get a core dump in case Kamailio crashes. The debug symbols for Kamailio are
 provided by the kamailio-dbg package.
 provided by the kamailio-dbg package.
 
 
--- Julien BLACHE <[email protected]>, Fri, 08 Sep 2006 14:43:21 +0200
+
+ -- Victor Seva <[email protected]>  Wed, 11 Dec 2013 16:07:11 +0100

+ 8 - 18
pkg/kamailio/deb/squeeze/kamailio.default

@@ -3,31 +3,21 @@
 #
 #
 
 
 # Set to yes to enable kamailio, once configured properly.
 # Set to yes to enable kamailio, once configured properly.
-RUN_KAMAILIO=no
+#RUN_KAMAILIO=yes
 
 
 # User to run as
 # User to run as
-USER=kamailio
+#USER=kamailio
 
 
 # Group to run as
 # Group to run as
-GROUP=kamailio
+#GROUP=kamailio
 
 
-# Amount of shared memory to allocate for the running Kamailio server (in Mb)
-SHM_MEMORY=64
-
-# Amount of private memory for each Kamailio process (in Mb)
-PKG_MEMORY=4
-
-# Switch to USER and GROUP by start-stop-daemon or by kamailio itself
-# - with recent kernels, changing user ID inside applicaton prevents
-#   dumping core files. If the value is 'yes', the suid is done by
-#   start-stop-daemon, otherwise it is done by kamailio itself
-SSD_SUID=no
+# Amount of memory to allocate for the running Kamailio server (in Mb)
+#MEMORY=64
 
 
 # Enable the server to leave a core file when it crashes.
 # Enable the server to leave a core file when it crashes.
 # Set this to 'yes' to enable Kamailio to leave a core file when it crashes
 # Set this to 'yes' to enable Kamailio to leave a core file when it crashes
 # or 'no' to disable this feature. This option is case sensitive and only
 # or 'no' to disable this feature. This option is case sensitive and only
 # accepts 'yes' and 'no' and only in lowercase letters.
 # accepts 'yes' and 'no' and only in lowercase letters.
-# On some systems (e.g. Ubuntu 6.10, Debian 4.0) it is necessary to specify
-# a directory for the core files to get a dump. Look into the kamailio
-# init file for an example configuration.
-DUMP_CORE=no
+# On some systems it is necessary to specify a directory for the core files
+# to get a dump. Look into the kamailio init file for an example configuration.
+#DUMP_CORE=yes

+ 100 - 179
pkg/kamailio/deb/squeeze/kamailio.init

@@ -3,238 +3,159 @@
 ### BEGIN INIT INFO
 ### BEGIN INIT INFO
 # Provides:          kamailio
 # Provides:          kamailio
 # Required-Start:    $syslog $network $local_fs $remote_fs $time
 # Required-Start:    $syslog $network $local_fs $remote_fs $time
+# Should-Start:      $named slapd mysql postgresql snmpd radiusd
+# Should-Stop:       $named slapd mysql postgresql snmpd radiusd
 # Required-Stop:     $syslog $network $local_fs $remote_fs
 # Required-Stop:     $syslog $network $local_fs $remote_fs
 # Default-Start:     2 3 4 5
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
 # Default-Stop:      0 1 6
-# Should-Start:      postgresql mysql radius
-# Should-Stop:       postgresql mysql radius
 # Short-Description: Start the Kamailio SIP proxy server
 # Short-Description: Start the Kamailio SIP proxy server
 # Description:       Start the Kamailio SIP proxy server
 # Description:       Start the Kamailio SIP proxy server
 ### END INIT INFO
 ### END INIT INFO
 
 
+. /lib/lsb/init-functions
 
 
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 DAEMON=/usr/sbin/kamailio
 DAEMON=/usr/sbin/kamailio
 NAME=kamailio
 NAME=kamailio
-DESC=Kamailio
+DESC="Kamailio SIP server"
 HOMEDIR=/var/run/kamailio
 HOMEDIR=/var/run/kamailio
 PIDFILE=$HOMEDIR/$NAME.pid
 PIDFILE=$HOMEDIR/$NAME.pid
 DEFAULTS=/etc/default/kamailio
 DEFAULTS=/etc/default/kamailio
-CFGFILE=/etc/kamailio/kamailio.cfg
 RUN_KAMAILIO=no
 RUN_KAMAILIO=no
-
+USER=kamailio
+GROUP=kamailio
+# Amount of memory to allocate for the running Kamailio server (in Mb)
+MEMORY=64
+DUMP_CORE=no
 
 
 # Do not start kamailio if fork=no is set in the config file
 # Do not start kamailio if fork=no is set in the config file
-# otherwise the boot process will just stop.
+# otherwise the boot process will just stop
 check_fork ()
 check_fork ()
 {
 {
-  if grep -q "^[[:space:]]*fork[[:space:]]*=[[:space:]]*no.*" $CFGFILE; then
-    echo "Not starting $DESC: fork=no specified in config file. Run /etc/init.d/kamailio debug instead."
-    exit 1
-  fi
+    if grep -q "^[[:space:]]*fork[[:space:]]*=[[:space:]]*no.*" /etc/kamailio/kamailio.cfg; then
+	log_failure_msg "Not starting $DESC: fork=no specified in config file; run /etc/init.d/kamailio debug instead"
+	exit 0
+    fi
 }
 }
 
 
-
 check_kamailio_config ()
 check_kamailio_config ()
 {
 {
-  # Check if kamailio configuration is valid before starting the server.
-  set +e
-  out=$($DAEMON -f $CFGFILE -M $PKG_MEMORY -c 2>&1 > /dev/null)
-  retcode=$?
-  set -e
-  if [ "$retcode" != '0' ]; then
-    echo "Not starting $DESC: invalid configuration file!"
-    echo -e "\n$out\n"
-    exit 1
-  fi
-}
-
-
-check_homedir ()
-{
-  # Create HOMEDIR directory in case it doesn't exist.
-  # Useful in Ubuntu as /var/run/ content is deleted in shutdown.
-  if [ ! -d $HOMEDIR ]; then
-    mkdir $HOMEDIR
-  fi
-
-  # Set the appropiate owner and group
-  chown ${USER}:${GROUP} $HOMEDIR
+	# Check if kamailio configuration is valid before starting the server
+	set +e
+	out=$($DAEMON -c 2>&1 > /dev/null)
+	retcode=$?
+	set -e
+	if [ "$retcode" != '0' ]; then
+	    log_failure_msg "Not starting $DESC: invalid configuration file!"
+	    log_failure_msg
+	    log_failure_msg "$out"
+	    log_faiulre_msg
+	    exit 1
+	fi
 }
 }
 
 
-
 create_radius_seqfile ()
 create_radius_seqfile ()
 {
 {
-  # Create a radius sequence file to be used by the radius client if
-  # radius accounting is enabled. This is needed to avoid any issue
-  # with the file not being writable if kamailio first starts as user
-  # root because DUMP_CORE is enabled and creates this file as user
-  # root and then later it switches back to user kamailio and cannot
-  # write to the file. If the file exists before kamailio starts, it
-  # won't change it's ownership and will be writable for both root
-  # and kamailio, no matter what options are chosen at install time
-  RADIUS_SEQ_FILE=$HOMEDIR/kamailio_radius.seq
-
-  if [ ! -f $RADIUS_SEQ_FILE ]; then
-      touch $RADIUS_SEQ_FILE
-  fi
-
-  chown ${USER}:${GROUP} $RADIUS_SEQ_FILE
-  chmod 660 $RADIUS_SEQ_FILE
+    # Create a radius sequence file to be used by the radius client if
+    # radius accounting is enabled. This is needed to avoid any issue
+    # with the file not being writable if kamailio first starts as user
+    # root because DUMP_CORE is enabled and creates this file as user
+    # root and then later it switches back to user kamailio and cannot
+    # write to the file. If the file exists before kamailio starts, it
+    # won't change it's ownership and will be writable for both root
+    # and kamailio, no matter what options are chosen at install time
+    RADIUS_SEQ_FILE=/var/run/kamailio/kamailio_radius.seq
+    if [ -d /var/run/kamailio ]; then
+	chown ${USER}:${GROUP} /var/run/kamailio
+
+	if [ ! -f $RADIUS_SEQ_FILE ]; then
+	    touch $RADIUS_SEQ_FILE
+	fi
+
+	chown ${USER}:${GROUP} $RADIUS_SEQ_FILE
+	chmod 660 $RADIUS_SEQ_FILE
+    fi
 }
 }
 
 
+test -f $DAEMON || exit 0
 
 
-if [ ! -f $DAEMON ]; then
-  echo "No $DESC daemon at $DAEMON."
-  case "$1" in
-  status)
-    # LSB - 4: program or service status is unknown.
-    exit 4
-    ;;
-  *)
-    # LSB - 5: program is not installed.
-    exit 5
-    ;;
-  esac
-fi
-
-
-# Load startup options if available.
+# Load startup options if available
 if [ -f $DEFAULTS ]; then
 if [ -f $DEFAULTS ]; then
-  . $DEFAULTS || true
+   . $DEFAULTS || true
 fi
 fi
 
 
-
 if [ "$RUN_KAMAILIO" != "yes" ]; then
 if [ "$RUN_KAMAILIO" != "yes" ]; then
-  echo "$DESC not yet configured. Edit $DEFAULTS first."
-  exit 0
+    log_failure_msg "Kamailio not yet configured. Edit /etc/default/kamailio first."
+    exit 0
 fi
 fi
 
 
-
 set -e
 set -e
 
 
-
-SHM_MEMORY=$((`echo $SHM_MEMORY | sed -e 's/[^0-9]//g'`))
-PKG_MEMORY=$((`echo $PKG_MEMORY | sed -e 's/[^0-9]//g'`))
-[ $SHM_MEMORY -le 0 ] && SHM_MEMORY=64
-[ $PKG_MEMORY -le 0 ] && PKG_MEMORY=4
+MEMORY=$((`echo $MEMORY | sed -e 's/[^0-9]//g'`))
 [ -z "$USER" ]  && USER=kamailio
 [ -z "$USER" ]  && USER=kamailio
 [ -z "$GROUP" ] && GROUP=kamailio
 [ -z "$GROUP" ] && GROUP=kamailio
-
+[ $MEMORY -le 0 ] && MEMORY=32
 
 
 if test "$DUMP_CORE" = "yes" ; then
 if test "$DUMP_CORE" = "yes" ; then
-  # set proper ulimit.
-  ulimit -c unlimited
-
-  # directory for the core dump files.
-  # COREDIR=/tmp/corefiles
-  # [ -d $COREDIR ] || mkdir $COREDIR
-  # chmod 777 $COREDIR
-  # echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
+    # set proper ulimit
+    ulimit -c unlimited
+    
+    # directory for the core dump files
+    # COREDIR=/home/corefiles
+    # [ -d $COREDIR ] || mkdir $COREDIR
+    # chmod 777 $COREDIR
+    # echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
 fi
 fi
 
 
-
-if [ "$SSD_SUID" != "yes" ]; then
-  OPTIONS="-f $CFGFILE -P $PIDFILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP"
-  SSDOPTS=""
-else
-  OPTIONS="-f $CFGFILE -P $PIDFILE -m $SHM_MEMORY -M $PKG_MEMORY"
-  SSDOPTS="--chuid $USER:$GROUP"
+# /var/run can be a tmpfs
+if [ ! -d $HOMEDIR ]; then
+    mkdir -p $HOMEDIR
 fi
 fi
 
 
-
-start_kamailio_daemon ()
-{
-  start-stop-daemon --start --quiet --pidfile $PIDFILE $SSDOPTS \
-    --exec $DAEMON -- $OPTIONS
-  res=$?
-
-  echo -n "$NAME "
-  if [ $res -eq 0 ] ; then
-    echo "started."
-    exit 0
-  else
-    if [ ! -r "$PIDFILE" ]; then
-      echo "error, failed to start."
-      exit 1
-    elif read pid < "$PIDFILE" && ps -p "$pid" > /dev/null 2>&1; then
-      echo "already running."
-      exit 0
-    else
-      echo "error, failed to start ($PIDFILE exists)."
-      exit 1
-    fi
-  fi
-}
-
+OPTIONS="-P $PIDFILE -m $MEMORY -u $USER -g $GROUP"
 
 
 case "$1" in
 case "$1" in
   start|debug)
   start|debug)
-    check_kamailio_config
-    check_homedir
-    create_radius_seqfile
-
-    if [ "$1" != "debug" ]; then
-      check_fork
-    fi
-
-    echo "Starting $DESC:"
-    set +e
-    start_kamailio_daemon
-    ;;
-
+	check_kamailio_config
+	create_radius_seqfile
+
+	if [ "$1" != "debug" ]; then
+	    check_fork
+	fi
+
+	log_daemon_msg "Starting $DESC: $NAME"
+	start-stop-daemon --start --quiet --pidfile $PIDFILE \
+		--exec $DAEMON -- $OPTIONS || log_failure_msg " already running"
+	log_end_msg 0
+	;;
   stop)
   stop)
-    echo -n "Stopping $DESC: $NAME "
-    set +e
-    start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
-      --exec $DAEMON
-
-    if [ $? -eq 0 ] ; then
-      echo "stopped."
-      exit 0
-    else
-      echo "failed to stop."
-      exit 1
-    fi
-    ;;
-    
+	log_daemon_msg "Stopping $DESC: $NAME"
+	start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
+		--exec $DAEMON
+	log_end_msg 0
+	;;
   restart|force-reload)
   restart|force-reload)
-    check_kamailio_config
-    check_homedir
-    create_radius_seqfile
-
-    echo "Restarting $DESC:"
-    set +e
-    start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE --retry=5 \
-      --exec $DAEMON
-    if [ $? -ne 0 ] ; then
-      echo "$NAME failed to stop."
-      exit 1
-    fi
-    start_kamailio_daemon
-    ;;
-
+	check_kamailio_config
+	create_radius_seqfile
+
+	log_daemon_msg "Restarting $DESC: $NAME"
+	start-stop-daemon --oknodo --stop --quiet --pidfile \
+		$PIDFILE --exec $DAEMON
+	sleep 1
+	start-stop-daemon --start --quiet --pidfile \
+		$PIDFILE --exec $DAEMON  -- $OPTIONS
+	log_end_msg 0
+	;;
   status)
   status)
-    echo -n "Status of $DESC: $NAME "
-    if [ ! -r "$PIDFILE" ]; then
-      echo "is not running."
-      exit 3
-    fi
-    if read pid < "$PIDFILE" && ps -p "$pid" > /dev/null 2>&1; then
-      echo "is running."
-      exit 0
-    else
-      echo "is not running but $PIDFILE exists."
-      exit 1
-    fi
-    ;;
-
+	log_daemon_msg "Status of $DESC: "
+	
+	status_of_porc "$PIDFILE" $NAME $NAME
+	;;
   *)
   *)
-    N=/etc/init.d/$NAME
-    echo "Usage: $N {start|stop|restart|force-reload|debug|status}" >&2
-    exit 1
-    ;;
+	N=/etc/init.d/$NAME
+	echo "Usage: $N {start|stop|restart|force-reload|status|debug}" >&2
+	exit 1
+	;;
 esac
 esac
 
 
-
 exit 0
 exit 0

+ 2 - 26
pkg/kamailio/deb/squeeze/kamailio.postinst

@@ -1,36 +1,12 @@
 #! /bin/sh
 #! /bin/sh
-#
-# $Id$
-
-PKG=kamailio
-DEFAULTS=/etc/default/kamailio
-HOMEDIR=/var/run/kamailio
 
 
 set -e
 set -e
 
 
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-#
-# quoting from the policy:
-#     Any necessary prompting should almost always be confined to the
-#     post-installation script, and should be protected with a conditional
-#     so that unnecessary prompting doesn't happen if a package's
-#     installation fails and the `postinst' is called with `abort-upgrade',
-#     `abort-remove' or `abort-deconfigure'.
-
 case "$1" in
 case "$1" in
     configure)
     configure)
         adduser --quiet --system --group --disabled-password \
         adduser --quiet --system --group --disabled-password \
-                --shell /bin/false --gecos "Kamailio" \
-                --home $HOMEDIR kamailio || true
+                --shell /bin/false --gecos "Kamailio SIP Server" \
+                --home /var/run/kamailio kamailio || true
 
 
         ;;
         ;;
 
 

+ 43 - 86
pkg/kamailio/deb/squeeze/rules

@@ -1,49 +1,37 @@
 #!/usr/bin/make -f
 #!/usr/bin/make -f
 # Sample debian/rules that uses debhelper.
 # Sample debian/rules that uses debhelper.
 # GNU copyright 1997 to 1999 by Joey Hess.
 # GNU copyright 1997 to 1999 by Joey Hess.
-#
-# $Id$
-#
-# History:
-# --------
-#  2009-07-08  updated for sip-router (andrei)
-#  2009-12-10  updated for kamailio 3.0 (daniel)
 
 
+DEBVERSION:=$(shell head -n 1 debian/changelog \
+                    | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION:=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
+
+FILENAME := kamailio_$(UPVERSION).orig.tar.gz
+URL := http://www.kamailio.org/pub/kamailio/$(UPVERSION)/src/kamailio-$(UPVERSION)_src.tar.gz
 
 
 # Uncomment this to turn on verbose mode.
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 #export DH_VERBOSE=1
 
 
-# This is the debhelper compatibility version to use.
-# export DH_COMPAT=4
-#  -- already set in compat
-export DEB_BUILD_OPTIONS:="$(DEB_BUILD_OPTIONS) debug"
+# java stuff using libgcj12
+export JAVA_HOME=/usr/lib/jvm/java-gcj-4.6
 
 
 # modules not in the "main" kamailio package
 # modules not in the "main" kamailio package
-EXCLUDED_MODULES= purple
+EXCLUDED_MODULES=
 
 
 # extra modules to skip, because they are not compilable now
 # extra modules to skip, because they are not compilable now
 # - regardless if they go to the main kamailio package or to some module package,
 # - regardless if they go to the main kamailio package or to some module package,
 # they will be excluded from compile and install of all
 # they will be excluded from compile and install of all
-EXTRA_EXCLUDED_MODULES=bdb dbtext oracle pa iptrtpproxy
-#EXTRA_EXCLUDED_MODULES=
-
-# possible module directories that can appear in MODULES_SP
-# (only used for deducing a module name)
-MDIRS=modules
-
-# modules packaged in separate packages (complete with full modules_* path)
-# with the package name: kamailio-$(module_name)-module
-MODULES_SP=
+EXTRA_EXCLUDED_MODULES=bdb dbtext oracle pa iptrtpproxy purple
 
 
 # module groups that are packaged in seperate packages
 # module groups that are packaged in seperate packages
 # (with the name kamailio-$(group_name)-modules)
 # (with the name kamailio-$(group_name)-modules)
 # Note: the order is important (should be in dependency order, the one
 # Note: the order is important (should be in dependency order, the one
 # on which other depend first)
 # on which other depend first)
 PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
 PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
-			   ldap xml perl utils geoip memcached tls \
-			   snmpstats carrierroute xmpp cpl lua python \
-			   sqlite json ims outbound websocket \
-			   autheph sctp
+			   ldap xml perl utils lua memcached \
+			   snmpstats carrierroute xmpp cpl python geoip\
+			   sqlite json ims sctp \
+			   tls outbound websocket autheph
 
 
 # name of libdir in the path for libraries (e.g., lib for 32b, lib64 for 64b)
 # name of libdir in the path for libraries (e.g., lib for 32b, lib64 for 64b)
 LIBDIR ?= lib
 LIBDIR ?= lib
@@ -53,9 +41,6 @@ LIBDIR ?= lib
 DUP_LIBS_DIRS=$(CURDIR)/debian/kamailio/usr/$(LIBDIR)/kamailio \
 DUP_LIBS_DIRS=$(CURDIR)/debian/kamailio/usr/$(LIBDIR)/kamailio \
 			$(CURDIR)/debian/kamailio-db-modules/usr/$(LIBDIR)/kamailio
 			$(CURDIR)/debian/kamailio-db-modules/usr/$(LIBDIR)/kamailio
 
 
-# modules names out of modules sp
-MODULES_SP_NAMES=$(filter-out $(MDIRS),$(subst /, ,$(MODULES_SP)))
-
 # "function" to get package short name out of a dir/module_name
 # "function" to get package short name out of a dir/module_name
 # it also transforms db_foo into foo
 # it also transforms db_foo into foo
 mod_name=$(subst db_,,$(lastword $(subst /, ,$(1))))
 mod_name=$(subst db_,,$(lastword $(subst /, ,$(1))))
@@ -68,53 +53,25 @@ define PACKAGE_GRP_BUILD_template
 endef
 endef
 
 
 
 
-define PACKAGE_MODULE_BUILD_template
-	# package all the modules MODULES_SP in separate packages
-	$(foreach mod,$(MODULES_SP),\
-		$(MAKE) modules modules="$(mod)"
-	)
-endef
-
-
 define PACKAGE_GRP_INSTALL_template
 define PACKAGE_GRP_INSTALL_template
 	$(foreach grp,$(PACKAGE_GROUPS),\
 	$(foreach grp,$(PACKAGE_GROUPS),\
-		$(MAKE) install-modules-all group_include="k$(grp)" \
+		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
 		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		doc-dir=share/doc/kamailio-$(grp)-modules
 		doc-dir=share/doc/kamailio-$(grp)-modules
 		# eliminate duplicate libs
 		# eliminate duplicate libs
 		-for d in $(DUP_LIBS_DIRS); do \
 		-for d in $(DUP_LIBS_DIRS); do \
 			test "$$d" != "$(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio" &&\
 			test "$$d" != "$(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio" &&\
-			for r in $$d/lib*; do \
-				if [ "$$r" != "$$d/lib*" ]; then \
-					echo "removing $(grp) lib `basename $$r` present also in $$d";\
-					rm -f $(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
-				fi \
+			for r in `find $$d -name 'lib*'|xargs`; do \
+				echo "removing $(grp) lib `basename $$r` present also in $$d";\
+				rm -f $(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
 			done ; \
 			done ; \
 		done
 		done
+		find $(CURDIR)/debian/kamailio-$(grp)-modules -depth -empty -type d -exec rmdir {} \;
 	)
 	)
 endef
 endef
 
 
 
 
-define PACKAGE_MODULE_INSTALL_template
-	$(foreach mod,$(MODULES_SP),
-		$(MAKE) install-modules-all modules="$(mod)" \
-				modules_s="" modules_k="" \
-				basedir=$(CURDIR)/debian/kamailio-$(call mod_name,$(mod))-module \
-				doc-dir=share/doc/kamailio-$(call mod_name,$(mod))-module
-		# eliminate duplicate libs
-		-for d in $(DUP_LIBS_DIRS); do \
-			test "$$d" != "$(CURDIR)/debian/kamailio-$(call mod_name,$(mod))-module/usr/$(LIBDIR)/kamailio" &&\
-			for r in $$d/lib*; do \
-				if [ "$$r" != "$$d/lib*" ]; then \
-					echo "removing $(call mod_name, $(mod)) lib `basename $$r` present also in $$d";\
-					rm -f $(CURDIR)/debian/kamailio-$(call mod_name,$(mod))-module/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
-				fi \
-			done ; \
-		done
-	)
-endef
-
 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
 	CFLAGS += -g
 	CFLAGS += -g
 endif
 endif
@@ -131,16 +88,16 @@ configure-stamp:
 			basedir=$(CURDIR)/debian/kamailio \
 			basedir=$(CURDIR)/debian/kamailio \
 			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
 			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
 			group_include="kstandard"
 			group_include="kstandard"
-
 	touch configure-stamp
 	touch configure-stamp
 
 
 
 
 build: build-stamp
 build: build-stamp
-
-build-stamp: configure-stamp 
+build-arch: build-stamp
+build-indep: build-stamp
+build-stamp: configure-stamp
 	dh_testdir
 	dh_testdir
 	# Add here commands to compile the package.
 	# Add here commands to compile the package.
-	$(MAKE) all
+	$(MAKE) all quiet=verbose
 	# make groups
 	# make groups
 	$(call PACKAGE_GRP_BUILD_template)
 	$(call PACKAGE_GRP_BUILD_template)
 	# make single-module packages
 	# make single-module packages
@@ -152,57 +109,47 @@ clean:
 	dh_testroot
 	dh_testroot
 	rm -f build-stamp configure-stamp
 	rm -f build-stamp configure-stamp
 	# Add here commands to clean up after the build process.
 	# Add here commands to clean up after the build process.
-	-$(MAKE) maintainer-clean
+	$(MAKE) maintainer-clean
 	dh_clean
 	dh_clean
 
 
 install: build
 install: build
 	dh_testdir
 	dh_testdir
 	dh_testroot
 	dh_testroot
-	dh_clean -k
+	dh_prep
 	dh_installdirs
 	dh_installdirs
 	# Add here commands to install the package into debian/kamailio
 	# Add here commands to install the package into debian/kamailio
-	$(MAKE) install group_include="kstandard"
-	# fix etc/kamailio dir location -- not needed -- andrei
-	# mv -f $(CURDIR)/debian/kamailio/usr/etc $(CURDIR)/debian/kamailio
+	$(MAKE) install LIBDIR=$(LIBDIR) group_include="kstandard"
 	# make group packages
 	# make group packages
 	$(call PACKAGE_GRP_INSTALL_template)
 	$(call PACKAGE_GRP_INSTALL_template)
-	# make single module packages
-	$(call PACKAGE_MODULE_INSTALL_template)
+	mv $(CURDIR)/debian/kamailio-berkeley-modules/usr/sbin/kambdb_recover \
+		$(CURDIR)/debian/kamailio-berkeley-bin/usr/sbin/kambdb_recover
 	# install /etc/default/kamailio file
 	# install /etc/default/kamailio file
 	mkdir -p $(CURDIR)/debian/kamailio/etc/default
 	mkdir -p $(CURDIR)/debian/kamailio/etc/default
 	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
 	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
-	#dh_movefiles
-
 
 
 
 
 # This single target is used to build all the packages, all at once, or
 # This single target is used to build all the packages, all at once, or
 # one at a time. So keep in mind: any options passed to commands here will
 # one at a time. So keep in mind: any options passed to commands here will
 # affect _all_ packages. Anything you want to only affect one package
 # affect _all_ packages. Anything you want to only affect one package
 # should be put in another target, such as the install target.
 # should be put in another target, such as the install target.
-binary-common: 
+binary-common:
 	dh_testdir
 	dh_testdir
 	dh_testroot
 	dh_testroot
-	dh_installdebconf	
+	dh_installdebconf
 	dh_installdocs
 	dh_installdocs
 	dh_installexamples
 	dh_installexamples
 	dh_installmenu
 	dh_installmenu
-#	dh_installlogrotate
-#	dh_installemacsen
-#	dh_installpam
-#	dh_installmime
-	dh_installinit  -- defaults 23
+	dh_installinit -pkamailio -- defaults 23
 	dh_installcron
 	dh_installcron
 	dh_installman
 	dh_installman
 	dh_installinfo
 	dh_installinfo
-#	dh_undocumented
-	dh_installchangelogs ChangeLog 
+	dh_installchangelogs ChangeLog
 	dh_link
 	dh_link
 	dh_strip --dbg-package=kamailio-dbg
 	dh_strip --dbg-package=kamailio-dbg
-	dh_compress 
+	dh_compress
 	dh_fixperms
 	dh_fixperms
 	dh_makeshlibs
 	dh_makeshlibs
 	dh_installdeb
 	dh_installdeb
-#	dh_perl
 	dh_shlibdeps
 	dh_shlibdeps
 	dh_gencontrol
 	dh_gencontrol
 	dh_md5sums
 	dh_md5sums
@@ -223,6 +170,16 @@ binary-arch: build install
 binary-%: build install
 binary-%: build install
 	$(MAKE) -f debian/rules binary-common DH_OPTIONS=-p$*
 	$(MAKE) -f debian/rules binary-common DH_OPTIONS=-p$*
 
 
+print-version:
+	@@echo "Debian version:          $(DEBVERSION)"
+	@@echo "Upstream version:        $(UPVERSION)"
+
+get-orig-source:
+	@@dh_testdir
+	@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
+	@@echo Downloading $(FILENAME) from $(URL) ...
+	@@wget -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL)
+
 binary: binary-indep binary-arch
 binary: binary-indep binary-arch
 .PHONY: build clean binary-indep binary-arch binary install configure
 .PHONY: build clean binary-indep binary-arch binary install configure
 
 

+ 1 - 0
pkg/kamailio/deb/squeeze/source/format

@@ -0,0 +1 @@
+3.0 (native)

+ 3 - 0
pkg/kamailio/deb/squeeze/watch

@@ -0,0 +1,3 @@
+version=3
+opts=dversionmangle=s/\~svn([\d]+)//; \
+http://www.kamailio.org/pub/kamailio/([\d.]+)/src/kamailio-([\d.]+)_src\.tar\.gz

+ 1 - 1
pkg/kamailio/deb/wheezy/compat

@@ -1 +1 @@
-5
+9

+ 311 - 304
pkg/kamailio/deb/wheezy/control

@@ -1,77 +1,56 @@
 Source: kamailio
 Source: kamailio
 Section: net
 Section: net
 Priority: optional
 Priority: optional
-Maintainer: Jon Bonilla <[email protected]>
+Maintainer: Debian VoIP Team <[email protected]>
+Uploaders: Victor Seva <[email protected]>, Tzafrir Cohen <[email protected]>
 Build-Depends: bison,
 Build-Depends: bison,
-               debhelper (>= 5),
-               docbook-xml,
-               dpatch,
-               dpkg-dev (>= 1.13.19),
-               flex,
-               libconfuse-dev,
-               libcurl3-openssl-dev,
-               libdb-dev (>= 4.6.19),
-               libevent-dev,
-               libexpat1-dev,
-               libgcj12-dev,
-               libgeoip-dev (>= 1.4.5),
-               libhiredis-dev (>= 0.10.0),
-               libjson0-dev,
-               libldap2-dev,
-               liblua5.1-0-dev,
-               libmemcached-dev,
-               libmono-2.0-dev,
-               libmysqlclient-dev,
-               libncurses5-dev,
-               libpcre3-dev,
-               libperl-dev,
-               libpq-dev,
-               libradiusclient-ng-dev,
-               libreadline-dev,
-               libsasl2-dev,
-               libsctp-dev,
-               libsnmp-dev,
-               libsqlite3-dev,
-               libssl-dev,
-               libxml2-dev,
-               libxmlrpc-c3-dev,
-               libunistring-dev,
-               openssl,
-               python,
-               python-dev,
-               unixodbc-dev,
-               xsltproc,
-               zlib1g-dev
-Standards-Version: 3.9.3
+    debhelper (>= 9),
+    docbook-xml,
+    dpkg-dev (>= 1.16.1.1),
+    flex,
+    libconfuse-dev,
+    libcurl4-openssl-dev,
+    libdb-dev (>= 4.6.19),
+    libevent-dev,
+    libexpat1-dev,
+    libgcj12-dev,
+    libgeoip-dev (>= 1.4.5),
+    libhiredis-dev (>= 0.10.0),
+    libjson0-dev,
+    libldap2-dev,
+    liblua5.1-0-dev,
+    libmemcached-dev,
+    libmono-2.0-dev,
+    libmysqlclient-dev,
+    libncurses5-dev,
+    libpcre3-dev,
+    libperl-dev,
+    libpq-dev,
+    libradiusclient-ng-dev,
+    libreadline-dev,
+    libsasl2-dev,
+    libsctp-dev,
+    libsnmp-dev,
+    libsqlite3-dev,
+    libunistring-dev,
+    libxml2-dev,
+    libxmlrpc-c3-dev,
+    openssl,
+    python,
+    python-dev,
+    unixodbc-dev,
+    xsltproc
+Standards-Version: 3.9.4
 Homepage: http://www.kamailio.org/
 Homepage: http://www.kamailio.org/
+Vcs-git: git://anonscm.debian.org/pkg-voip/kamailio.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-voip/kamailio.git
 
 
 Package: kamailio
 Package: kamailio
-Architecture: any
-Depends: adduser,
-         ${misc:Depends},
-         ${shlibs:Depends}
-Conflicts: kamailio-regex-modules
-Suggests: kamailio-autheph-modules,
-          kamailio-berkeley-modules,
-          kamailio-carrierroute-modules,
-          kamailio-cpl-modules,
-          kamailio-dbg,
-          kamailio-java-modules,
-          kamailio-ldap-modules,
-          kamailio-lua-modules,
-          kamailio-mono-modules,
-          kamailio-mysql-modules,
-          kamailio-perl-modules,
-          kamailio-postgres-modules,
-          kamailio-presence-modules,
-          kamailio-python-modules,
-          kamailio-radius-modules,
-          kamailio-sctp-modules,
-          kamailio-snmpstats-modules,
-          kamailio-tls-modules,
-          kamailio-unixodbc-modules,
-          kamailio-xml-modules,
-          kamailio-xmpp-modules
+Architecture: linux-any
+Multi-Arch: foreign
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, python, adduser
+Suggests: kamailio-mysql-modules, kamailio-postgres-modules, kamailio-unixodbc-modules, kamailio-cpl-modules, kamailio-radius-modules, kamailio-presence-modules, kamailio-xml-modules, kamailio-perl-modules, kamailio-snmpstats-modules, kamailio-xmpp-modules, kamailio-carrierroute-modules, kamailio-berkeley-modules, kamailio-ldap-modules, kamailio-python-modules, kamailio-redis-modules, kamailio-lua-modules, kamailio-mono-modules
 Description: very fast and configurable SIP proxy
 Description: very fast and configurable SIP proxy
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -81,31 +60,138 @@ Description: very fast and configurable SIP proxy
  behaviour. Its modular architecture allows only required functionality to be
  behaviour. Its modular architecture allows only required functionality to be
  loaded.
  loaded.
  .
  .
- Among others, the following modules are available: Digest Authentication, CPL
- scripts, Instant Messaging, MySQL support, Presence Agent, Radius
- Authentication, Record Routing, SMS Gateway, Jabber/XMPP Gateway, Transaction
- Module, Registrar and User Location, XMLRPC Interface.
+ Among others, the following modules are available: digest authentication, CPL
+ scripts, instant messaging, MySQL support, presence agent, RADIUS
+ authentication, record routing, SMS gateway, Jabber/XMPP gateway, transaction
+ module, registrar and user location, XML-RPC interface.
  .
  .
  This package contains the main Kamailio binary along with the principal modules
  This package contains the main Kamailio binary along with the principal modules
  and support binaries.
  and support binaries.
 
 
 Package: kamailio-dbg
 Package: kamailio-dbg
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Description: Debugging symbols for Kamailio SIP proxy
+Priority: extra
+Section: debug
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, kamailio (= ${binary:Version})
+Description: very fast and configurable SIP proxy [debug symbols]
+ 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.
+ .
+ This package contains the debugging symbols for the Kamailio binaries and
+ modules. You only need to install it if you need to debug Kamailio.
+
+Package: kamailio-geoip-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: contains the geoip module
+ 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.
+ .
+ This package provides the geoip module, an extension allowing to
+ use GeoIP API within configuration file.
+
+Package: kamailio-sqlite-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Recommends: sqlite3
+Description: SQLite database connectivity module for Kamailio
+ 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.
+ .
+ This package provides the SQLite database driver for Kamailio.
+
+Package: kamailio-json-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: Json parser and jsonrpc modules for Kamailio
+ 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.
+ .
+ This package provides json parser for Kamailio's configuration file
+ and the JSON-RPC client over netstrings.
+
+Package: kamailio-memcached-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Replaces: kamailio-memcached-module
+Description: Provides the memcached module, an interface to the memcached server
+ 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.
+ .
+ This package provides the memcached module, an interface to the memcached
+ server, a high-performance, distributed memory object caching system.
+
+Package: kamailio-lua-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: contains the app_lua module
+ 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.
+ .
+ This package provides the app_lua module, an extension allowing to
+ execute embedded Lua applications within configuration file.
+
+Package: kamailio-mono-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: contains the app_mono module
+ 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.
+ .
+ This package provides the app_mono module, an extension allowing to
+ execute embedded Mono applications within configuration file.
+
+Package: kamailio-python-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, python-dev, kamailio (= ${binary:Version})
+Description: contains the app_python module
+ 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.
+ .
+ This package provides the app_python module, an extension allowing to
+ execute embedded Python applications within configuration file.
+
+Package: kamailio-redis-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: Redis database connectivity module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides gdb debugging symbols  for Kamailio
+ This package provides the Redis NOSQL database driver for Kamailio.
 
 
 Package: kamailio-mysql-modules
 Package: kamailio-mysql-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         mysql-client,
-         ${shlibs:Depends}
-Replaces: kamailio-mysql-module
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version}), mysql-client
 Description: MySQL database connectivity module for Kamailio
 Description: MySQL database connectivity module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -114,11 +200,10 @@ Description: MySQL database connectivity module for Kamailio
  This package provides the MySQL database driver for Kamailio.
  This package provides the MySQL database driver for Kamailio.
 
 
 Package: kamailio-postgres-modules
 Package: kamailio-postgres-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         postgresql-client,
-         ${shlibs:Depends}
-Replaces: kamailio-postgres-module
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version}), postgresql-client
 Description: PostgreSQL database connectivity module for Kamailio
 Description: PostgreSQL database connectivity module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -127,10 +212,10 @@ Description: PostgreSQL database connectivity module for Kamailio
  This package provides the PostgreSQL database driver for Kamailio.
  This package provides the PostgreSQL database driver for Kamailio.
 
 
 Package: kamailio-cpl-modules
 Package: kamailio-cpl-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-cpl-module
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: CPL module (CPL interpreter engine) for Kamailio
 Description: CPL module (CPL interpreter engine) for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -140,23 +225,24 @@ Description: CPL module (CPL interpreter engine) for Kamailio
  Kamailio, turning Kamailio into a CPL server (storage and interpreter).
  Kamailio, turning Kamailio into a CPL server (storage and interpreter).
 
 
 Package: kamailio-radius-modules
 Package: kamailio-radius-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Description: radius modules for Kamailio
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: RADIUS modules for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides a set of Radius modules for Kamailio, for
- authentication, peering, group membership and messages URIs checking
- against a Radius Server.
+ This package provides a set of RADIUS modules for Kamailio, for
+ authentication, peering, group membership and messages URIs checking against a
+ RADIUS server.
 
 
 Package: kamailio-unixodbc-modules
 Package: kamailio-unixodbc-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-unixodbc-module
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: unixODBC database connectivity module for Kamailio
 Description: unixODBC database connectivity module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -165,9 +251,10 @@ Description: unixODBC database connectivity module for Kamailio
  This package provides the unixODBC database driver for Kamailio.
  This package provides the unixODBC database driver for Kamailio.
 
 
 Package: kamailio-presence-modules
 Package: kamailio-presence-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: SIMPLE presence modules for Kamailio
 Description: SIMPLE presence modules for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -177,35 +264,11 @@ Description: SIMPLE presence modules for Kamailio
  server and presence user agent for RICH presence, registrar-based presence,
  server and presence user agent for RICH presence, registrar-based presence,
  external triggered presence and XCAP support.
  external triggered presence and XCAP support.
 
 
-Package: kamailio-xml-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-xml-module,
-          kamailio-xmlrpc-module
-Provides: kamailio-xmlrpc-modules
-Description: XML based extensions for Kamailio's Management Interface
- 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.
- .
- This package provides:
- - the XMLRPC transport implementations for Kamailio's
- Management and Control Interface.
- - xmlops module for XPath operations in configuration file
-
-Package: kamailio-xmlrpc-modules
-Architecture: any
-Depends: kamailio-xml-modules (= ${binary:Version})
-Description: Transitional package for kamailio-xml-modules
- Dummy package for transition handling
-
 Package: kamailio-perl-modules
 Package: kamailio-perl-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-perl-module
-Conflicts: kamailio-perl-module
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: Perl extensions and database driver for Kamailio
 Description: Perl extensions and database driver for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -215,11 +278,10 @@ Description: Perl extensions and database driver for Kamailio
  the perlvdb database driver for Kamailio.
  the perlvdb database driver for Kamailio.
 
 
 Package: kamailio-snmpstats-modules
 Package: kamailio-snmpstats-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         snmpd,
-         ${shlibs:Depends}
-Replaces: kamailio-snmpstats-module
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version}), snmpd
 Description: SNMP AgentX subagent module for Kamailio
 Description: SNMP AgentX subagent module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -229,10 +291,10 @@ Description: SNMP AgentX subagent module for Kamailio
  as an AgentX subagent which connects to a master agent.
  as an AgentX subagent which connects to a master agent.
 
 
 Package: kamailio-xmpp-modules
 Package: kamailio-xmpp-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-xmpp-module
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
 Description: XMPP gateway module for Kamailio
 Description: XMPP gateway module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
@@ -240,12 +302,29 @@ Description: XMPP gateway module for Kamailio
  .
  .
  This package provides the SIP to XMPP IM translator module for Kamailio.
  This package provides the SIP to XMPP IM translator module for Kamailio.
 
 
+Package: kamailio-xml-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Replaces: kamailio-xml-module, kamailio-xmlrpc-module
+Provides: kamailio-xmlrpc-modules
+Description: XML based extensions for Kamailio's Management Interface
+ 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.
+ .
+ This package provides:
+ - the XMLRPC transport implementations for Kamailio's
+ Management and Control Interface.
+ - xmlops module for XPath operations in configuration file
+
 Package: kamailio-carrierroute-modules
 Package: kamailio-carrierroute-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-carrierroute-module
-Description: Carrierroute module for Kamailio
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: carrierroute module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
@@ -254,152 +333,146 @@ Description: Carrierroute module for Kamailio
  solution for routing, balancing and blacklisting.
  solution for routing, balancing and blacklisting.
 
 
 Package: kamailio-berkeley-modules
 Package: kamailio-berkeley-modules
-Architecture: any
-Depends: db4.6-util,
-         kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-berkeley-module
-Description: Berkeley Database module for Kamailio
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version}), db5.1-util
+Description: Berkeley database module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides the berkeley database module for Kamailio, a
+ This package provides the Berkeley database module for Kamailio, a
  high-performance embedded DB kernel. All database tables are stored
  high-performance embedded DB kernel. All database tables are stored
  in files, no additional server is necessary.
  in files, no additional server is necessary.
 
 
-Package: kamailio-ldap-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Description: LDAP modules for Kamailio
+Package: kamailio-berkeley-bin
+Architecture: linux-any
+Multi-Arch: foreign
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: Berkeley database module for Kamailio - helper program
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This 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.
+ This package provides helper modules for the Berkeley database module for
+ Kamailio, a high-performance embedded DB kernel. You should normally
+ install kamailio-berkeley-modules and not this package directly.
 
 
-Package: kamailio-utils-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-utils-module
-Description: Provides a set utility functions for Kamailio
+Package: kamailio-ldap-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: LDAP modules for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- Provides a set of utility functions for Kamailio, which are not related
- to the server configuration.
+ This 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: kamailio-memcached-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Replaces: kamailio-memcached-module
-Description: Provides the memcached module, an interface to the memcached server
+Package: kamailio-ims-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: IMS module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides the memcached module, an interface to the memcached
- server, a high-performance, distributed memory object caching system.
-
-Package: kamailio-tls-modules
-Architecture: any
-Depends: kamailio (= ${Source-Version}),
-         ${shlibs:Depends}
-Description: contains the TLS kamailio transport module
- This has been split out of the main kamailio package, so that kamailio will not
- depend on openssl. This module will enable you to use the TLS transport.
+ This package contains various Diameter interfaces and modules for Kamailio
+ to run as an IMS core.
 
 
-Package: kamailio-lua-modules
-Architecture: any
-Depends: kamailio (= ${Source-Version}),
-         ${shlibs:Depends}
-Description: contains the app_lua module
+Package: kamailio-utils-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: Provides a set utility functions for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides the app_lua module, an extension allowing to
- execute embedded Lua applications within configuration file.
+ Provides a set of utility functions for Kamailio, which are not related
+ to the server configuration.
 
 
-Package: kamailio-mono-modules
-Architecture: any
-Depends: kamailio (= ${Source-Version}),
-         ${shlibs:Depends}
-Description: contains the app_mono module
+Package: kamailio-sctp-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: sctp module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides the app_mono module, an extension allowing to
- execute embedded Mono applications within configuration file.
+ This package provides the sctp module for Kamailio.
 
 
-Package: kamailio-python-modules
-Architecture: any
-Depends: kamailio (= ${Source-Version}),
-         ${shlibs:Depends}
-Description: contains the app_python module
+Package: kamailio-java-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends},
+         ${shlibs:Depends},
+         gjc-jre,
+         kamailio (= ${binary:Version})
+Description: contains the app_java module
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides the app_python module, an extension allowing to
- execute embedded Python applications within configuration file.
+ This package provides the app_java module, an extension allowing to
+ execute embedded Java applications within configuration file.
 
 
-Package: kamailio-geoip-modules
-Architecture: any
-Depends: kamailio (= ${Source-Version}),
-         ${shlibs:Depends}
-Description: contains the geoip module
- 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.
- .
- This package provides the geoip module, an extension allowing to
- use GeoIP API within configuration file.
+Package: kamailio-tls-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: contains the TLS kamailio transport module
+ This has been split out of the main kamailio package, so that kamailio will
+ not depend on openssl. This module will enable you to use the TLS transport.
 
 
-Package: kamailio-redis-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         libhiredis0.10,
-         ${shlibs:Depends}
-Description: Redis database connectivity module for Kamailio
+Package: kamailio-outbound-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: Outbound module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides the Redis NOSQL database driver for Kamailio.
+ This package contains the module implementing SIP outbound extension.
 
 
-Package: kamailio-sqlite-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         libsqlite3-0,
-         ${shlibs:Depends}
-Description: SQLite database connectivity module for Kamailio
+Package: kamailio-websocket-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, kamailio (= ${binary:Version})
+Description: Websocket module for kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides the SQLite database driver for Kamailio.
+ This package contains the module implementing WebSocket transport layer.
 
 
-Package: kamailio-json-modules
-Architecture: any
+Package: kamailio-autheph-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
 Depends: kamailio (= ${binary:Version}),
 Depends: kamailio (= ${binary:Version}),
-         libevent-1.4-2,
-         libjson0,
          ${shlibs:Depends}
          ${shlibs:Depends}
-Description: Json parser and jsonrpc modules for Kamailio
+Description: authentication using ephemeral credentials module for Kamailio
  Kamailio is a very fast and flexible SIP (RFC3261)
  Kamailio is a very fast and flexible SIP (RFC3261)
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  proxy server. Written entirely in C, Kamailio can handle thousands calls
  per second even on low-budget hardware.
  per second even on low-budget hardware.
  .
  .
- This package provides json parser for Kamailio's configuration file
- and the JSON-RPC client over netstrings.
+ This package provides the ephemeral module for Kamailio.
 
 
 Package: kamailio-nth
 Package: kamailio-nth
 Architecture: any
 Architecture: any
@@ -422,69 +495,3 @@ Depends: binutils,
 Description: Kamailio - package for "nice to have" installation
 Description: Kamailio - package for "nice to have" installation
  This is a meta-package for easy installation various useful tools that may be
  This is a meta-package for easy installation various useful tools that may be
  handy on server with Kamailio installed.
  handy on server with Kamailio installed.
-
-Package: kamailio-ims-modules
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: Kamailio - IMS Modules
- 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.
- .
- This package contains various Diameter interfaces and modules for Kamailio
- to run as an IMS core.
-
-Package: kamailio-outbound-modules
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: Kamailio - Outbound Module
- 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.
- .
- This package contains the module implementing SIP outbound extension.
-
-Package: kamailio-websocket-modules
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: Kamailio - Websocket Module
- 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.
- .
- This package contains the module implementing WebSocket transport layer.
-
-Package: kamailio-autheph-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Description: authentication using ephemeral credentials module for Kamailio
- 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.
- .
- This package provides the ephemeral module for Kamailio.
-
-Package: kamailio-sctp-modules
-Architecture: any
-Depends: kamailio (= ${binary:Version}),
-         ${shlibs:Depends}
-Description: authentication using ephemeral credentials module for Kamailio
- 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.
- .
- This package provides the sctp module for Kamailio.
-
-Package: kamailio-java-modules
-Architecture: any
-Depends: kamailio (= ${Source-Version}),
-         gcj-jre,
-         ${shlibs:Depends}
-Description: contains the app_java module
- 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.
- .
- This package provides the app_java module, an extension allowing to
- execute embedded Java applications within configuration file.

+ 1 - 0
pkg/kamailio/deb/wheezy/kamailio-berkeley-bin.dirs

@@ -0,0 +1 @@
+usr/sbin

+ 4 - 3
pkg/kamailio/deb/wheezy/kamailio.README.Debian

@@ -1,5 +1,5 @@
 Kamailio for Debian
 Kamailio for Debian
-------------------
+-------------------
 
 
 * init script check for fork=no
 * init script check for fork=no
 -------------------------------
 -------------------------------
@@ -15,7 +15,7 @@ as a conffile.
 
 
 
 
 * Kamailio setup
 * Kamailio setup
----------------
+----------------
 
 
 To setup Kamailio, you need to:
 To setup Kamailio, you need to:
  - configure Kamailio properly to suit your needs
  - configure Kamailio properly to suit your needs
@@ -35,4 +35,5 @@ Set the DUMP_CORE parameter in /etc/default/kamailio to "yes" if you want to
 get a core dump in case Kamailio crashes. The debug symbols for Kamailio are
 get a core dump in case Kamailio crashes. The debug symbols for Kamailio are
 provided by the kamailio-dbg package.
 provided by the kamailio-dbg package.
 
 
--- Julien BLACHE <[email protected]>, Fri, 08 Sep 2006 14:43:21 +0200
+
+ -- Victor Seva <[email protected]>  Wed, 11 Dec 2013 16:07:11 +0100

+ 8 - 18
pkg/kamailio/deb/wheezy/kamailio.default

@@ -3,31 +3,21 @@
 #
 #
 
 
 # Set to yes to enable kamailio, once configured properly.
 # Set to yes to enable kamailio, once configured properly.
-RUN_KAMAILIO=no
+#RUN_KAMAILIO=yes
 
 
 # User to run as
 # User to run as
-USER=kamailio
+#USER=kamailio
 
 
 # Group to run as
 # Group to run as
-GROUP=kamailio
+#GROUP=kamailio
 
 
-# Amount of shared memory to allocate for the running Kamailio server (in Mb)
-SHM_MEMORY=64
-
-# Amount of private memory for each Kamailio process (in Mb)
-PKG_MEMORY=4
-
-# Switch to USER and GROUP by start-stop-daemon or by kamailio itself
-# - with recent kernels, changing user ID inside applicaton prevents
-#   dumping core files. If the value is 'yes', the suid is done by
-#   start-stop-daemon, otherwise it is done by kamailio itself
-SSD_SUID=no
+# Amount of memory to allocate for the running Kamailio server (in Mb)
+#MEMORY=64
 
 
 # Enable the server to leave a core file when it crashes.
 # Enable the server to leave a core file when it crashes.
 # Set this to 'yes' to enable Kamailio to leave a core file when it crashes
 # Set this to 'yes' to enable Kamailio to leave a core file when it crashes
 # or 'no' to disable this feature. This option is case sensitive and only
 # or 'no' to disable this feature. This option is case sensitive and only
 # accepts 'yes' and 'no' and only in lowercase letters.
 # accepts 'yes' and 'no' and only in lowercase letters.
-# On some systems (e.g. Ubuntu 6.10, Debian 4.0) it is necessary to specify
-# a directory for the core files to get a dump. Look into the kamailio
-# init file for an example configuration.
-DUMP_CORE=no
+# On some systems it is necessary to specify a directory for the core files
+# to get a dump. Look into the kamailio init file for an example configuration.
+#DUMP_CORE=yes

+ 100 - 179
pkg/kamailio/deb/wheezy/kamailio.init

@@ -3,238 +3,159 @@
 ### BEGIN INIT INFO
 ### BEGIN INIT INFO
 # Provides:          kamailio
 # Provides:          kamailio
 # Required-Start:    $syslog $network $local_fs $remote_fs $time
 # Required-Start:    $syslog $network $local_fs $remote_fs $time
+# Should-Start:      $named slapd mysql postgresql snmpd radiusd
+# Should-Stop:       $named slapd mysql postgresql snmpd radiusd
 # Required-Stop:     $syslog $network $local_fs $remote_fs
 # Required-Stop:     $syslog $network $local_fs $remote_fs
 # Default-Start:     2 3 4 5
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
 # Default-Stop:      0 1 6
-# Should-Start:      postgresql mysql radius
-# Should-Stop:       postgresql mysql radius
 # Short-Description: Start the Kamailio SIP proxy server
 # Short-Description: Start the Kamailio SIP proxy server
 # Description:       Start the Kamailio SIP proxy server
 # Description:       Start the Kamailio SIP proxy server
 ### END INIT INFO
 ### END INIT INFO
 
 
+. /lib/lsb/init-functions
 
 
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 DAEMON=/usr/sbin/kamailio
 DAEMON=/usr/sbin/kamailio
 NAME=kamailio
 NAME=kamailio
-DESC=Kamailio
+DESC="Kamailio SIP server"
 HOMEDIR=/var/run/kamailio
 HOMEDIR=/var/run/kamailio
 PIDFILE=$HOMEDIR/$NAME.pid
 PIDFILE=$HOMEDIR/$NAME.pid
 DEFAULTS=/etc/default/kamailio
 DEFAULTS=/etc/default/kamailio
-CFGFILE=/etc/kamailio/kamailio.cfg
 RUN_KAMAILIO=no
 RUN_KAMAILIO=no
-
+USER=kamailio
+GROUP=kamailio
+# Amount of memory to allocate for the running Kamailio server (in Mb)
+MEMORY=64
+DUMP_CORE=no
 
 
 # Do not start kamailio if fork=no is set in the config file
 # Do not start kamailio if fork=no is set in the config file
-# otherwise the boot process will just stop.
+# otherwise the boot process will just stop
 check_fork ()
 check_fork ()
 {
 {
-  if grep -q "^[[:space:]]*fork[[:space:]]*=[[:space:]]*no.*" $CFGFILE; then
-    echo "Not starting $DESC: fork=no specified in config file. Run /etc/init.d/kamailio debug instead."
-    exit 1
-  fi
+    if grep -q "^[[:space:]]*fork[[:space:]]*=[[:space:]]*no.*" /etc/kamailio/kamailio.cfg; then
+	log_failure_msg "Not starting $DESC: fork=no specified in config file; run /etc/init.d/kamailio debug instead"
+	exit 0
+    fi
 }
 }
 
 
-
 check_kamailio_config ()
 check_kamailio_config ()
 {
 {
-  # Check if kamailio configuration is valid before starting the server.
-  set +e
-  out=$($DAEMON -f $CFGFILE -M $PKG_MEMORY -c 2>&1 > /dev/null)
-  retcode=$?
-  set -e
-  if [ "$retcode" != '0' ]; then
-    echo "Not starting $DESC: invalid configuration file!"
-    echo -e "\n$out\n"
-    exit 1
-  fi
-}
-
-
-check_homedir ()
-{
-  # Create HOMEDIR directory in case it doesn't exist.
-  # Useful in Ubuntu as /var/run/ content is deleted in shutdown.
-  if [ ! -d $HOMEDIR ]; then
-    mkdir $HOMEDIR
-  fi
-
-  # Set the appropiate owner and group
-  chown ${USER}:${GROUP} $HOMEDIR
+	# Check if kamailio configuration is valid before starting the server
+	set +e
+	out=$($DAEMON -c 2>&1 > /dev/null)
+	retcode=$?
+	set -e
+	if [ "$retcode" != '0' ]; then
+	    log_failure_msg "Not starting $DESC: invalid configuration file!"
+	    log_failure_msg
+	    log_failure_msg "$out"
+	    log_faiulre_msg
+	    exit 1
+	fi
 }
 }
 
 
-
 create_radius_seqfile ()
 create_radius_seqfile ()
 {
 {
-  # Create a radius sequence file to be used by the radius client if
-  # radius accounting is enabled. This is needed to avoid any issue
-  # with the file not being writable if kamailio first starts as user
-  # root because DUMP_CORE is enabled and creates this file as user
-  # root and then later it switches back to user kamailio and cannot
-  # write to the file. If the file exists before kamailio starts, it
-  # won't change it's ownership and will be writable for both root
-  # and kamailio, no matter what options are chosen at install time
-  RADIUS_SEQ_FILE=$HOMEDIR/kamailio_radius.seq
-
-  if [ ! -f $RADIUS_SEQ_FILE ]; then
-      touch $RADIUS_SEQ_FILE
-  fi
-
-  chown ${USER}:${GROUP} $RADIUS_SEQ_FILE
-  chmod 660 $RADIUS_SEQ_FILE
+    # Create a radius sequence file to be used by the radius client if
+    # radius accounting is enabled. This is needed to avoid any issue
+    # with the file not being writable if kamailio first starts as user
+    # root because DUMP_CORE is enabled and creates this file as user
+    # root and then later it switches back to user kamailio and cannot
+    # write to the file. If the file exists before kamailio starts, it
+    # won't change it's ownership and will be writable for both root
+    # and kamailio, no matter what options are chosen at install time
+    RADIUS_SEQ_FILE=/var/run/kamailio/kamailio_radius.seq
+    if [ -d /var/run/kamailio ]; then
+	chown ${USER}:${GROUP} /var/run/kamailio
+
+	if [ ! -f $RADIUS_SEQ_FILE ]; then
+	    touch $RADIUS_SEQ_FILE
+	fi
+
+	chown ${USER}:${GROUP} $RADIUS_SEQ_FILE
+	chmod 660 $RADIUS_SEQ_FILE
+    fi
 }
 }
 
 
+test -f $DAEMON || exit 0
 
 
-if [ ! -f $DAEMON ]; then
-  echo "No $DESC daemon at $DAEMON."
-  case "$1" in
-  status)
-    # LSB - 4: program or service status is unknown.
-    exit 4
-    ;;
-  *)
-    # LSB - 5: program is not installed.
-    exit 5
-    ;;
-  esac
-fi
-
-
-# Load startup options if available.
+# Load startup options if available
 if [ -f $DEFAULTS ]; then
 if [ -f $DEFAULTS ]; then
-  . $DEFAULTS || true
+   . $DEFAULTS || true
 fi
 fi
 
 
-
 if [ "$RUN_KAMAILIO" != "yes" ]; then
 if [ "$RUN_KAMAILIO" != "yes" ]; then
-  echo "$DESC not yet configured. Edit $DEFAULTS first."
-  exit 0
+    log_failure_msg "Kamailio not yet configured. Edit /etc/default/kamailio first."
+    exit 0
 fi
 fi
 
 
-
 set -e
 set -e
 
 
-
-SHM_MEMORY=$((`echo $SHM_MEMORY | sed -e 's/[^0-9]//g'`))
-PKG_MEMORY=$((`echo $PKG_MEMORY | sed -e 's/[^0-9]//g'`))
-[ $SHM_MEMORY -le 0 ] && SHM_MEMORY=64
-[ $PKG_MEMORY -le 0 ] && PKG_MEMORY=4
+MEMORY=$((`echo $MEMORY | sed -e 's/[^0-9]//g'`))
 [ -z "$USER" ]  && USER=kamailio
 [ -z "$USER" ]  && USER=kamailio
 [ -z "$GROUP" ] && GROUP=kamailio
 [ -z "$GROUP" ] && GROUP=kamailio
-
+[ $MEMORY -le 0 ] && MEMORY=32
 
 
 if test "$DUMP_CORE" = "yes" ; then
 if test "$DUMP_CORE" = "yes" ; then
-  # set proper ulimit.
-  ulimit -c unlimited
-
-  # directory for the core dump files.
-  # COREDIR=/tmp/corefiles
-  # [ -d $COREDIR ] || mkdir $COREDIR
-  # chmod 777 $COREDIR
-  # echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
+    # set proper ulimit
+    ulimit -c unlimited
+    
+    # directory for the core dump files
+    # COREDIR=/home/corefiles
+    # [ -d $COREDIR ] || mkdir $COREDIR
+    # chmod 777 $COREDIR
+    # echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
 fi
 fi
 
 
-
-if [ "$SSD_SUID" != "yes" ]; then
-  OPTIONS="-f $CFGFILE -P $PIDFILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP"
-  SSDOPTS=""
-else
-  OPTIONS="-f $CFGFILE -P $PIDFILE -m $SHM_MEMORY -M $PKG_MEMORY"
-  SSDOPTS="--chuid $USER:$GROUP"
+# /var/run can be a tmpfs
+if [ ! -d $HOMEDIR ]; then
+    mkdir -p $HOMEDIR
 fi
 fi
 
 
-
-start_kamailio_daemon ()
-{
-  start-stop-daemon --start --quiet --pidfile $PIDFILE $SSDOPTS \
-    --exec $DAEMON -- $OPTIONS
-  res=$?
-
-  echo -n "$NAME "
-  if [ $res -eq 0 ] ; then
-    echo "started."
-    exit 0
-  else
-    if [ ! -r "$PIDFILE" ]; then
-      echo "error, failed to start."
-      exit 1
-    elif read pid < "$PIDFILE" && ps -p "$pid" > /dev/null 2>&1; then
-      echo "already running."
-      exit 0
-    else
-      echo "error, failed to start ($PIDFILE exists)."
-      exit 1
-    fi
-  fi
-}
-
+OPTIONS="-P $PIDFILE -m $MEMORY -u $USER -g $GROUP"
 
 
 case "$1" in
 case "$1" in
   start|debug)
   start|debug)
-    check_kamailio_config
-    check_homedir
-    create_radius_seqfile
-
-    if [ "$1" != "debug" ]; then
-      check_fork
-    fi
-
-    echo "Starting $DESC:"
-    set +e
-    start_kamailio_daemon
-    ;;
-
+	check_kamailio_config
+	create_radius_seqfile
+
+	if [ "$1" != "debug" ]; then
+	    check_fork
+	fi
+
+	log_daemon_msg "Starting $DESC: $NAME"
+	start-stop-daemon --start --quiet --pidfile $PIDFILE \
+		--exec $DAEMON -- $OPTIONS || log_failure_msg " already running"
+	log_end_msg 0
+	;;
   stop)
   stop)
-    echo -n "Stopping $DESC: $NAME "
-    set +e
-    start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
-      --exec $DAEMON
-
-    if [ $? -eq 0 ] ; then
-      echo "stopped."
-      exit 0
-    else
-      echo "failed to stop."
-      exit 1
-    fi
-    ;;
-    
+	log_daemon_msg "Stopping $DESC: $NAME"
+	start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
+		--exec $DAEMON
+	log_end_msg 0
+	;;
   restart|force-reload)
   restart|force-reload)
-    check_kamailio_config
-    check_homedir
-    create_radius_seqfile
-
-    echo "Restarting $DESC:"
-    set +e
-    start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE --retry=5 \
-      --exec $DAEMON
-    if [ $? -ne 0 ] ; then
-      echo "$NAME failed to stop."
-      exit 1
-    fi
-    start_kamailio_daemon
-    ;;
-
+	check_kamailio_config
+	create_radius_seqfile
+
+	log_daemon_msg "Restarting $DESC: $NAME"
+	start-stop-daemon --oknodo --stop --quiet --pidfile \
+		$PIDFILE --exec $DAEMON
+	sleep 1
+	start-stop-daemon --start --quiet --pidfile \
+		$PIDFILE --exec $DAEMON  -- $OPTIONS
+	log_end_msg 0
+	;;
   status)
   status)
-    echo -n "Status of $DESC: $NAME "
-    if [ ! -r "$PIDFILE" ]; then
-      echo "is not running."
-      exit 3
-    fi
-    if read pid < "$PIDFILE" && ps -p "$pid" > /dev/null 2>&1; then
-      echo "is running."
-      exit 0
-    else
-      echo "is not running but $PIDFILE exists."
-      exit 1
-    fi
-    ;;
-
+	log_daemon_msg "Status of $DESC: "
+	
+	status_of_porc "$PIDFILE" $NAME $NAME
+	;;
   *)
   *)
-    N=/etc/init.d/$NAME
-    echo "Usage: $N {start|stop|restart|force-reload|debug|status}" >&2
-    exit 1
-    ;;
+	N=/etc/init.d/$NAME
+	echo "Usage: $N {start|stop|restart|force-reload|status|debug}" >&2
+	exit 1
+	;;
 esac
 esac
 
 
-
 exit 0
 exit 0

+ 2 - 26
pkg/kamailio/deb/wheezy/kamailio.postinst

@@ -1,36 +1,12 @@
 #! /bin/sh
 #! /bin/sh
-#
-# $Id$
-
-PKG=kamailio
-DEFAULTS=/etc/default/kamailio
-HOMEDIR=/var/run/kamailio
 
 
 set -e
 set -e
 
 
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-#
-# quoting from the policy:
-#     Any necessary prompting should almost always be confined to the
-#     post-installation script, and should be protected with a conditional
-#     so that unnecessary prompting doesn't happen if a package's
-#     installation fails and the `postinst' is called with `abort-upgrade',
-#     `abort-remove' or `abort-deconfigure'.
-
 case "$1" in
 case "$1" in
     configure)
     configure)
         adduser --quiet --system --group --disabled-password \
         adduser --quiet --system --group --disabled-password \
-                --shell /bin/false --gecos "Kamailio" \
-                --home $HOMEDIR kamailio || true
+                --shell /bin/false --gecos "Kamailio SIP Server" \
+                --home /var/run/kamailio kamailio || true
 
 
         ;;
         ;;
 
 

+ 53 - 86
pkg/kamailio/deb/wheezy/rules

@@ -1,64 +1,52 @@
 #!/usr/bin/make -f
 #!/usr/bin/make -f
 # Sample debian/rules that uses debhelper.
 # Sample debian/rules that uses debhelper.
 # GNU copyright 1997 to 1999 by Joey Hess.
 # GNU copyright 1997 to 1999 by Joey Hess.
-#
-# $Id$
-#
-# History:
-# --------
-#  2009-07-08  updated for sip-router (andrei)
-#  2009-12-10  updated for kamailio 3.0 (daniel)
 
 
+DEBVERSION:=$(shell head -n 1 debian/changelog \
+                    | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION:=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
+
+FILENAME := kamailio_$(UPVERSION).orig.tar.gz
+URL := http://www.kamailio.org/pub/kamailio/$(UPVERSION)/src/kamailio-$(UPVERSION)_src.tar.gz
+
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
 
 
 # Uncomment this to turn on verbose mode.
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 #export DH_VERBOSE=1
 
 
-# This is the debhelper compatibility version to use.
-# export DH_COMPAT=4
-#  -- already set in compat
-export DEB_BUILD_OPTIONS:="$(DEB_BUILD_OPTIONS) debug"
-
 # java stuff using libgcj12
 # java stuff using libgcj12
 export JAVA_HOME=/usr/lib/jvm/java-gcj-4.6
 export JAVA_HOME=/usr/lib/jvm/java-gcj-4.6
 
 
 # modules not in the "main" kamailio package
 # modules not in the "main" kamailio package
-EXCLUDED_MODULES= 
+EXCLUDED_MODULES=
 
 
 # extra modules to skip, because they are not compilable now
 # extra modules to skip, because they are not compilable now
 # - regardless if they go to the main kamailio package or to some module package,
 # - regardless if they go to the main kamailio package or to some module package,
 # they will be excluded from compile and install of all
 # they will be excluded from compile and install of all
 EXTRA_EXCLUDED_MODULES=bdb dbtext oracle pa iptrtpproxy mi_xmlrpc purple
 EXTRA_EXCLUDED_MODULES=bdb dbtext oracle pa iptrtpproxy mi_xmlrpc purple
-#EXTRA_EXCLUDED_MODULES=
-
-# possible module directories that can appear in MODULES_SP
-# (only used for deducing a module name)
-MDIRS=modules
-
-# modules packaged in separate packages (complete with full modules_* path)
-# with the package name: kamailio-$(module_name)-module
-MODULES_SP=
 
 
 # module groups that are packaged in seperate packages
 # module groups that are packaged in seperate packages
 # (with the name kamailio-$(group_name)-modules)
 # (with the name kamailio-$(group_name)-modules)
 # Note: the order is important (should be in dependency order, the one
 # Note: the order is important (should be in dependency order, the one
 # on which other depend first)
 # on which other depend first)
 PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
 PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
-			   ldap xml perl utils lua memcached tls \
-			   snmpstats carrierroute xmpp cpl redis python geoip \
-			   sqlite json mono ims outbound websocket \
-			   autheph sctp java
+			   ldap xml perl utils lua memcached \
+			   snmpstats carrierroute xmpp cpl redis python geoip\
+			   sqlite json mono ims sctp java \
+			   tls outbound websocket autheph
 
 
 # name of libdir in the path for libraries (e.g., lib for 32b, lib64 for 64b)
 # name of libdir in the path for libraries (e.g., lib for 32b, lib64 for 64b)
-LIBDIR ?= lib
+LIBDIR ?= lib/$(DEB_HOST_MULTIARCH)
 
 
 # directories with possible duplicate libraries (that should be deleted
 # directories with possible duplicate libraries (that should be deleted
 # from current module* packages)
 # from current module* packages)
 DUP_LIBS_DIRS=$(CURDIR)/debian/kamailio/usr/$(LIBDIR)/kamailio \
 DUP_LIBS_DIRS=$(CURDIR)/debian/kamailio/usr/$(LIBDIR)/kamailio \
 			$(CURDIR)/debian/kamailio-db-modules/usr/$(LIBDIR)/kamailio
 			$(CURDIR)/debian/kamailio-db-modules/usr/$(LIBDIR)/kamailio
 
 
-# modules names out of modules sp
-MODULES_SP_NAMES=$(filter-out $(MDIRS),$(subst /, ,$(MODULES_SP)))
-
 # "function" to get package short name out of a dir/module_name
 # "function" to get package short name out of a dir/module_name
 # it also transforms db_foo into foo
 # it also transforms db_foo into foo
 mod_name=$(subst db_,,$(lastword $(subst /, ,$(1))))
 mod_name=$(subst db_,,$(lastword $(subst /, ,$(1))))
@@ -71,53 +59,25 @@ define PACKAGE_GRP_BUILD_template
 endef
 endef
 
 
 
 
-define PACKAGE_MODULE_BUILD_template
-	# package all the modules MODULES_SP in separate packages
-	$(foreach mod,$(MODULES_SP),\
-		$(MAKE) modules modules="$(mod)"
-	)
-endef
-
-
 define PACKAGE_GRP_INSTALL_template
 define PACKAGE_GRP_INSTALL_template
 	$(foreach grp,$(PACKAGE_GROUPS),\
 	$(foreach grp,$(PACKAGE_GROUPS),\
-		$(MAKE) install-modules-all group_include="k$(grp)" \
+		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
 		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		doc-dir=share/doc/kamailio-$(grp)-modules
 		doc-dir=share/doc/kamailio-$(grp)-modules
 		# eliminate duplicate libs
 		# eliminate duplicate libs
 		-for d in $(DUP_LIBS_DIRS); do \
 		-for d in $(DUP_LIBS_DIRS); do \
 			test "$$d" != "$(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio" &&\
 			test "$$d" != "$(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio" &&\
-			for r in $$d/lib*; do \
-				if [ "$$r" != "$$d/lib*" ]; then \
-					echo "removing $(grp) lib `basename $$r` present also in $$d";\
-					rm -f $(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
-				fi \
+			for r in `find $$d -name 'lib*'|xargs`; do \
+				echo "removing $(grp) lib `basename $$r` present also in $$d";\
+				rm -f $(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
 			done ; \
 			done ; \
 		done
 		done
+		find $(CURDIR)/debian/kamailio-$(grp)-modules -depth -empty -type d -exec rmdir {} \;
 	)
 	)
 endef
 endef
 
 
 
 
-define PACKAGE_MODULE_INSTALL_template
-	$(foreach mod,$(MODULES_SP),
-		$(MAKE) install-modules-all modules="$(mod)" \
-				modules_s="" modules_k="" \
-				basedir=$(CURDIR)/debian/kamailio-$(call mod_name,$(mod))-module \
-				doc-dir=share/doc/kamailio-$(call mod_name,$(mod))-module
-		# eliminate duplicate libs
-		-for d in $(DUP_LIBS_DIRS); do \
-			test "$$d" != "$(CURDIR)/debian/kamailio-$(call mod_name,$(mod))-module/usr/$(LIBDIR)/kamailio" &&\
-			for r in $$d/lib*; do \
-				if [ "$$r" != "$$d/lib*" ]; then \
-					echo "removing $(call mod_name, $(mod)) lib `basename $$r` present also in $$d";\
-					rm -f $(CURDIR)/debian/kamailio-$(call mod_name,$(mod))-module/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
-				fi \
-			done ; \
-		done
-	)
-endef
-
 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
 	CFLAGS += -g
 	CFLAGS += -g
 endif
 endif
@@ -125,6 +85,11 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 	INSTALL_PROGRAM += -s
 	INSTALL_PROGRAM += -s
 endif
 endif
 
 
+# CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
+# LDFLAGS -> LD_EXTRA_OPTS
+CUSTOM_BUILDFLAGS:=$(shell dpkg-buildflags --export=configure| \
+sed -e 's/" CPPFLAGS="/ /' -e 's/CFLAGS/CC_EXTRA_OPTS/g' -e 's/LDFLAGS/LD_EXTRA_OPTS/g')
+
 configure: configure-stamp
 configure: configure-stamp
 configure-stamp:
 configure-stamp:
 	dh_testdir
 	dh_testdir
@@ -133,17 +98,19 @@ configure-stamp:
 			cfg_target=/etc/kamailio/ \
 			cfg_target=/etc/kamailio/ \
 			basedir=$(CURDIR)/debian/kamailio \
 			basedir=$(CURDIR)/debian/kamailio \
 			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
 			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
+			$(CUSTOM_BUILDFLAGS) \
 			group_include="kstandard"
 			group_include="kstandard"
 
 
 	touch configure-stamp
 	touch configure-stamp
 
 
 
 
 build: build-stamp
 build: build-stamp
-
-build-stamp: configure-stamp 
+build-arch: build-stamp
+build-indep: build-stamp
+build-stamp: configure-stamp
 	dh_testdir
 	dh_testdir
 	# Add here commands to compile the package.
 	# Add here commands to compile the package.
-	$(MAKE) all
+	$(MAKE) all quiet=verbose
 	# make groups
 	# make groups
 	$(call PACKAGE_GRP_BUILD_template)
 	$(call PACKAGE_GRP_BUILD_template)
 	# make single-module packages
 	# make single-module packages
@@ -155,57 +122,47 @@ clean:
 	dh_testroot
 	dh_testroot
 	rm -f build-stamp configure-stamp
 	rm -f build-stamp configure-stamp
 	# Add here commands to clean up after the build process.
 	# Add here commands to clean up after the build process.
-	-$(MAKE) maintainer-clean
+	$(MAKE) maintainer-clean
 	dh_clean
 	dh_clean
 
 
 install: build
 install: build
 	dh_testdir
 	dh_testdir
 	dh_testroot
 	dh_testroot
-	dh_clean -k
+	dh_prep
 	dh_installdirs
 	dh_installdirs
 	# Add here commands to install the package into debian/kamailio
 	# Add here commands to install the package into debian/kamailio
-	$(MAKE) install group_include="kstandard"
-	# fix etc/kamailio dir location -- not needed -- andrei
-	# mv -f $(CURDIR)/debian/kamailio/usr/etc $(CURDIR)/debian/kamailio
+	$(MAKE) install LIBDIR=$(LIBDIR) group_include="kstandard"
 	# make group packages
 	# make group packages
 	$(call PACKAGE_GRP_INSTALL_template)
 	$(call PACKAGE_GRP_INSTALL_template)
-	# make single module packages
-	$(call PACKAGE_MODULE_INSTALL_template)
+	mv $(CURDIR)/debian/kamailio-berkeley-modules/usr/sbin/kambdb_recover \
+		$(CURDIR)/debian/kamailio-berkeley-bin/usr/sbin/kambdb_recover
 	# install /etc/default/kamailio file
 	# install /etc/default/kamailio file
 	mkdir -p $(CURDIR)/debian/kamailio/etc/default
 	mkdir -p $(CURDIR)/debian/kamailio/etc/default
 	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
 	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
-	#dh_movefiles
-
 
 
 
 
 # This single target is used to build all the packages, all at once, or
 # This single target is used to build all the packages, all at once, or
 # one at a time. So keep in mind: any options passed to commands here will
 # one at a time. So keep in mind: any options passed to commands here will
 # affect _all_ packages. Anything you want to only affect one package
 # affect _all_ packages. Anything you want to only affect one package
 # should be put in another target, such as the install target.
 # should be put in another target, such as the install target.
-binary-common: 
+binary-common:
 	dh_testdir
 	dh_testdir
 	dh_testroot
 	dh_testroot
-	dh_installdebconf	
+	dh_installdebconf
 	dh_installdocs
 	dh_installdocs
 	dh_installexamples
 	dh_installexamples
 	dh_installmenu
 	dh_installmenu
-#	dh_installlogrotate
-#	dh_installemacsen
-#	dh_installpam
-#	dh_installmime
-	dh_installinit  -- defaults 23
+	dh_installinit -pkamailio -- defaults 23
 	dh_installcron
 	dh_installcron
 	dh_installman
 	dh_installman
 	dh_installinfo
 	dh_installinfo
-#	dh_undocumented
-	dh_installchangelogs ChangeLog 
+	dh_installchangelogs ChangeLog
 	dh_link
 	dh_link
 	dh_strip --dbg-package=kamailio-dbg
 	dh_strip --dbg-package=kamailio-dbg
-	dh_compress 
+	dh_compress
 	dh_fixperms
 	dh_fixperms
 	dh_makeshlibs
 	dh_makeshlibs
 	dh_installdeb
 	dh_installdeb
-#	dh_perl
 	dh_shlibdeps
 	dh_shlibdeps
 	dh_gencontrol
 	dh_gencontrol
 	dh_md5sums
 	dh_md5sums
@@ -226,6 +183,16 @@ binary-arch: build install
 binary-%: build install
 binary-%: build install
 	$(MAKE) -f debian/rules binary-common DH_OPTIONS=-p$*
 	$(MAKE) -f debian/rules binary-common DH_OPTIONS=-p$*
 
 
+print-version:
+	@@echo "Debian version:          $(DEBVERSION)"
+	@@echo "Upstream version:        $(UPVERSION)"
+
+get-orig-source:
+	@@dh_testdir
+	@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
+	@@echo Downloading $(FILENAME) from $(URL) ...
+	@@wget -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL)
+
 binary: binary-indep binary-arch
 binary: binary-indep binary-arch
 .PHONY: build clean binary-indep binary-arch binary install configure
 .PHONY: build clean binary-indep binary-arch binary install configure
 
 

+ 1 - 0
pkg/kamailio/deb/wheezy/source/format

@@ -0,0 +1 @@
+3.0 (native)

+ 3 - 0
pkg/kamailio/deb/wheezy/watch

@@ -0,0 +1,3 @@
+version=3
+opts=dversionmangle=s/\~svn([\d]+)//; \
+http://www.kamailio.org/pub/kamailio/([\d.]+)/src/kamailio-([\d.]+)_src\.tar\.gz