Ver código fonte

PKG Debian version dependant changes

- debian-lenny is erased and symlinks now to debian
- debian-etch is recreated from debian. This provides consistency to all debian* folders
- Berkeley and purple modules excluded in debian-etch to avoid dependency problems
Jon Bonilla 15 anos atrás
pai
commit
aa2526dce7

+ 26 - 0
pkg/kamailio/debian-etch/changelog

@@ -10,6 +10,32 @@ kamailio (3.0.2) unstable; urgency=low
 
 
  -- Daniel-Constantin Mierla <[email protected]>  Thu, 27 May 2010 10:27:36 +0100
  -- Daniel-Constantin Mierla <[email protected]>  Thu, 27 May 2010 10:27:36 +0100
 
 
+kamailio (3.0.1) unstable; urgency=low
+
+  * update to 3.0.1 from upstream
+
+ -- Daniel-Constantin Mierla <[email protected]>  Mon, 08 Mar 2010 20:30:48 +0100
+
+kamailio (3.0.0) unstable; urgency=low
+
+  * update to 3.0.0 from upstream
+
+ -- Daniel-Constantin Mierla <[email protected]>  Mon, 11 Jan 2010 18:30:42 +0100
+
+kamailio (3.0.0-rc3) unstable; urgency=low
+
+  * update to 3.0.0-rc3 from upstream
+  * updated debian/rules to work with the SIP Router style module packaging
+
+ -- Daniel-Constantin Mierla <[email protected]>  Fri, 10 Dec 2009 12:10:02 +0100
+
+kamailio (3.0.0-rc2) unstable; urgency=low
+
+  * update to 3.0.0-rc2 from upstream
+  * updated debian/rules to work with the new style module packaging
+
+ -- Jonas Bergler <[email protected]>  Wed, 18 Nov 2009 12:30:02 +1300
+
 kamailio (1.5.0-svn1) unstable; urgency=low
 kamailio (1.5.0-svn1) unstable; urgency=low
 
 
   * increment debian packaging for trunk
   * increment debian packaging for trunk

+ 38 - 77
pkg/kamailio/debian-etch/control

@@ -3,13 +3,15 @@ Section: net
 Priority: optional
 Priority: optional
 Maintainer: Debian VoIP Team <[email protected]>
 Maintainer: Debian VoIP Team <[email protected]>
 Uploaders: Kilian Krause <[email protected]>
 Uploaders: Kilian Krause <[email protected]>
-Build-Depends: debhelper (>= 5), dpatch, libmysqlclient15-dev, libexpat1-dev, libxml2-dev, libpq-dev, libradiusclient-ng-dev, flex, bison, zlib1g-dev, unixodbc-dev, libxmlrpc-c3-dev, libperl-dev, libsnmp-dev, dpkg-dev (>= 1.13.19), libdb4.4-dev , xsltproc, libconfuse-dev, libldap2-dev, libcurl3-gnutls-dev, python, libpcre3-dev, docbook-xml, libpurple-dev, libmemcache-dev
-Standards-Version: 3.7.2
+Build-Depends: debhelper (>= 5), dpatch, libmysqlclient-dev, libexpat1-dev, libxml2-dev, libpq-dev, libradiusclient-ng-dev, flex, bison, zlib1g-dev, unixodbc-dev, libperl-dev, libsnmp-dev, dpkg-dev (>= 1.13.19), xsltproc, libconfuse-dev, libldap2-dev, libssl-dev, libcurl3-openssl-dev, python, libpcre3-dev, docbook-xml, libmemcache-dev, libreadline5-dev
+Standards-Version: 3.8.0
+Homepage: http://www.kamailio.org/
 
 
 Package: kamailio
 Package: kamailio
 Architecture: any
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
 Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
-Suggests: kamailio-mysql-module, kamailio-postgres-module, kamailio-unixodbc-module, kamailio-jabber-module, kamailio-cpl-module, kamailio-radius-modules, kamailio-presence-modules, kamailio-xmlrpc-module, kamailio-perl-modules, kamailio-snmpstats-module, kamailio-xmpp-module, kamailio-carrierroute-module, kamailio-berkeley-module, kamailio-ldap-modules
+Conflicts: kamailio-regex-modules, kamailio-dbg, kamailio-xmlrpc-modules, kamailio-xmlrpc-module, kamailio-berkeley-modules, kamailio-berkeley-module, kamailio-purple-modules, kamailio-purple-module
+Suggests: kamailio-mysql-modules, kamailio-postgres-modules, kamailio-unixodbc-modules, kamailio-tls-modules, kamailio-cpl-modules, kamailio-radius-modules, kamailio-presence-modules, kamailio-perl-modules, kamailio-snmpstats-modules, kamailio-xmpp-modules, kamailio-carrierroute-modules, kamailio-ldap-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
@@ -27,22 +29,11 @@ Description: very fast and configurable SIP proxy
  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
-Priority: extra
-Architecture: any
-Depends: kamailio (= ${binary:Version})
-Conflicts: 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-mysql-module
+Package: kamailio-mysql-modules
 Architecture: any
 Architecture: any
 Depends: ${shlibs:Depends}, kamailio (= ${binary:Version}), mysql-client
 Depends: ${shlibs:Depends}, kamailio (= ${binary:Version}), mysql-client
+Replaces: kamailio-mysql-module
 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
@@ -50,9 +41,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-module
+Package: kamailio-postgres-modules
 Architecture: any
 Architecture: any
 Depends: ${shlibs:Depends}, kamailio (= ${binary:Version}), postgresql-client
 Depends: ${shlibs:Depends}, kamailio (= ${binary:Version}), postgresql-client
+Replaces: kamailio-postgres-module
 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
@@ -60,19 +52,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-jabber-module
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: Jabber gateway 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 SIP to Jabber translator module for Kamailio.
-
-Package: kamailio-cpl-module
+Package: kamailio-cpl-modules
 Architecture: any
 Architecture: any
 Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
 Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
+Replaces: kamailio-cpl-module
 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
@@ -93,9 +76,10 @@ Description: radius modules for Kamailio
  authentication, peering, group membership and messages URIs checking
  authentication, peering, group membership and messages URIs checking
  against a Radius Server.
  against a Radius Server.
 
 
-Package: kamailio-unixodbc-module 
+Package: kamailio-unixodbc-modules
 Architecture: any 
 Architecture: any 
 Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
 Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
+Replaces: kamailio-unixodbc-module
 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 
@@ -115,17 +99,6 @@ 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-xmlrpc-module
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: XMLRPC support 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 implementation for Kamailio's
- Management Interface.
-
 Package: kamailio-perl-modules
 Package: kamailio-perl-modules
 Architecture: any
 Architecture: any
 Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
 Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
@@ -139,9 +112,10 @@ Description: Perl extensions and database driver for Kamailio
  This package provides an interface for Kamailio to write Perl extensions and
  This package provides an interface for Kamailio to write Perl extensions and
  the perlvdb database driver for Kamailio.
  the perlvdb database driver for Kamailio.
 
 
-Package: kamailio-snmpstats-module
+Package: kamailio-snmpstats-modules
 Architecture: any
 Architecture: any
 Depends: ${shlibs:Depends}, kamailio (= ${binary:Version}), snmpd
 Depends: ${shlibs:Depends}, kamailio (= ${binary:Version}), snmpd
+Replaces: kamailio-snmpstats-module
 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
@@ -150,9 +124,10 @@ 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-xmpp-module
+Package: kamailio-xmpp-modules
 Architecture: any
 Architecture: any
 Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
 Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
+Replaces: kamailio-xmpp-module
 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
@@ -160,9 +135,10 @@ 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-carrierroute-module
+Package: kamailio-carrierroute-modules
 Architecture: any
 Architecture: any
 Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
 Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
+Replaces: kamailio-carrierroute-module
 Description: Carrierroute module for Kamailio
 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
@@ -171,18 +147,6 @@ Description: Carrierroute module for Kamailio
  This package provides the carrierroute module for Kamailio, an integrated
  This package provides the carrierroute module for Kamailio, an integrated
  solution for routing, balancing and blacklisting.
  solution for routing, balancing and blacklisting.
 
 
-Package: kamailio-berkeley-module
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version}), db4.4-util
-Description: Berkeley Database 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 berkeley database module for Kamailio, a
- high-performance embedded DB kernel. All database tables are stored
- in files, no additional server is necessary.
-
 Package: kamailio-ldap-modules
 Package: kamailio-ldap-modules
 Architecture: any
 Architecture: any
 Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
 Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
@@ -195,9 +159,10 @@ 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-utils-module
+Package: kamailio-utils-modules
 Architecture: any
 Architecture: any
 Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
 Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
+Replaces: kamailio-utils-module
 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
@@ -206,34 +171,30 @@ 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-regex-modules
+Package: kamailio-memcached-modules
 Architecture: any
 Architecture: any
 Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
 Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: Provides the lcr, diaplan and regex modules
+Replaces: kamailio-memcached-module
+Description: Provides the memcached module, an interface to the memcached server
  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.
  .
  .
- Contains the lcr, diaplan and regex modules that depends on the pcre library.
+ This package provides the memcached module, an interface to the memcached
+ server, a high-performance, distributed memory object caching system.
 
 
-Package: kamailio-purple-module
+Package: kamailio-tls-modules
 Architecture: any
 Architecture: any
-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.
+Depends: ${shlibs:Depends}, kamailio (= ${Source-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-memcached-module
+Package: kamailio-nth
 Architecture: any
 Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-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.
+Depends: screen, gdb, binutils, gcc, bison, flex, ngrep, tcpdump, iftop, lsof, psmisc, vim, bvi, most, mc, sipsak
+Description: Kamailio - package for "nice to have" installation
+ This is a meta-package for easy installation various useful tools that may be
+ handy on server with Kamailio installed.
+
+

+ 0 - 3
pkg/kamailio/debian-etch/patches/00list

@@ -1,3 +0,0 @@
-10_no_lib64_on_64_bits
-11_always_smp
-

+ 0 - 27
pkg/kamailio/debian-etch/patches/10_no_lib64_on_64_bits.dpatch

@@ -1,27 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 10_no_lib64_on_64_bits.dpatch by  <[email protected]>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Debian uses /usr/lib even for 64bit architectures.
-
-@DPATCH@
-diff -urNad kamailio-1.2.0~/Makefile.defs kamailio-1.2.0/Makefile.defs
---- kamailio-1.2.0~/Makefile.defs	2007-02-24 12:35:45.000000000 +0100
-+++ kamailio-1.2.0/Makefile.defs	2007-02-24 16:26:45.886854110 +0100
-@@ -123,14 +123,12 @@
- bin-dir = sbin/
- 
- ARCH_B= $(shell echo $(ARCH) | sed -e 's/.*64.*/64b/')
--ifeq ($(ARCH_B),64b)
--	LIBDIR ?= lib64
--else
--	LIBDIR ?= lib
-+ifneq ($(ARCH_B),64b)
- 	# assume 32b - it is not really used further
- 	ARCH_B=32b
- endif
- 
-+LIBDIR ?= lib
- lib-dir = $(LIBDIR)/$(MAIN_NAME)
- modules-dir = $(LIBDIR)/$(MAIN_NAME)/modules/
- 

+ 0 - 24
pkg/kamailio/debian-etch/patches/11_always_smp.dpatch

@@ -1,24 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 11_always_smp.dpatch by  <[email protected]>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Always build for SMP.
-
-@DPATCH@
-diff -urNad kamailio-1.2.0~/Makefile.defs kamailio-1.2.0/Makefile.defs
---- kamailio-1.2.0~/Makefile.defs	2007-02-24 16:28:43.152825070 +0100
-+++ kamailio-1.2.0/Makefile.defs	2007-02-24 16:28:46.123102964 +0100
-@@ -82,12 +82,7 @@
- 	endif
- endif
- 
--SMP_STR = $(shell uname -v | grep -i "SMP")
--ifeq (,$(SMP_STR))
--	ISSMP=no
--else
--	ISSMP=yes
--endif
-+ISSMP=yes
- 
- OSREL = $(shell uname -r)
- # numerical version (good for comparisons: A.B.C => A*1000000+B*1000+C)

+ 156 - 310
pkg/kamailio/debian-etch/rules

@@ -1,110 +1,115 @@
 #!/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)
 
 
-DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
-
-ALL_PACKAGES = kamailio kamailio-mysql-module kamailio-postgres-module \
-	kamailio-jabber-module kamailio-cpl-module kamailio-radius-modules \
-	kamailio-unixodbc-module kamailio-presence-modules kamailio-xmlrpc-module \
-	kamailio-perl-modules kamailio-snmpstats-module kamailio-xmpp-module \
-	kamailio-carrierroute-module kamailio-berkeley-module kamailio-ldap-modules \
-	kamailio-utils-module kamailio-regex-modules kamailio-purple-module \
-	kamailio-memcached-module
-
-DEBVERSION:=$(shell head -n 1 debian/changelog \
-                    | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
-UPVERSION:=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/.dfsg$$//')
-
-FILENAME := kamailio_$(UPVERSION).orig.tar.gz
-UPFILENAME := kamailio-$(UPVERSION)-tls_src.tar.gz
-URL := http://kamailio.org/pub/kamailio/$(UPVERSION)/src/kamailio-$(UPVERSION)-tls_src.tar.gz
 
 
 # Uncomment this to turn on verbose mode.
 # Uncomment this to turn on verbose mode.
-# export DH_VERBOSE=1
-
-# Include dpatch rules
-include /usr/share/dpatch/dpatch.make
-
-
-# Do we want the TLS version ?
-# Disabled by default due to license issues, set to non-void to enable
-TLS=
-
-# modules depending on mysql
-MYSQL_MODULES = db_mysql
-# modules depending on postgres
-POSTGRES_MODULES = db_postgres
-# modules depending on unixODBC
-UNIXODBC_MODULES=db_unixodbc
-# jabber module
-JABBER_MODULES = jabber
-# cpl related modules
-CPL_MODULES = cpl-c
-# module depending on radiusclient
-RADIUS_MODULES = auth_radius misc_radius peering
-# presence related modules
-PRESENCE_MODULES = presence presence_xml presence_mwi presence_dialoginfo pua pua_bla pua_mi pua_usrloc pua_xmpp pua_dialoginfo xcap_client rls
-# XMLRPC module
-XMLRPC_MODULES = mi_xmlrpc
-# Perl module
-PERL_MODULES = perl perlvdb
-# SNMPstats module
-SNMPSTATS_MODULES = snmpstats
-# XMPP module
-XMPP_MODULES = xmpp
-# Carrierroute module
-CROUTE_MODULES = carrierroute
-# Berkeley DB module
-BERKELEY_MODULES = db_berkeley
-# LDAP modules
-LDAP_MODULES = ldap h350
-# utils module
-UTILS_MODULES = utils
-# modules depending on libpcre
-REGEX_MODULES = dialplan regex lcr
-# purple module
-PURPLE_MODULES = purple
-# memcached module
-MEMCACHED_MODULES = memcached
-
-ALL_MODULES = $(MYSQL_MODULES) $(POSTGRES_MODULES) $(UNIXODBC_MODULES) $(JABBER_MODULES) $(CPL_MODULES) $(RADIUS_MODULES) $(PRESENCE_MODULES) $(XMLRPC_MODULES) $(PERL_MODULES) $(SNMPSTATS_MODULES) $(XMPP_MODULES) $(CROUTE_MODULES) $(BERKELEY_MODULES) $(LDAP_MODULES) $(UTILS_MODULES) $(REGEX_MODULES) $(PURPLE_MODULES) $(MEMCACHED_MODULES)
-
-# modules not in the "main" package or unstable modules
-EXCLUDED_MODULES = $(ALL_MODULES) pa osp
-
-# the same but with path prepended (needed for modules="...")
-MYSQL_MOD_PATH=$(addprefix modules/, $(MYSQL_MODULES))
-POSTGRES_MOD_PATH=$(addprefix modules/, $(POSTGRES_MODULES))
-UNIXODBC_MOD_PATH=$(addprefix modules/, $(UNIXODBC_MODULES))
-JABBER_MOD_PATH=$(addprefix modules/, $(JABBER_MODULES))
-CPL_MOD_PATH=$(addprefix modules/, $(CPL_MODULES))
-RADIUS_MOD_PATH=$(addprefix modules/, $(RADIUS_MODULES))
-PRESENCE_MOD_PATH=$(addprefix modules/, $(PRESENCE_MODULES))
-XMLRPC_MOD_PATH=$(addprefix modules/, $(XMLRPC_MODULES))
-PERL_MOD_PATH=$(addprefix modules/, $(PERL_MODULES))
-SNMPSTATS_MOD_PATH=$(addprefix modules/, $(SNMPSTATS_MODULES))
-XMPP_MOD_PATH=$(addprefix modules/, $(XMPP_MODULES))
-CROUTE_MOD_PATH=$(addprefix modules/, $(CROUTE_MODULES))
-BERKELEY_MOD_PATH=$(addprefix modules/, $(BERKELEY_MODULES))
-LDAP_MOD_PATH=$(addprefix modules/, $(LDAP_MODULES))
-UTILS_MOD_PATH=$(addprefix modules/, $(UTILS_MODULES))
-REGEX_MOD_PATH=$(addprefix modules/, $(REGEX_MODULES))
-PURPLE_MOD_PATH=$(addprefix modules/, $(PURPLE_MODULES))
-MEMCACHED_MOD_PATH=$(addprefix modules/, $(MEMCACHED_MODULES))
-
-ifeq (cc, $(CC))
-	CC = gcc
-endif
-
-CFLAGS = -Wall -g
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-        CFLAGS += -O0
-else
-	CFLAGS += -O2
+#export DH_VERBOSE=1
+
+# This is the debhelper compatibility version to use.
+# export DH_COMPAT=4
+#  -- already set in compat
+#  force no striping (always include debug symbols for now)
+export DEB_BUILD_OPTIONS:="$(DEB_BUILD_OPTIONS) nostrip"
+
+# modules not in the "main" kamailio package
+EXCLUDED_MODULES=
+
+# extra modules to skip, because they are not compilable now
+# - regardless if they go to the main kamailio package or to some module package,
+# they will be excluded from compile and install of all
+EXTRA_EXCLUDED_MODULES=seas bdb dbtext oracle pa rls iptrtpproxy purple berkeley xmlrpc
+#EXTRA_EXCLUDED_MODULES=
+
+# possible module directories that can appear in MODULES_SP
+# (only used for deducing a module name)
+MDIRS=modules modules_s modules_k
+
+# 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
+# (with the name kamailio-$(group_name)-modules)
+# Note: the order is important (should be in dependency order, the one
+# on which other depend first)
+PACKAGE_GROUPS=mysql postgres unixodbc radius presence \
+			   ldap perl utils memcached tls \
+			   snmpstats carrierroute xmpp cpl
+
+# directories with possible duplicate libraries (that should be deleted
+# from current module* packages)
+DUP_LIBS_DIRS=$(CURDIR)/debian/kamailio/usr/lib/kamailio \
+			$(CURDIR)/debian/kamailio-db-modules/usr/lib/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
+# it also transforms db_foo into foo
+mod_name=$(subst db_,,$(lastword $(subst /, ,$(1))))
+
+define PACKAGE_GRP_BUILD_template
+	# package all the modules in PACKAGE_GROUPS in separate packages
+	$(foreach grp,$(PACKAGE_GROUPS),\
+		$(MAKE) every-module group_include="k$(grp)"
+	)
+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
+	$(foreach grp,$(PACKAGE_GROUPS),\
+		$(MAKE) install-modules-all group_include="k$(grp)" \
+		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
+		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
+		doc-dir=share/doc/kamailio-$(grp)-modules
+		# eliminate duplicate libs
+		-for d in $(DUP_LIBS_DIRS); do \
+			test "$$d" != "$(CURDIR)/debian/kamailio-$(grp)-modules/usr/lib/kamailio" &&\
+			for r in $$d/lib*; do \
+				echo "removing $(grp) lib `basename $$r` present also in $$d";\
+				rm -f $(CURDIR)/debian/kamailio-$(grp)-modules/usr/lib/kamailio/`basename "$$r"` ; \
+			done ; \
+		done
+	)
+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/lib/kamailio" &&\
+			for r in $$d/lib*; do \
+				echo "removing $(call mod_name, $(mod)) lib `basename $$r` present also in $$d";\
+				rm -f $(CURDIR)/debian/kamailio-$(call mod_name,$(mod))-module/usr/lib/kamailio/`basename "$$r"` ; \
+			done ; \
+		done
+	)
+endef
+
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -g
 endif
 endif
-
 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 	INSTALL_PROGRAM += -s
 	INSTALL_PROGRAM += -s
 endif
 endif
@@ -113,55 +118,33 @@ configure: configure-stamp
 configure-stamp:
 configure-stamp:
 	dh_testdir
 	dh_testdir
 	# Add here commands to configure the package.
 	# Add here commands to configure the package.
+	$(MAKE) cfg prefix=/usr cfg_prefix=$(CURDIR)/debian/kamailio \
+			cfg_target=/etc/kamailio/ \
+			basedir=$(CURDIR)/debian/kamailio \
+			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
+			group_include="kstandard"
 
 
 	touch configure-stamp
 	touch configure-stamp
 
 
 
 
 build: build-stamp
 build: build-stamp
-build-stamp: patch-stamp configure-stamp 
-	dh_testdir
 
 
+build-stamp: configure-stamp 
+	dh_testdir
 	# Add here commands to compile the package.
 	# Add here commands to compile the package.
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) all skip_modules="$(EXCLUDED_MODULES)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(MYSQL_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(POSTGRES_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(UNIXODBC_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(JABBER_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(CPL_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(RADIUS_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(PRESENCE_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(XMLRPC_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(PERL_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(SNMPSTATS_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(XMPP_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(CROUTE_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(BERKELEY_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(LDAP_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(UTILS_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(REGEX_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(PURPLE_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(MEMCACHED_MOD_PATH)" cfg-target=/etc/kamailio/
-
-	# generate the man pages for modules
-	$(MAKE) modules-docbook-man include_modules="$(ALL_MODULES)"
-
-	# generate the utils db_berkeley
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) utils include_modules="db_berkeley"
-
+	$(MAKE) all
+	# make groups
+	$(call PACKAGE_GRP_BUILD_template)
+	# make single-module packages
+	$(call PACKAGE_MODULE_BUILD_template)
 	touch build-stamp
 	touch build-stamp
 
 
-clean: real-clean unpatch
-real-clean:
+clean:
 	dh_testdir
 	dh_testdir
 	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) TLS=$(TLS) include_modules="$(ALL_MODULES)" proper
-	rm -f cfg.tab.h
-	rm -f utils/kamunix/kamunix.o utils/kamunix/kamunix
-	rm -f utils/db_berkeley/kambdb_recover.o utils/db_berkeley/kambdb_recover
-
+	-$(MAKE) maintainer-clean
 	dh_clean
 	dh_clean
 
 
 install: build
 install: build
@@ -169,187 +152,49 @@ install: build
 	dh_testroot
 	dh_testroot
 	dh_clean -k
 	dh_clean -k
 	dh_installdirs
 	dh_installdirs
-
 	# Add here commands to install the package into debian/kamailio
 	# Add here commands to install the package into debian/kamailio
-	# kamailio base package
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install skip_modules="$(EXCLUDED_MODULES)" \
-		basedir=$(CURDIR)/debian/kamailio \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio
-
-	find $(CURDIR)/debian/kamailio/etc/kamailio -type f -exec chmod -x {} \;
-	sed -i -e "s/^PATH.*//" $(CURDIR)/debian/kamailio/usr/sbin/kamctl
-
-	# install only the mysql module
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(MYSQL_MOD_PATH)"  \
-		basedir=$(CURDIR)/debian/kamailio-mysql-module \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-mysql-module \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-mysql-module
-
-	# install only the postgres module
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(POSTGRES_MOD_PATH)"  \
-		basedir=$(CURDIR)/debian/kamailio-postgres-module \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-postgres-module \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-postgres-module
-
-	# install only the unixodbc module
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(UNIXODBC_MOD_PATH)"  \
-		basedir=$(CURDIR)/debian/kamailio-unixodbc-module \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-unixodbc-module \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-unixodbc-module
-
-	# install only the jabber module
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(JABBER_MOD_PATH)"  \
-		basedir=$(CURDIR)/debian/kamailio-jabber-module \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-jabber-module \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-jabber-module
-
-	# install only the cpl module
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(CPL_MOD_PATH)"  \
-		basedir=$(CURDIR)/debian/kamailio-cpl-module \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-cpl-module \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-cpl-module
-
-	# install only the radius modules
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(RADIUS_MOD_PATH)"  \
-		basedir=$(CURDIR)/debian/kamailio-radius-modules \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-radius-modules \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-radius-modules
-
-	# install only the presence modules
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(PRESENCE_MOD_PATH)"  \
-		basedir=$(CURDIR)/debian/kamailio-presence-modules \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-presence-modules \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-presence-modules
-
-	# install only the xmlrpc module
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(XMLRPC_MOD_PATH)"  \
-		basedir=$(CURDIR)/debian/kamailio-xmlrpc-module \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-xmlrpc-module \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-xmlrpc-module
-
-	# install only the perl modules
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(PERL_MOD_PATH)"  \
-		basedir=$(CURDIR)/debian/kamailio-perl-modules \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-perl-modules \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-perl-modules
-
-	# install only the snmpstats module
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(SNMPSTATS_MOD_PATH)"  \
-		basedir=$(CURDIR)/debian/kamailio-snmpstats-module \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-snmpstats-module \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-snmpstats-module
-
-	# install only the xmpp module
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(XMPP_MOD_PATH)"  \
-		basedir=$(CURDIR)/debian/kamailio-xmpp-module \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-xmpp-module \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-xmpp-module
-
-	# install only the carrierroute module
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(CROUTE_MOD_PATH)"  \
-		basedir=$(CURDIR)/debian/kamailio-carrierroute-module \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-carrierroute-module \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-carrierroute-module
-
-	# install only the db_berkeley module
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(BERKELEY_MOD_PATH)"  \
-		basedir=$(CURDIR)/debian/kamailio-berkeley-module \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-berkeley-module \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-berkeley-module
-
-	# install only the ldap modules
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(LDAP_MOD_PATH)"  \
-		basedir=$(CURDIR)/debian/kamailio-ldap-modules \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-ldap-modules \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-ldap-modules
-
-	# install only the utils modules
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(UTILS_MOD_PATH)"  \
-		basedir=$(CURDIR)/debian/kamailio-utils-module \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-utils-module \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-utils-module
-
-	# install only the regex modules
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(REGEX_MOD_PATH)"  \
-		basedir=$(CURDIR)/debian/kamailio-regex-modules \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-regex-modules \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-regex-modules
-
-	# install only the purple modules
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(PURPLE_MOD_PATH)"  \
-		basedir=$(CURDIR)/debian/kamailio-purple-module \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-purple-module \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-purple-module
-
-	# install only the memcached modules
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(MEMCACHED_MOD_PATH)"  \
-		basedir=$(CURDIR)/debian/kamailio-memcached-module \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-memcached-module \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-memcached-module
-
-	# the modules packages all ship an empty /usr/sbin directory, let's clean that up
-	for p in $(ALL_PACKAGES); \
-		do rmdir --ignore-fail-on-non-empty $(CURDIR)/debian/$$p/usr/sbin; done
+	$(MAKE) install group_include="kstandard"
+	# fix etc/kamailio dir location -- not needed -- andrei
+	# mv -f $(CURDIR)/debian/kamailio/usr/etc $(CURDIR)/debian/kamailio
+	# make group packages
+	$(call PACKAGE_GRP_INSTALL_template)
+	# make single module packages
+	$(call PACKAGE_MODULE_INSTALL_template)
+	# install /etc/default/kamailio file
+	mkdir -p $(CURDIR)/debian/kamailio/etc/default
+	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-arch: build install
+binary-common: 
 	dh_testdir
 	dh_testdir
 	dh_testroot
 	dh_testroot
+	dh_installdebconf	
 	dh_installdocs
 	dh_installdocs
-	dh_installexamples --exclude=".svn"
+	dh_installexamples
+	dh_installmenu
 #	dh_installlogrotate
 #	dh_installlogrotate
-	dh_installinit -pkamailio -- defaults 23
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+	dh_installinit  -- defaults 23
 	dh_installcron
 	dh_installcron
 	dh_installman
 	dh_installman
 	dh_installinfo
 	dh_installinfo
-	dh_installchangelogs
+#	dh_undocumented
+	dh_installchangelogs 
 	dh_link
 	dh_link
-	dh_strip --dbg-package=kamailio-dbg
+	dh_strip
 	dh_compress 
 	dh_compress 
 	dh_fixperms
 	dh_fixperms
+	dh_makeshlibs
 	dh_installdeb
 	dh_installdeb
+#	dh_perl
 	dh_shlibdeps
 	dh_shlibdeps
 	dh_gencontrol
 	dh_gencontrol
 	dh_md5sums
 	dh_md5sums
@@ -357,18 +202,19 @@ binary-arch: build install
 
 
 # Build architecture-independent packages using the common target
 # Build architecture-independent packages using the common target
 binary-indep: build install
 binary-indep: build install
+# (Uncomment this next line if you have such packages.)
+#        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
 # We have nothing to do by default.
 # We have nothing to do by default.
 
 
-binary: binary-indep binary-arch
 
 
-print-version:
-	@@echo "Debian version:          $(DEBVERSION)"
-	@@echo "Upstream version:        $(UPVERSION)"
+# Build architecture-dependent packages using the common target
+binary-arch: build install
+	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
 
 
-get-orig-source:
-	@@dh_testdir
-	@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
-	@@echo Downloading $(FILENAME) from $(URL) ...
-	@@wget -N -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL)
+# Any other binary targets build just one binary package at a time.
+binary-%: build install
+	$(MAKE) -f debian/rules binary-common DH_OPTIONS=-p$*
+
+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 patch unpatch real-clean

+ 1 - 0
pkg/kamailio/debian-lenny

@@ -0,0 +1 @@
+debian

+ 0 - 33
pkg/kamailio/debian-lenny/changelog

@@ -1,33 +0,0 @@
-kamailio (3.0.2.99) unstable; urgency=low
-
-  * update to 3.0.2.99 for development version builds
-
- -- Jon Bonilla <[email protected]>  Fri, 28 May 2010 22:26:00 +0100
-
-kamailio (3.0.2) unstable; urgency=low
-
-  * update to 3.0.2 from upstream
-
- -- Daniel-Constantin Mierla <[email protected]>  Thu, 27 May 2010 10:27:36 +0100
-
-kamailio (3.0.0-rc2) unstable; urgency=low
-
-  * update to 3.0.0-rc2 from upstream
-  * updated debian/rules to work with the new style module packaging
-
- -- Jonas Bergler <[email protected]>  Wed, 18 Nov 2009 12:30:02 +1300
-
-kamailio (1.5.0-svn1) unstable; urgency=low
-
-  * increment debian packaging for trunk
-
- -- Henning Westerholt <[email protected]>  Mon, 02 Mar 2009 17:40:02 +0100
-
-kamailio (1.4.0-svn1) unstable; urgency=low
-
-  [ Klaus Darilion ]
-  * first release of Kamailio (after renaming from Openser)
-
- -- Julien BLACHE <[email protected]>  Wed, 12 Dec 2007 17:25:31 +0100
-
-

+ 0 - 1
pkg/kamailio/debian-lenny/compat

@@ -1 +0,0 @@
-5

+ 0 - 242
pkg/kamailio/debian-lenny/control

@@ -1,242 +0,0 @@
-Source: kamailio
-Section: net
-Priority: optional
-Maintainer: Debian VoIP Team <[email protected]>
-Uploaders: Kilian Krause <[email protected]>
-Build-Depends: debhelper (>= 5), dpatch, libmysqlclient15-dev, libexpat1-dev, libxml2-dev, libpq-dev, libradiusclient-ng-dev, flex, bison, zlib1g-dev, unixodbc-dev, libxmlrpc-c3-dev, libperl-dev, libsnmp-dev, dpkg-dev (>= 1.13.19), libdb-dev (>= 4.6.19), xsltproc, libconfuse-dev, libldap2-dev, libcurl4-gnutls-dev, python, libpcre3-dev, docbook-xml, libpurple-dev, libmemcache-dev
-Standards-Version: 3.8.0
-Homepage: http://www.kamailio.org/
-Vcs-Svn: svn://svn.debian.org/pkg-voip/kamailio/trunk/
-Vcs-Browser: http://svn.debian.org/wsvn/pkg-voip/kamailio/?op=log
-
-Package: kamailio
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
-Suggests: kamailio-mysql-module, kamailio-postgres-module, kamailio-unixodbc-module, kamailio-jabber-module, kamailio-cpl-module, kamailio-radius-modules, kamailio-presence-modules, kamailio-xmlrpc-module, kamailio-perl-modules, kamailio-snmpstats-module, kamailio-xmpp-module, kamailio-carrierroute-module, kamailio-berkeley-module, kamailio-ldap-modules
-Description: very fast and configurable SIP proxy
- 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.
- .
- C Shell-like scripting language provides full control over the server's
- behaviour. Its modular architecture allows only required functionality to be
- 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.
- .
- This package contains the main Kamailio binary along with the principal modules
- and support binaries.
-
-Package: kamailio-dbg
-Priority: extra
-Architecture: any
-Depends: kamailio (= ${binary:Version})
-Conflicts: 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-mysql-module
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version}), mysql-client
-Description: MySQL 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 MySQL database driver for Kamailio.
-
-Package: kamailio-postgres-module
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version}), postgresql-client
-Description: PostgreSQL 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 PostgreSQL database driver for Kamailio.
-
-Package: kamailio-jabber-module
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: Jabber gateway 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 SIP to Jabber translator module for Kamailio.
-
-Package: kamailio-cpl-module
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: CPL module (CPL interpreter engine) 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 a CPL (Call Processing Language) interpreter for
- Kamailio, turning Kamailio into a CPL server (storage and interpreter).
-
-Package: kamailio-radius-modules
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: radius 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 a set of Radius modules for Kamailio, for
- authentication, peering, group membership and messages URIs checking
- against a Radius Server.
-
-Package: kamailio-unixodbc-module 
-Architecture: any 
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: unixODBC 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 unixODBC database driver for Kamailio. 
-
-Package: kamailio-presence-modules
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: SIMPLE presence 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 several Kamailio modules for implementing presence
- server and presence user agent for RICH presence, registrar-based presence,
- external triggered presence and XCAP support.
-
-Package: kamailio-xmlrpc-module
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: XMLRPC support 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 implementation for Kamailio's
- Management Interface.
-
-Package: kamailio-perl-modules
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Replaces: kamailio-perl-module
-Conflicts: kamailio-perl-module
-Description: Perl extensions and database driver 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 an interface for Kamailio to write Perl extensions and
- the perlvdb database driver for Kamailio.
-
-Package: kamailio-snmpstats-module
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version}), snmpd
-Description: SNMP AgentX subagent 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 snmpstats module for Kamailio. This module acts
- as an AgentX subagent which connects to a master agent.
-
-Package: kamailio-xmpp-module
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: XMPP gateway 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 SIP to XMPP IM translator module for Kamailio.
-
-Package: kamailio-carrierroute-module
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: Carrierroute 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 carrierroute module for Kamailio, an integrated
- solution for routing, balancing and blacklisting.
-
-Package: kamailio-berkeley-module
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version}), db4.6-util
-Description: Berkeley Database 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 berkeley database module for Kamailio, a
- high-performance embedded DB kernel. All database tables are stored
- in files, no additional server is necessary.
-
-Package: kamailio-ldap-modules
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: LDAP 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 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-utils-module
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: Provides a set utility functions 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.
- .
- Provides a set of utility functions for Kamailio, which are not related
- to the server configuration.
-
-Package: kamailio-regex-modules
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-Description: Provides the lcr, diaplan and regex 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.
- .
- Contains the lcr, diaplan and regex modules that depends on the pcre library.
-
-Package: kamailio-purple-module
-Architecture: any
-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-memcached-module
-Architecture: any
-Depends: ${shlibs:Depends}, kamailio (= ${binary:Version})
-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.

+ 0 - 27
pkg/kamailio/debian-lenny/copyright

@@ -1,27 +0,0 @@
-This package was debianized by Andrei Pelinescu-Onciul
-<[email protected]> on Tue, 16 Jul 2002 15:41:31 +0200.
-This package was debianized by Julien BLACHE <[email protected]>
-on Thu, 29 Jun 2006 09:55:24 +0200, based on Andrei's work.
-
-It was downloaded from: http://kamailio.org
-
-Upstream Authors:
-       Andrei Pelinescu-Onciul <[email protected]>
-       Bogdan-Andrei Iancu <[email protected]>
-       Daniel-Constantin Mierla <[email protected]>
-       Jan Janak <[email protected]>
-       Jiri Kuthan <[email protected]>
-       Juha Heinanen
-       Ramona-Elena Modroiu
-       Maxim Sobolev
-       Miklos Tirpak
-       Nils Ohlmeier
-       and others ; see the AUTHORS file in the source code tree for details
-
-This software is copyright (c) 2002-2003 by FhG Fokus
-
-You are free to distribute this software under the terms of
-the GNU General Public License.
-
-On Debian systems, the complete text of the GNU General Public
-License can be found in the file `/usr/share/common-licenses/GPL.

+ 0 - 38
pkg/kamailio/debian-lenny/kamailio.README.Debian

@@ -1,38 +0,0 @@
-Kamailio for Debian
-------------------
-
-* init script check for fork=no
--------------------------------
-
-The Kamailio init script will not start Kamailio on boot if fork=no is
-specified in the config file. The check in the initscript will match
-any occurrence of fork=no in the file, even inside C-style comments.
-
-You can disable this check in the init script if you wish; just comment
-out the calls to the check_fork function in the script. Your changes to
-the init script will be preserved upon upgrade, as the file is tagged
-as a conffile.
-
-
-* Kamailio setup
----------------
-
-To setup Kamailio, you need to:
- - configure Kamailio properly to suit your needs
- - edit /etc/default/kamailio, adjust the MEMORY parameter and set
-   RUN_KAMAILIO to "yes"
-
-If you are building an HA cluster using heartbeat or similar, you'll want
-to disable the init script by running:
-
-  update-rc.d kamailio remove
-
-so that Kamailio will not be launched at system startup. You still need
-to set RUN_KAMAILIO to "yes" if you want to use the /etc/init.d/kamailio init
-script.
-
-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
-provided by the kamailio-dbg package.
-
--- Julien BLACHE <[email protected]>, Fri, 08 Sep 2006 14:43:21 +0200

+ 0 - 24
pkg/kamailio/debian-lenny/kamailio.default

@@ -1,24 +0,0 @@
-#
-# Kamailio startup options
-#
-
-# Set to yes to enable kamailio, once configured properly.
-RUN_KAMAILIO=no
-
-# User to run as
-USER=kamailio
-
-# Group to run as
-GROUP=kamailio
-
-# 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.
-# 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
-# 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

+ 0 - 2
pkg/kamailio/debian-lenny/kamailio.dirs

@@ -1,2 +0,0 @@
-var/run/kamailio
-

+ 0 - 2
pkg/kamailio/debian-lenny/kamailio.examples

@@ -1,2 +0,0 @@
-examples/*
-

+ 0 - 170
pkg/kamailio/debian-lenny/kamailio.init

@@ -1,170 +0,0 @@
-#! /bin/sh
-#
-### BEGIN INIT INFO
-# Provides:          kamailio
-# Required-Start:    $syslog $network $local_fs $time
-# Required-Stop:     $syslog $network $local_fs
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: Start the Kamailio SIP proxy server
-# Description:       Start the Kamailio SIP proxy server
-### END INIT INFO
-#
-# TODO:
-# The following fields should be added (and completed):
-# Should-Start:      postgresql mysql radius
-# Should-Stop:       postgresql mysql radius
-
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
-DAEMON=/usr/sbin/kamailio
-NAME=kamailio
-DESC=kamailio
-HOMEDIR=/var/run/kamailio
-PIDFILE=$HOMEDIR/$NAME.pid
-DEFAULTS=/etc/default/kamailio
-RUN_KAMAILIO=no
-
-# Do not start kamailio if fork=no is set in the config file
-# otherwise the boot process will just stop
-check_fork ()
-{
-    if grep -q "^[[:space:]]*fork[[:space:]]*=[[:space:]]*no.*" /etc/kamailio/kamailio.cfg; then
-	echo "Not starting $DESC: fork=no specified in config file; run /etc/init.d/kamailio debug instead"
-	exit 1
-    fi
-}
-
-check_kamailio_config ()
-{
-	# 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
-	    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
-    if [ ! -d $HOMEDIR ]; then
-        mkdir $HOMEDIR
-    fi
-
-    # Set the appropiate owner and group
-    chown ${USER}:${GROUP} $HOMEDIR
-}
-
-
-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
-}
-
-test -f $DAEMON || exit 0
-
-# Load startup options if available
-if [ -f $DEFAULTS ]; then
-   . $DEFAULTS || true
-fi
-
-if [ "$RUN_KAMAILIO" != "yes" ]; then
-    echo "Kamailio not yet configured. Edit /etc/default/kamailio first."
-    exit 0
-fi
-
-set -e
-
-MEMORY=$((`echo $MEMORY | sed -e 's/[^0-9]//g'`))
-[ -z "$USER" ]  && USER=kamailio
-[ -z "$GROUP" ] && GROUP=kamailio
-[ $MEMORY -le 0 ] && MEMORY=32
-
-if test "$DUMP_CORE" = "yes" ; then
-    # 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
-
-OPTIONS="-P $PIDFILE -m $MEMORY -u $USER -g $GROUP"
-
-case "$1" in
-  start|debug)
-	check_kamailio_config
-	check_homedir
-	create_radius_seqfile
-
-	if [ "$1" != "debug" ]; then
-	    check_fork
-	fi
-
-	echo -n "Starting $DESC: $NAME"
-	start-stop-daemon --start --quiet --pidfile $PIDFILE \
-		--exec $DAEMON -- $OPTIONS || echo -n " already running"
-	echo "."
-	;;
-  stop)
-	echo -n "Stopping $DESC: $NAME"
-	start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
-		--exec $DAEMON
-	echo "."
-	;;
-  restart|force-reload)
-	check_kamailio_config
-	check_homedir
-	create_radius_seqfile
-
-	echo -n "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
-	echo "."
-	;;
-  status)
-	echo -n "Status of $DESC: "
-	if [ ! -r "$PIDFILE" ]; then
-		echo "$NAME is not running."
-		exit 3
-	fi
-	if read pid < "$PIDFILE" && ps -p "$pid" > /dev/null 2>&1; then
-		echo "$NAME is running."
-		exit 0
-	else
-		echo "$NAME is not running but $PIDFILE exists."
-		exit 1
-	fi
-	;;
-  *)
-	N=/etc/init.d/$NAME
-	echo "Usage: $N {start|stop|restart|force-reload|debug|status}" >&2
-	exit 1
-	;;
-esac
-
-exit 0

+ 0 - 48
pkg/kamailio/debian-lenny/kamailio.postinst

@@ -1,48 +0,0 @@
-#! /bin/sh
-#
-# $Id$
-
-PKG=kamailio
-DEFAULTS=/etc/default/kamailio
-HOMEDIR=/var/run/kamailio
-
-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
-    configure)
-        adduser --quiet --system --group --disabled-password \
-                --shell /bin/false --gecos "Kamailio" \
-                --home $HOMEDIR kamailio || true
-
-        ;;
-
-    abort-upgrade|abort-remove|abort-deconfigure)
-
-        ;;
-
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 1
-        ;;
-esac
-
-#DEBHELPER#
-

+ 0 - 413
pkg/kamailio/debian-lenny/rules

@@ -1,413 +0,0 @@
-#!/usr/bin/make -f
-# Sample debian/rules that uses debhelper.
-# GNU copyright 1997 to 1999 by Joey Hess.
-
-DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
-
-ALL_PACKAGES = kamailio kamailio-mysql-module kamailio-postgres-module \
-	kamailio-jabber-module kamailio-cpl-module kamailio-radius-modules \
-	kamailio-unixodbc-module kamailio-presence-modules kamailio-xmlrpc-module \
-	kamailio-perl-modules kamailio-snmpstats-module kamailio-xmpp-module \
-	kamailio-carrierroute-module kamailio-berkeley-module kamailio-ldap-modules \
-	kamailio-utils-module kamailio-regex-modules kamailio-purple-module \
-	kamailio-memcached-module
-
-DEBVERSION:=$(shell head -n 1 debian/changelog \
-                    | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
-UPVERSION:=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/.dfsg$$//')
-
-FILENAME := kamailio_$(UPVERSION).orig.tar.gz
-UPFILENAME := kamailio-$(UPVERSION)-tls_src.tar.gz
-URL := http://kamailio.org/pub/kamailio/$(UPVERSION)/src/kamailio-$(UPVERSION)-tls_src.tar.gz
-
-# Uncomment this to turn on verbose mode.
-# export DH_VERBOSE=1
-
-# Include dpatch rules
-include /usr/share/dpatch/dpatch.make
-
-
-# Do we want the TLS version ?
-# Disabled by default due to license issues, set to non-void to enable
-TLS=
-
-# modules depending on mysql
-MYSQL_MODULES = db_mysql
-# modules depending on postgres
-POSTGRES_MODULES = db_postgres
-# modules depending on unixODBC
-UNIXODBC_MODULES=db_unixodbc
-# jabber module
-JABBER_MODULES = jabber
-# cpl related modules
-CPL_MODULES = cpl-c
-# module depending on radiusclient
-RADIUS_MODULES = auth_radius misc_radius peering
-# presence related modules
-PRESENCE_MODULES = presence presence_xml presence_mwi presence_dialoginfo pua pua_bla pua_mi pua_usrloc pua_xmpp pua_dialoginfo xcap_client rls
-# XMLRPC module
-XMLRPC_MODULES = mi_xmlrpc
-# Perl module
-PERL_MODULES = perl perlvdb
-# SNMPstats module
-SNMPSTATS_MODULES = snmpstats
-# XMPP module
-XMPP_MODULES = xmpp
-# Carrierroute module
-CROUTE_MODULES = carrierroute
-# Berkeley DB module
-BERKELEY_MODULES = db_berkeley
-# LDAP modules
-LDAP_MODULES = ldap h350
-# utils module
-UTILS_MODULES = utils
-# modules depending on libpcre
-REGEX_MODULES = dialplan regex lcr
-# purple module
-PURPLE_MODULES = purple
-# memcached module
-MEMCACHED_MODULES = memcached
-
-ALL_MODULES = $(MYSQL_MODULES) $(POSTGRES_MODULES) $(UNIXODBC_MODULES) $(JABBER_MODULES) $(CPL_MODULES) $(RADIUS_MODULES) $(PRESENCE_MODULES) $(XMLRPC_MODULES) $(PERL_MODULES) $(SNMPSTATS_MODULES) $(XMPP_MODULES) $(CROUTE_MODULES) $(BERKELEY_MODULES) $(LDAP_MODULES) $(UTILS_MODULES) $(REGEX_MODULES) $(PURPLE_MODULES) $(MEMCACHED_MODULES)
-
-# modules not in the "main" package or unstable modules
-EXCLUDED_MODULES = $(ALL_MODULES) pa osp
-
-# module directories
-MODULE_DIRS=modules modules_s modules_k
-
-# library directories for cleaning up duplicates
-DUP_LIBS_DIRS=$(CURDIR)/debian/kamailio/usr/lib/kamailio
-
-
-# the same but with path prepended (needed for modules="...")
-MYSQL_MOD_PATH=$(addprefix modules/, $(MYSQL_MODULES))
-POSTGRES_MOD_PATH=$(addprefix modules/, $(POSTGRES_MODULES))
-UNIXODBC_MOD_PATH=$(addprefix modules/, $(UNIXODBC_MODULES))
-JABBER_MOD_PATH=$(addprefix modules/, $(JABBER_MODULES))
-CPL_MOD_PATH=$(addprefix modules/, $(CPL_MODULES))
-RADIUS_MOD_PATH=$(addprefix modules/, $(RADIUS_MODULES))
-PRESENCE_MOD_PATH=$(addprefix modules/, $(PRESENCE_MODULES))
-XMLRPC_MOD_PATH=$(addprefix modules/, $(XMLRPC_MODULES))
-PERL_MOD_PATH=$(addprefix modules/, $(PERL_MODULES))
-SNMPSTATS_MOD_PATH=$(addprefix modules/, $(SNMPSTATS_MODULES))
-XMPP_MOD_PATH=$(addprefix modules/, $(XMPP_MODULES))
-CROUTE_MOD_PATH=$(addprefix modules/, $(CROUTE_MODULES))
-BERKELEY_MOD_PATH=$(addprefix modules/, $(BERKELEY_MODULES))
-LDAP_MOD_PATH=$(addprefix modules/, $(LDAP_MODULES))
-UTILS_MOD_PATH=$(addprefix modules/, $(UTILS_MODULES))
-REGEX_MOD_PATH=$(addprefix modules/, $(REGEX_MODULES))
-PURPLE_MOD_PATH=$(addprefix modules/, $(PURPLE_MODULES))
-MEMCACHED_MOD_PATH=$(addprefix modules/, $(MEMCACHED_MODULES))
-
-ifeq (cc, $(CC))
-	CC = gcc
-endif
-
-CFLAGS = -Wall -g
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-        CFLAGS += -O0
-else
-	CFLAGS += -O2
-endif
-
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-	INSTALL_PROGRAM += -s
-endif
-
-configure: configure-stamp
-configure-stamp:
-	dh_testdir
-	# Add here commands to configure the package.
-
-	touch configure-stamp
-
-
-build: build-stamp
-build-stamp: patch-stamp configure-stamp 
-	dh_testdir
-
-	# Add here commands to compile the package.
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) all skip_modules="$(EXCLUDED_MODULES)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(MYSQL_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(POSTGRES_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(UNIXODBC_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(JABBER_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(CPL_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(RADIUS_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(PRESENCE_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(XMLRPC_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(PERL_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(SNMPSTATS_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(XMPP_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(CROUTE_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(BERKELEY_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(LDAP_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(UTILS_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(REGEX_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(PURPLE_MOD_PATH)" cfg-target=/etc/kamailio/
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) modules modules="$(MEMCACHED_MOD_PATH)" cfg-target=/etc/kamailio/
-
-	# generate the utils db_berkeley
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) utils include_modules="db_berkeley"
-
-	# generate the man pages for modules
-	#$(MAKE) modules-docbook-man include_modules="$(ALL_MODULES)"
-
-	touch build-stamp
-
-clean: real-clean unpatch
-real-clean:
-	dh_testdir
-	dh_testroot
-	rm -f build-stamp configure-stamp
-
-	# Add here commands to clean up after the build process.
-	$(MAKE) TLS=$(TLS) include_modules="$(ALL_MODULES)" proper
-	rm -f cfg.tab.h
-	rm -f utils/kamunix/kamunix.o utils/kamunix/kamunix
-	rm -f utils/db_berkeley/kambdb_recover.o utils/db_berkeley/kambdb_recover
-
-	dh_clean
-
-install: build
-	dh_testdir
-	dh_testroot
-	dh_clean -k
-	dh_installdirs
-
-	# Add here commands to install the package into debian/kamailio
-	# kamailio base package
-	#CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install skip_modules="$(EXCLUDED_MODULES)" \
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install \
-		basedir=$(CURDIR)/debian/kamailio \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio
-
-	# find $(CURDIR)/debian/kamailio/etc/kamailio -type f -exec chmod -x {} \;
-	sed -i -e "s/^PATH.*//" $(CURDIR)/debian/kamailio/usr/sbin/kamctl
-
-	# install only the mysql module
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(MYSQL_MOD_PATH)" \
-		modules_s="" modules_k="" \
-		basedir=$(CURDIR)/debian/kamailio-mysql-module \
-		prefix=/usr \
-		cfg-target=/etc/kamailio/ \
-		cfg-prefix=$(CURDIR)/debian/kamailio-mysql-module \
-		doc-dir=share/doc/kamailio-mysql-module
-
-	# install only the postgres module
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(POSTGRES_MOD_PATH)" \
-		modules_s="" modules_k="" \
-		basedir=$(CURDIR)/debian/kamailio-postgres-module \
-		prefix=/usr \
-		cfg-target=/etc/kamailio/ \
-		cfg-prefix=$(CURDIR)/debian/kamailio-postgres-module \
-		doc-dir=share/doc/kamailio-postgres-module
-
-	# install only the unixodbc module
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(UNIXODBC_MOD_PATH)" \
-		modules_s="" modules_k="" \
-		basedir=$(CURDIR)/debian/kamailio-unixodbc-module \
-		prefix=/usr \
-		cfg-target=/etc/kamailio/ \
-		cfg-prefix=$(CURDIR)/debian/kamailio-unixodbc-module \
-		doc-dir=share/doc/kamailio-unixodbc-module
-
-	# install only the jabber module
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(JABBER_MOD_PATH)" \
-		modules_s="" modules_k="" \
-		basedir=$(CURDIR)/debian/kamailio-jabber-module \
-		prefix=/usr \
-		cfg-target=/etc/kamailio/ \
-		cfg-prefix=$(CURDIR)/debian/kamailio-jabber-module \
-		doc-dir=share/doc/kamailio-jabber-module
-
-	# install only the cpl module
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(CPL_MOD_PATH)" \
-		modules_s="" modules_k="" \
-		basedir=$(CURDIR)/debian/kamailio-cpl-module \
-		prefix=/usr \
-		cfg-target=/etc/kamailio/ \
-		cfg-prefix=$(CURDIR)/debian/kamailio-cpl-module \
-		doc-dir=share/doc/kamailio-cpl-module
-
-	# install only the radius modules
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(RADIUS_MOD_PATH)"  \
-		modules_s="" modules_k="" \
-		basedir=$(CURDIR)/debian/kamailio-radius-modules \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-radius-modules \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-radius-modules
-
-	# install only the presence modules
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(PRESENCE_MOD_PATH)"  \
-		modules_s="" modules_k="" \
-		basedir=$(CURDIR)/debian/kamailio-presence-modules \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-presence-modules \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-presence-modules
-
-	# install only the xmlrpc module
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(XMLRPC_MOD_PATH)"  \
-		modules_s="" modules_k="" \
-		basedir=$(CURDIR)/debian/kamailio-xmlrpc-module \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-xmlrpc-module \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-xmlrpc-module
-
-	# install only the perl modules
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(PERL_MOD_PATH)"  \
-		modules_s="" modules_k="" \
-		basedir=$(CURDIR)/debian/kamailio-perl-modules \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-perl-modules \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-perl-modules
-
-	# install only the snmpstats module
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(SNMPSTATS_MOD_PATH)"  \
-		modules_s="" modules_k="" \
-		basedir=$(CURDIR)/debian/kamailio-snmpstats-module \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-snmpstats-module \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-snmpstats-module
-
-	# install only the xmpp module
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(XMPP_MOD_PATH)"  \
-		modules_s="" modules_k="" \
-		basedir=$(CURDIR)/debian/kamailio-xmpp-module \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-xmpp-module \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-xmpp-module
-
-	# install only the carrierroute module
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(CROUTE_MOD_PATH)"  \
-		modules_s="" modules_k="" \
-		basedir=$(CURDIR)/debian/kamailio-carrierroute-module \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-carrierroute-module \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-carrierroute-module
-
-	# install only the db_berkeley module
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(BERKELEY_MOD_PATH)"  \
-		modules_s="" modules_k="" \
-		basedir=$(CURDIR)/debian/kamailio-berkeley-module \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-berkeley-module \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-berkeley-module
-
-	# install only the ldap modules
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(LDAP_MOD_PATH)"  \
-		modules_s="" modules_k="" \
-		basedir=$(CURDIR)/debian/kamailio-ldap-modules \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-ldap-modules \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-ldap-modules
-
-	# install only the utils modules
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(UTILS_MOD_PATH)"  \
-		modules_s="" modules_k="" \
-		basedir=$(CURDIR)/debian/kamailio-utils-module \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-utils-module \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-utils-module
-
-	# install only the regex modules
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(REGEX_MOD_PATH)"  \
-		modules_s="" modules_k="" \
-		basedir=$(CURDIR)/debian/kamailio-regex-modules \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-regex-modules \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-regex-modules
-
-	# install only the purple modules
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(PURPLE_MOD_PATH)"  \
-		basedir=$(CURDIR)/debian/kamailio-purple-module \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-purple-module \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-purple-module
-
-	# install only the memcached modules
-	CC="$(CC)" CFLAGS="$(CFLAGS)" TLS=$(TLS) $(MAKE) install-modules-all modules="$(MEMCACHED_MOD_PATH)"  \
-		modules_s="" modules_k="" \
-		basedir=$(CURDIR)/debian/kamailio-memcached-module \
-		prefix=/usr \
-		cfg-prefix=$(CURDIR)/debian/kamailio-memcached-module \
-		cfg-target=/etc/kamailio/ \
-		doc-dir=share/doc/kamailio-memcached-module
-
-	# eliminate duplicate libs
-	-for p in $(ALL_PACKAGES); do \
-		echo "### Processing duplicate libs for '$$p'"; \
-		for d in $(DUP_LIBS_DIRS); do \
-			test "$$d" != "$(CURDIR)/debian/$$p/usr/lib/kamailio" &&\
-			for r in $$d/lib*; do \
-				echo " removing $$p lib `basename $$r` present also in $$d";\
-				rm -f $(CURDIR)/debian/$$p/usr/lib/kamailio/`basename "$$r"` ; \
-			done ; \
-		done ; \
-	done
-
-
-	# the modules packages all ship an empty /usr/sbin directory, let's clean that up
-	#for p in $(ALL_PACKAGES); \
-	#	do rmdir --ignore-fail-on-non-empty $(CURDIR)/debian/$$p/usr/sbin; done
-
-# 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
-# affect _all_ packages. Anything you want to only affect one package
-# should be put in another target, such as the install target.
-binary-arch: build install
-	dh_testdir
-	dh_testroot
-	dh_installdocs
-	dh_installexamples --exclude=".svn"
-#	dh_installlogrotate
-	dh_installinit -pkamailio -- defaults 23
-	dh_installcron
-	dh_installman
-	dh_installinfo
-	dh_installchangelogs
-	dh_link
-	dh_strip --dbg-package=kamailio-dbg
-	dh_compress 
-	dh_fixperms
-	dh_installdeb
-	dh_makeshlibs
-	LD_LIBRARY_PATH="$(CURDIR)/debian/kamailio/usr/lib/kamailio/" dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-# Build architecture-independent packages using the common target
-binary-indep: build install
-# We have nothing to do by default.
-
-binary: binary-indep binary-arch
-
-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 -N -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL)
-
-.PHONY: build clean binary-indep binary-arch binary install configure patch unpatch real-clean