Browse code

Revert "pkg/kamailio/deb: fix tlsa build"

This reverts commit 6f162fc63d0503637c4c3c96ab4b13189239250f.

Victor Seva authored on 18/06/2022 23:41:54
Showing 1 changed files
... ...
@@ -109,9 +109,9 @@ LD_EXTRA_OPTS := $(shell dpkg-buildflags --get LDFLAGS)
109 109
 # https://wiki.debian.org/ReproducibleBuilds/
110 110
 CC_EXTRA_OPTS += -DVERSION_NODATE
111 111
 
112
-#tlsa
113
-export LIBSSL_STATIC_SRCLIB=yes
114
-export LIBSSL_STATIC_SRCPATH=/usr/$(LIBDIR)
112
+# "function" to get package short name out of a dir/module_name
113
+# it also transforms db_foo into foo
114
+mod_name=$(subst db_,,$(lastword $(subst /, ,$(1))))
115 115
 
116 116
 define PACKAGE_GRP_BUILD_template
117 117
 	# package all the modules in PACKAGE_GROUPS in separate packages
Browse code

pkg/kamailio/deb: fix tlsa build

* remove unused mod_name definition

Victor Seva authored on 18/06/2022 22:38:03
Showing 1 changed files
... ...
@@ -109,9 +109,9 @@ LD_EXTRA_OPTS := $(shell dpkg-buildflags --get LDFLAGS)
109 109
 # https://wiki.debian.org/ReproducibleBuilds/
110 110
 CC_EXTRA_OPTS += -DVERSION_NODATE
111 111
 
112
-# "function" to get package short name out of a dir/module_name
113
-# it also transforms db_foo into foo
114
-mod_name=$(subst db_,,$(lastword $(subst /, ,$(1))))
112
+#tlsa
113
+export LIBSSL_STATIC_SRCLIB=yes
114
+export LIBSSL_STATIC_SRCPATH=/usr/$(LIBDIR)
115 115
 
116 116
 define PACKAGE_GRP_BUILD_template
117 117
 	# package all the modules in PACKAGE_GROUPS in separate packages
Browse code

pkg/kamailio/deb: rework rules [skip ci]

* define list elements per line. It helps to remove/add them in
backports scripts
* remove unused definitions
* include dpkg-dev helper makefile files with definitions
* rework backports scripts

Victor Seva authored on 17/06/2022 09:33:47
Showing 1 changed files
... ...
@@ -1,54 +1,113 @@
1 1
 #!/usr/bin/make -f
2
-# Sample debian/rules that uses debhelper.
3
-# GNU copyright 1997 to 1999 by Joey Hess.
4 2
 
5
-DEBVERSION:=$(shell head -n 1 debian/changelog \
6
-                    | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
7
-UPVERSION:=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
8
-
9
-FILENAME := kamailio_$(UPVERSION).orig.tar.gz
10
-URL := http://www.kamailio.org/pub/kamailio/$(UPVERSION)/src/kamailio-$(UPVERSION)_src.tar.gz
11
-
12
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
3
+# Uncomment this to turn on verbose mode.
4
+#export DH_VERBOSE=1
13 5
 
14 6
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
15 7
 DPKG_EXPORT_BUILDFLAGS = 1
8
+
9
+include /usr/share/dpkg/architecture.mk
16 10
 include /usr/share/dpkg/buildflags.mk
11
+include /usr/share/dpkg/pkg-info.mk
17 12
 
18
-# Uncomment this to turn on verbose mode.
19
-#export DH_VERBOSE=1
13
+# Enable parallel builds.
14
+NUMJOBS = 1
15
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
16
+  NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
17
+  MAKEFLAGS += -j$(NUMJOBS)
18
+endif
20 19
 
21 20
 export RADCLI=1
22 21
 
23
-# modules not in the "main" kamailio package
24
-EXCLUDED_MODULES= java python
25
-
26
-# extra modules to skip, because they are not compilable now
27
-# - regardless if they go to the main kamailio package or to some module package,
28
-# they will be excluded from compile and install of all
29
-EXTRA_EXCLUDED_MODULES=bdb dbtext oracle pa iptrtpproxy mi_xmlrpc dnssec
30
-
31
-# module groups that are packaged in separate packages
32
-# (with the name kamailio-$(group_name)-modules)
22
+# Modules not in the "main" kamailio package:
23
+EXCLUDED_MODULES =
24
+
25
+# Extra modules to skip, because they are not compilable now:
26
+# - regardless if they go to the main kamailio package or to some module
27
+#   package, they will be excluded from compile and install of all.
28
+EXTRA_EXCLUDED_MODULES += bdb
29
+EXTRA_EXCLUDED_MODULES += dbtext
30
+EXTRA_EXCLUDED_MODULES += oracle
31
+EXTRA_EXCLUDED_MODULES += pa
32
+EXTRA_EXCLUDED_MODULES += iptrtpproxy
33
+EXTRA_EXCLUDED_MODULES += dnssec
34
+EXTRA_EXCLUDED_MODULES += java
35
+EXTRA_EXCLUDED_MODULES += python
36
+## --EXCLUDED--
37
+
38
+
39
+# Module groups that are packaged in seperate packages (with the name
40
+# kamailio-$(group_name)-modules).
33 41
 # Note: the order is important (should be in dependency order, the one
34 42
 # on which other depend first)
35
-PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
36
-			   ldap xml perl utils lua memcached \
37
-			   snmpstats carrierroute xmpp cpl redisgeoip geoip2 \
38
-			   sqlite json mono ruby ims sctp \
39
-			   tls outbound websocket autheph kazoo cnxcc \
40
-			   erlang systemd phonenum mongodb rabbitmq python3 mqtt secsipid lwsc nats
43
+PACKAGE_GROUPS += mysql
44
+PACKAGE_GROUPS += postgres
45
+PACKAGE_GROUPS += berkeley
46
+PACKAGE_GROUPS += unixodbc
47
+PACKAGE_GROUPS += radius
48
+PACKAGE_GROUPS += presence
49
+PACKAGE_GROUPS += ldap
50
+PACKAGE_GROUPS += xml
51
+PACKAGE_GROUPS += perl
52
+PACKAGE_GROUPS += utils
53
+PACKAGE_GROUPS += lua
54
+PACKAGE_GROUPS += memcached
55
+PACKAGE_GROUPS += snmpstats
56
+PACKAGE_GROUPS += carrierroute
57
+PACKAGE_GROUPS += xmpp
58
+PACKAGE_GROUPS += cpl
59
+PACKAGE_GROUPS += redis
60
+PACKAGE_GROUPS += geoip
61
+PACKAGE_GROUPS += geoip2
62
+PACKAGE_GROUPS += sqlite
63
+PACKAGE_GROUPS += json
64
+PACKAGE_GROUPS += mono
65
+PACKAGE_GROUPS += ruby
66
+PACKAGE_GROUPS += ims
67
+PACKAGE_GROUPS += sctp
68
+PACKAGE_GROUPS += tls
69
+PACKAGE_GROUPS += outbound
70
+PACKAGE_GROUPS += websocket
71
+PACKAGE_GROUPS += autheph
72
+PACKAGE_GROUPS += kazoo
73
+PACKAGE_GROUPS += cnxcc
74
+PACKAGE_GROUPS += erlang
75
+PACKAGE_GROUPS += systemd
76
+PACKAGE_GROUPS += phonenum
77
+PACKAGE_GROUPS += mongodb
78
+PACKAGE_GROUPS += rabbitmq
79
+PACKAGE_GROUPS += python3
80
+PACKAGE_GROUPS += mqtt
81
+PACKAGE_GROUPS += secsipid
82
+PACKAGE_GROUPS += lwsc
83
+PACKAGE_GROUPS += nats
84
+
85
+# Module groups to be packaged onto kamailio-extra-modules.
86
+EXTRA_GROUPS += ev
87
+EXTRA_GROUPS += gzcompress
88
+EXTRA_GROUPS += jansson
89
+EXTRA_GROUPS += uuid
90
+EXTRA_GROUPS += http_async
91
+
92
+D = $(CURDIR)/debian/$(DEB_SOURCE)
93
+
94
+# Name of libdir in the path for libraries (e.g., the multiarch triplet).
95
+export LIBDIR ?= lib/$(DEB_HOST_MULTIARCH)
41 96
 
42
-# module groups to be packaged onto kamailio-extra-modules
43
-EXTRA_GROUPS=gzcompress uuid ev jansson http_async
97
+# Directories with possible duplicate libraries (that should be deleted
98
+# from current module* packages).
99
+DUP_LIBS_DIRS = $(D)/usr/$(LIBDIR)/kamailio \
100
+                $(D)-db-modules/usr/$(LIBDIR)/kamailio
44 101
 
45
-# name of libdir in the path for libraries (e.g., lib for 32b, lib64 for 64b)
46
-export LIBDIR ?= lib/$(DEB_HOST_MULTIARCH)
102
+# CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
103
+CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
104
+CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
105
+CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
106
+# LDFLAGS -> LD_EXTRA_OPTS
107
+LD_EXTRA_OPTS := $(shell dpkg-buildflags --get LDFLAGS)
47 108
 
48
-# directories with possible duplicate libraries (that should be deleted
49
-# from current module* packages)
50
-DUP_LIBS_DIRS=$(CURDIR)/debian/kamailio/usr/$(LIBDIR)/kamailio \
51
-			$(CURDIR)/debian/kamailio-db-modules/usr/$(LIBDIR)/kamailio
109
+# https://wiki.debian.org/ReproducibleBuilds/
110
+CC_EXTRA_OPTS += -DVERSION_NODATE
52 111
 
53 112
 # "function" to get package short name out of a dir/module_name
54 113
 # it also transforms db_foo into foo
... ...
@@ -64,18 +123,18 @@ endef
64 123
 define PACKAGE_GRP_INSTALL_template
65 124
 	$(foreach grp,$(PACKAGE_GROUPS),\
66 125
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
67
-		BASEDIR=$(CURDIR)/debian/kamailio-$(grp)-modules \
68
-		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
69
-		doc-dir=share/doc/kamailio-$(grp)-modules quiet=verbose
126
+		BASEDIR=$(D)-$(grp)-modules \
127
+		cfg_prefix=$(D)-$(grp)-modules \
128
+		doc-dir=share/doc/$(DEB_SOURCE)-$(grp)-modules quiet=verbose
70 129
 		# eliminate duplicate libs
71 130
 		-for d in $(DUP_LIBS_DIRS); do \
72
-			test "$$d" != "$(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio" &&\
131
+			test "$$d" != "$(D)-$(grp)-modules/usr/$(LIBDIR)/kamailio" &&\
73 132
 			for r in `find $$d -name 'lib*'|xargs`; do \
74 133
 				echo "removing $(grp) lib `basename $$r` present also in $$d";\
75
-				rm -f $(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
134
+				rm -f $(D)-$(grp)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
76 135
 			done ; \
77 136
 		done
78
-		find $(CURDIR)/debian/kamailio-$(grp)-modules -depth -empty -type d -exec rmdir {} \;
137
+		find $(D)-$(grp)-modules -depth -empty -type d -exec rmdir {} \;
79 138
 	)
80 139
 endef
81 140
 
... ...
@@ -89,38 +148,28 @@ endef
89 148
 define PACKAGE_EXTRA_INSTALL_template
90 149
 	$(foreach grp,$(EXTRA_GROUPS),\
91 150
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
92
-		BASEDIR=$(CURDIR)/debian/kamailio-extra-modules \
93
-		cfg_prefix=$(CURDIR)/debian/kamailio-extra-modules \
94
-		doc-dir=share/doc/kamailio-extra-modules quiet=verbose
151
+		BASEDIR=$(D)-extra-modules \
152
+		cfg_prefix=$(D)-extra-modules \
153
+		doc-dir=share/doc/$(DEB_SOURCE)-extra-modules quiet=verbose
95 154
 	)
96 155
 	# eliminate duplicate libs
97 156
 	-for d in $(DUP_LIBS_DIRS); do \
98
-		test "$$d" != "$(CURDIR)/debian/kamailio-extra-modules/usr/$(LIBDIR)/kamailio" &&\
157
+		test "$$d" != "$(D)-extra-modules/usr/$(LIBDIR)/kamailio" &&\
99 158
 		for r in `find $$d -name 'lib*'|xargs`; do \
100 159
 			echo "removing extra lib `basename $$r` present also in $$d";\
101
-			rm -f $(CURDIR)/debian/kamailio-extra-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
160
+			rm -f $(D)-extra-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
102 161
 		done ; \
103 162
 	done
104
-	find $(CURDIR)/debian/kamailio-extra-modules -depth -empty -type d -exec rmdir {} \;
163
+	find $(D)-extra-modules -depth -empty -type d -exec rmdir {} \;
105 164
 endef
106 165
 
107
-# CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
108
-CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
109
-CC_EXTRA_OPTS += $(shell DEB_CFLAGS_MAINT_STRIP=-O2 dpkg-buildflags --get CFLAGS)
110
-CXXFLAGS := $(shell DEB_CXXFLAGS_MAINT_STRIP=-O2 dpkg-buildflags --get CXXFLAGS)
111
-# LDFLAGS -> LD_EXTRA_OPTS
112
-LD_EXTRA_OPTS := $(shell dpkg-buildflags --get LDFLAGS)
113
-
114
-# https://wiki.debian.org/ReproducibleBuilds/
115
-CC_EXTRA_OPTS += -DVERSION_NODATE
116
-
117 166
 configure: configure-stamp
118 167
 configure-stamp:
119 168
 	dh_testdir
120 169
 	# Add here commands to configure the package.
121
-	$(MAKE) FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$(CURDIR)/debian/kamailio \
170
+	$(MAKE) FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$(D) \
122 171
 			cfg_target=/etc/kamailio/ \
123
-			BASEDIR=$(CURDIR)/debian/kamailio \
172
+			BASEDIR=$(D) \
124 173
 			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
125 174
 			CC_EXTRA_OPTS="$(CC_EXTRA_OPTS)" \
126 175
 			LD_EXTRA_OPTS="$(LD_EXTRA_OPTS)" \
... ...
@@ -159,13 +208,13 @@ install: build
159 208
 	# make group packages
160 209
 	$(call PACKAGE_GRP_INSTALL_template)
161 210
 	$(call PACKAGE_EXTRA_INSTALL_template)
162
-	mv $(CURDIR)/debian/kamailio-berkeley-modules/usr/sbin/kambdb_recover \
163
-		$(CURDIR)/debian/kamailio-berkeley-bin/usr/sbin/kambdb_recover
211
+	mv $(D)-berkeley-modules/usr/sbin/kambdb_recover \
212
+		$(D)-berkeley-bin/usr/sbin/kambdb_recover
164 213
 	# install /etc/default/kamailio file
165
-	mkdir -p $(CURDIR)/debian/kamailio/etc/default
166
-	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
214
+	mkdir -p $(D)/etc/default
215
+	cp -f debian/kamailio.default $(D)/etc/default/kamailio
167 216
 	# delete /run/kamailio dir
168
-	rm -rf $(CURDIR)/debian/kamailio/usr/local
217
+	rm -rf $(D)/usr/local
169 218
 
170 219
 
171 220
 # This single target is used to build all the packages, all at once, or
... ...
@@ -213,16 +262,5 @@ binary-arch: build install
213 262
 binary-%: build install
214 263
 	$(MAKE) -f debian/rules binary-common DH_OPTIONS=-p$*
215 264
 
216
-print-version:
217
-	@@echo "Debian version:          $(DEBVERSION)"
218
-	@@echo "Upstream version:        $(UPVERSION)"
219
-
220
-get-orig-source:
221
-	@@dh_testdir
222
-	@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
223
-	@@echo Downloading $(FILENAME) from $(URL) ...
224
-	@@wget -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL)
225
-
226 265
 binary: binary-indep binary-arch
227 266
 .PHONY: build clean binary-indep binary-arch binary install configure
228
-
Browse code

pkg: Fix typos

Bastian Triller authored on 05/05/2022 16:20:11 • Henning Westerholt committed on 08/05/2022 15:30:14
Showing 1 changed files
... ...
@@ -28,7 +28,7 @@ EXCLUDED_MODULES= java python
28 28
 # they will be excluded from compile and install of all
29 29
 EXTRA_EXCLUDED_MODULES=bdb dbtext oracle pa iptrtpproxy mi_xmlrpc dnssec
30 30
 
31
-# module groups that are packaged in seperate packages
31
+# module groups that are packaged in separate packages
32 32
 # (with the name kamailio-$(group_name)-modules)
33 33
 # Note: the order is important (should be in dependency order, the one
34 34
 # on which other depend first)
Browse code

pkg/kamailio/deb: fix backports rules related to nats

Victor Seva authored on 25/02/2022 15:19:51
Showing 1 changed files
... ...
@@ -37,7 +37,7 @@ PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
37 37
 			   snmpstats carrierroute xmpp cpl redisgeoip geoip2 \
38 38
 			   sqlite json mono ruby ims sctp \
39 39
 			   tls outbound websocket autheph kazoo cnxcc \
40
-			   erlang nats systemd phonenum mongodb rabbitmq python3 mqtt secsipid lwsc
40
+			   erlang systemd phonenum mongodb rabbitmq python3 mqtt secsipid lwsc nats
41 41
 
42 42
 # module groups to be packaged onto kamailio-extra-modules
43 43
 EXTRA_GROUPS=gzcompress uuid ev jansson http_async
Browse code

pkg/kamailio/deb: fix rules

Victor Seva authored on 17/02/2022 23:18:03
Showing 1 changed files
... ...
@@ -37,7 +37,7 @@ PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
37 37
 			   snmpstats carrierroute xmpp cpl redisgeoip geoip2 \
38 38
 			   sqlite json mono ruby ims sctp \
39 39
 			   tls outbound websocket autheph kazoo cnxcc \
40
-			   erlang systemd phonenum mongodb rabbitmq python3 mqtt secsipid lwsc nats
40
+			   erlang nats systemd phonenum mongodb rabbitmq python3 mqtt secsipid lwsc
41 41
 
42 42
 # module groups to be packaged onto kamailio-extra-modules
43 43
 EXTRA_GROUPS=gzcompress uuid ev jansson http_async
Browse code

pkg/kamailio/deb: kamailio-nats-modules

for now just for sid, libnats-dev not yet in bookworm

Victor Seva authored on 17/02/2022 22:27:27
Showing 1 changed files
... ...
@@ -37,7 +37,7 @@ PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
37 37
 			   snmpstats carrierroute xmpp cpl redisgeoip geoip2 \
38 38
 			   sqlite json mono ruby ims sctp \
39 39
 			   tls outbound websocket autheph kazoo cnxcc \
40
-			   erlang systemd phonenum mongodb rabbitmq python3 mqtt secsipid lwsc
40
+			   erlang systemd phonenum mongodb rabbitmq python3 mqtt secsipid lwsc nats
41 41
 
42 42
 # module groups to be packaged onto kamailio-extra-modules
43 43
 EXTRA_GROUPS=gzcompress uuid ev jansson http_async
Browse code

pkg/kamailio/deb: fix bookworm and sid build

* no python2 and dh-systemd package available

Victor Seva authored on 04/12/2021 15:52:26
Showing 1 changed files
... ...
@@ -21,7 +21,7 @@ include /usr/share/dpkg/buildflags.mk
21 21
 export RADCLI=1
22 22
 
23 23
 # modules not in the "main" kamailio package
24
-EXCLUDED_MODULES= java
24
+EXCLUDED_MODULES= java python
25 25
 
26 26
 # extra modules to skip, because they are not compilable now
27 27
 # - regardless if they go to the main kamailio package or to some module package,
... ...
@@ -34,7 +34,7 @@ EXTRA_EXCLUDED_MODULES=bdb dbtext oracle pa iptrtpproxy mi_xmlrpc dnssec
34 34
 # on which other depend first)
35 35
 PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
36 36
 			   ldap xml perl utils lua memcached \
37
-			   snmpstats carrierroute xmpp cpl redis python geoip geoip2 \
37
+			   snmpstats carrierroute xmpp cpl redisgeoip geoip2 \
38 38
 			   sqlite json mono ruby ims sctp \
39 39
 			   tls outbound websocket autheph kazoo cnxcc \
40 40
 			   erlang systemd phonenum mongodb rabbitmq python3 mqtt secsipid lwsc
Browse code

pkg/kamailio/deb: missing lwsc module files [skip ci]

fixes #2749

Victor Seva authored on 27/05/2021 12:03:01
Showing 1 changed files
... ...
@@ -37,7 +37,7 @@ PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
37 37
 			   snmpstats carrierroute xmpp cpl redis python geoip geoip2 \
38 38
 			   sqlite json mono ruby ims sctp \
39 39
 			   tls outbound websocket autheph kazoo cnxcc \
40
-			   erlang systemd phonenum mongodb rabbitmq python3 mqtt secsipid lwcs
40
+			   erlang systemd phonenum mongodb rabbitmq python3 mqtt secsipid lwsc
41 41
 
42 42
 # module groups to be packaged onto kamailio-extra-modules
43 43
 EXTRA_GROUPS=gzcompress uuid ev jansson http_async
Browse code

pkg/kamailio/deb: add lwcs module

* enable only the ones with libwebsockets >= 3.1

Victor Seva authored on 15/04/2021 11:46:50
Showing 1 changed files
... ...
@@ -37,7 +37,7 @@ PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
37 37
 			   snmpstats carrierroute xmpp cpl redis python geoip geoip2 \
38 38
 			   sqlite json mono ruby ims sctp \
39 39
 			   tls outbound websocket autheph kazoo cnxcc \
40
-			   erlang systemd phonenum mongodb rabbitmq python3 mqtt secsipid
40
+			   erlang systemd phonenum mongodb rabbitmq python3 mqtt secsipid lwcs
41 41
 
42 42
 # module groups to be packaged onto kamailio-extra-modules
43 43
 EXTRA_GROUPS=gzcompress uuid ev jansson http_async
Browse code

pkg/kamailio/deb: add secsipid package for supported releases [skip ci]

Victor Seva authored on 19/02/2021 14:04:39
Showing 1 changed files
... ...
@@ -37,7 +37,7 @@ PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
37 37
 			   snmpstats carrierroute xmpp cpl redis python geoip geoip2 \
38 38
 			   sqlite json mono ruby ims sctp \
39 39
 			   tls outbound websocket autheph kazoo cnxcc \
40
-			   erlang systemd phonenum mongodb rabbitmq python3 mqtt
40
+			   erlang systemd phonenum mongodb rabbitmq python3 mqtt secsipid
41 41
 
42 42
 # module groups to be packaged onto kamailio-extra-modules
43 43
 EXTRA_GROUPS=gzcompress uuid ev jansson http_async
Browse code

pkg/kamailio/deb: add mqtt to PACKAGE_GROUPS

Victor Seva authored on 07/01/2020 10:32:43
Showing 1 changed files
... ...
@@ -37,7 +37,7 @@ PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
37 37
 			   snmpstats carrierroute xmpp cpl redis python geoip geoip2 \
38 38
 			   sqlite json mono ruby ims sctp \
39 39
 			   tls outbound websocket autheph kazoo cnxcc \
40
-			   erlang systemd phonenum mongodb rabbitmq python3
40
+			   erlang systemd phonenum mongodb rabbitmq python3 mqtt
41 41
 
42 42
 # module groups to be packaged onto kamailio-extra-modules
43 43
 EXTRA_GROUPS=gzcompress uuid ev jansson http_async
Browse code

pkg/deb: switch from deprecated /var/run to /run

The FHS 3.0 [F] has deprecated /var/run in favor of /run. Current
distributions have done so for a long time (for example in Debian
since 6.0 “squeeze”), even though they provide a compatibility
symlink from /var/run to /run. But software like systemd have
started emitting warnings when using /var/run, for example for
its PIDFile directive, which pollutes the logs.

Guillem Jover authored on 25/10/2019 09:51:20 • Daniel-Constantin Mierla committed on 25/10/2019 10:00:46
Showing 1 changed files
... ...
@@ -164,7 +164,7 @@ install: build
164 164
 	# install /etc/default/kamailio file
165 165
 	mkdir -p $(CURDIR)/debian/kamailio/etc/default
166 166
 	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
167
-	# delete /var/run/kamailio dir
167
+	# delete /run/kamailio dir
168 168
 	rm -rf $(CURDIR)/debian/kamailio/usr/local
169 169
 
170 170
 
Browse code

pkg/kamailio/deb: add kamailio-python3-modules

Victor Seva authored on 24/12/2018 07:44:06
Showing 1 changed files
... ...
@@ -37,7 +37,7 @@ PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
37 37
 			   snmpstats carrierroute xmpp cpl redis python geoip geoip2 \
38 38
 			   sqlite json mono ruby ims sctp \
39 39
 			   tls outbound websocket autheph kazoo cnxcc \
40
-			   erlang systemd phonenum mongodb rabbitmq
40
+			   erlang systemd phonenum mongodb rabbitmq python3
41 41
 
42 42
 # module groups to be packaged onto kamailio-extra-modules
43 43
 EXTRA_GROUPS=gzcompress uuid ev jansson http_async
Browse code

pkg/kamailio/deb: add kamailio-ruby-modules [skip ci]

Victor Seva authored on 11/12/2018 09:53:24
Showing 1 changed files
... ...
@@ -35,7 +35,7 @@ EXTRA_EXCLUDED_MODULES=bdb dbtext oracle pa iptrtpproxy mi_xmlrpc dnssec
35 35
 PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
36 36
 			   ldap xml perl utils lua memcached \
37 37
 			   snmpstats carrierroute xmpp cpl redis python geoip geoip2 \
38
-			   sqlite json mono ims sctp \
38
+			   sqlite json mono ruby ims sctp \
39 39
 			   tls outbound websocket autheph kazoo cnxcc \
40 40
 			   erlang systemd phonenum mongodb rabbitmq
41 41
 
Browse code

pkg/kamailio/deb: enable verbose builds

Victor Seva authored on 27/09/2018 16:28:34
Showing 1 changed files
... ...
@@ -57,7 +57,7 @@ mod_name=$(subst db_,,$(lastword $(subst /, ,$(1))))
57 57
 define PACKAGE_GRP_BUILD_template
58 58
 	# package all the modules in PACKAGE_GROUPS in separate packages
59 59
 	$(foreach grp,$(PACKAGE_GROUPS),\
60
-		$(MAKE) every-module group_include="k$(grp)"
60
+		$(MAKE) every-module group_include="k$(grp)" quiet=verbose
61 61
 	)
62 62
 endef
63 63
 
... ...
@@ -66,7 +66,7 @@ define PACKAGE_GRP_INSTALL_template
66 66
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
67 67
 		BASEDIR=$(CURDIR)/debian/kamailio-$(grp)-modules \
68 68
 		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
69
-		doc-dir=share/doc/kamailio-$(grp)-modules
69
+		doc-dir=share/doc/kamailio-$(grp)-modules quiet=verbose
70 70
 		# eliminate duplicate libs
71 71
 		-for d in $(DUP_LIBS_DIRS); do \
72 72
 			test "$$d" != "$(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio" &&\
... ...
@@ -82,7 +82,7 @@ endef
82 82
 define PACKAGE_EXTRA_BUILD_template
83 83
 	# package all the modules in EXTRA_GROUPS in separate packages
84 84
 	$(foreach grp,$(EXTRA_GROUPS),\
85
-		$(MAKE) every-module group_include="k$(grp)"
85
+		$(MAKE) every-module group_include="k$(grp)" quiet=verbose
86 86
 	)
87 87
 endef
88 88
 
... ...
@@ -91,7 +91,7 @@ define PACKAGE_EXTRA_INSTALL_template
91 91
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
92 92
 		BASEDIR=$(CURDIR)/debian/kamailio-extra-modules \
93 93
 		cfg_prefix=$(CURDIR)/debian/kamailio-extra-modules \
94
-		doc-dir=share/doc/kamailio-extra-modules
94
+		doc-dir=share/doc/kamailio-extra-modules quiet=verbose
95 95
 	)
96 96
 	# eliminate duplicate libs
97 97
 	-for d in $(DUP_LIBS_DIRS); do \
... ...
@@ -124,7 +124,7 @@ configure-stamp:
124 124
 			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
125 125
 			CC_EXTRA_OPTS="$(CC_EXTRA_OPTS)" \
126 126
 			LD_EXTRA_OPTS="$(LD_EXTRA_OPTS)" \
127
-			group_include="kstandard"
127
+			group_include="kstandard" quiet=verbose
128 128
 
129 129
 	touch configure-stamp
130 130
 
... ...
@@ -135,7 +135,7 @@ build-indep: build-stamp
135 135
 build-stamp: configure-stamp
136 136
 	dh_testdir
137 137
 	# Add here commands to compile the package.
138
-	$(MAKE) all
138
+	$(MAKE) all quiet=verbose
139 139
 	# make groups
140 140
 	$(call PACKAGE_GRP_BUILD_template)
141 141
 	$(call PACKAGE_EXTRA_BUILD_template)
Browse code

pkg/kamailio/deb: remove app_java from sid/buster

See #1487

Victor Seva authored on 04/04/2018 15:04:22
Showing 1 changed files
... ...
@@ -18,11 +18,10 @@ include /usr/share/dpkg/buildflags.mk
18 18
 # Uncomment this to turn on verbose mode.
19 19
 #export DH_VERBOSE=1
20 20
 
21
-export JAVA_HOME=/usr/lib/jvm/java-gcj
22 21
 export RADCLI=1
23 22
 
24 23
 # modules not in the "main" kamailio package
25
-EXCLUDED_MODULES=
24
+EXCLUDED_MODULES= java
26 25
 
27 26
 # extra modules to skip, because they are not compilable now
28 27
 # - regardless if they go to the main kamailio package or to some module package,
... ...
@@ -36,7 +35,7 @@ EXTRA_EXCLUDED_MODULES=bdb dbtext oracle pa iptrtpproxy mi_xmlrpc dnssec
36 35
 PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
37 36
 			   ldap xml perl utils lua memcached \
38 37
 			   snmpstats carrierroute xmpp cpl redis python geoip geoip2 \
39
-			   sqlite json mono ims sctp java \
38
+			   sqlite json mono ims sctp \
40 39
 			   tls outbound websocket autheph kazoo cnxcc \
41 40
 			   erlang systemd phonenum mongodb rabbitmq
42 41
 
Browse code

pkg/kamailio/deb: kamailio-mongodb-modules [skip ci]

Victor Seva authored on 11/12/2017 10:15:20
Showing 1 changed files
... ...
@@ -38,7 +38,7 @@ PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
38 38
 			   snmpstats carrierroute xmpp cpl redis python geoip geoip2 \
39 39
 			   sqlite json mono ims sctp java \
40 40
 			   tls outbound websocket autheph kazoo cnxcc \
41
-			   erlang systemd phonenum rabbitmq
41
+			   erlang systemd phonenum mongodb rabbitmq
42 42
 
43 43
 # module groups to be packaged onto kamailio-extra-modules
44 44
 EXTRA_GROUPS=gzcompress uuid ev jansson http_async
Browse code

pkg/kamailio/deb: kamailio-phonenum-modules [skip ci]

Victor Seva authored on 08/12/2017 11:29:12
Showing 1 changed files
... ...
@@ -38,7 +38,7 @@ PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
38 38
 			   snmpstats carrierroute xmpp cpl redis python geoip geoip2 \
39 39
 			   sqlite json mono ims sctp java \
40 40
 			   tls outbound websocket autheph kazoo cnxcc \
41
-			   erlang systemd rabbitmq
41
+			   erlang systemd phonenum rabbitmq
42 42
 
43 43
 # module groups to be packaged onto kamailio-extra-modules
44 44
 EXTRA_GROUPS=gzcompress uuid ev jansson http_async
Browse code

pkg/kamailio/deb: geoip2 module [skip ci]

fix #1352

Victor Seva authored on 08/12/2017 08:32:46
Showing 1 changed files
... ...
@@ -35,7 +35,7 @@ EXTRA_EXCLUDED_MODULES=bdb dbtext oracle pa iptrtpproxy mi_xmlrpc dnssec
35 35
 # on which other depend first)
36 36
 PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
37 37
 			   ldap xml perl utils lua memcached \
38
-			   snmpstats carrierroute xmpp cpl redis python geoip\
38
+			   snmpstats carrierroute xmpp cpl redis python geoip geoip2 \
39 39
 			   sqlite json mono ims sctp java \
40 40
 			   tls outbound websocket autheph kazoo cnxcc \
41 41
 			   erlang systemd rabbitmq
Browse code

pkg/kamailio/deb: set LIBDIR for all rules

* default path to modules was wrong

Fix #1096

Victor Seva authored on 27/04/2017 17:05:35
Showing 1 changed files
... ...
@@ -44,7 +44,7 @@ PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
44 44
 EXTRA_GROUPS=gzcompress uuid ev jansson http_async
45 45
 
46 46
 # name of libdir in the path for libraries (e.g., lib for 32b, lib64 for 64b)
47
-LIBDIR ?= lib/$(DEB_HOST_MULTIARCH)
47
+export LIBDIR ?= lib/$(DEB_HOST_MULTIARCH)
48 48
 
49 49
 # directories with possible duplicate libraries (that should be deleted
50 50
 # from current module* packages)
... ...
@@ -156,7 +156,7 @@ install: build
156 156
 	dh_prep
157 157
 	dh_installdirs
158 158
 	# Add here commands to install the package into debian/kamailio
159
-	$(MAKE) install LIBDIR=$(LIBDIR) group_include="kstandard"
159
+	$(MAKE) install group_include="kstandard"
160 160
 	# make group packages
161 161
 	$(call PACKAGE_GRP_INSTALL_template)
162 162
 	$(call PACKAGE_EXTRA_INSTALL_template)
Browse code

pkg/kamailio/deb: strip default -02 from CC_EXTRA_OPTS

Fix #1004

Victor Seva authored on 22/02/2017 14:15:29
Showing 1 changed files
... ...
@@ -107,8 +107,8 @@ endef
107 107
 
108 108
 # CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
109 109
 CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
110
-CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
111
-CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
110
+CC_EXTRA_OPTS += $(shell DEB_CFLAGS_MAINT_STRIP=-O2 dpkg-buildflags --get CFLAGS)
111
+CXXFLAGS := $(shell DEB_CXXFLAGS_MAINT_STRIP=-O2 dpkg-buildflags --get CXXFLAGS)
112 112
 # LDFLAGS -> LD_EXTRA_OPTS
113 113
 LD_EXTRA_OPTS := $(shell dpkg-buildflags --get LDFLAGS)
114 114
 
Browse code

Revert "pkg/kamailio/deb: remove kazoo package"

This reverts commit e3297bccc97ddc4349bcf69de59eb337c05bbae3.

Victor Seva authored on 31/01/2017 13:08:31
Showing 1 changed files
... ...
@@ -37,7 +37,7 @@ PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
37 37
 			   ldap xml perl utils lua memcached \
38 38
 			   snmpstats carrierroute xmpp cpl redis python geoip\
39 39
 			   sqlite json mono ims sctp java \
40
-			   tls outbound websocket autheph cnxcc \
40
+			   tls outbound websocket autheph kazoo cnxcc \
41 41
 			   erlang systemd rabbitmq
42 42
 
43 43
 # module groups to be packaged onto kamailio-extra-modules
Browse code

pkg/kamailio/deb: remove kazoo package

* previous package will be upgrade to rabbitmq

Victor Seva authored on 31/01/2017 09:46:29
Showing 1 changed files
... ...
@@ -37,7 +37,7 @@ PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
37 37
 			   ldap xml perl utils lua memcached \
38 38
 			   snmpstats carrierroute xmpp cpl redis python geoip\
39 39
 			   sqlite json mono ims sctp java \
40
-			   tls outbound websocket autheph kazoo cnxcc \
40
+			   tls outbound websocket autheph cnxcc \
41 41
 			   erlang systemd rabbitmq
42 42
 
43 43
 # module groups to be packaged onto kamailio-extra-modules
Browse code

Packaging: Add RabbitMQ Package to Debian Packaging

Carsten Bock authored on 31/01/2017 09:04:42
Showing 1 changed files
... ...
@@ -38,7 +38,7 @@ PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
38 38
 			   snmpstats carrierroute xmpp cpl redis python geoip\
39 39
 			   sqlite json mono ims sctp java \
40 40
 			   tls outbound websocket autheph kazoo cnxcc \
41
-			   erlang systemd
41
+			   erlang systemd rabbitmq
42 42
 
43 43
 # module groups to be packaged onto kamailio-extra-modules
44 44
 EXTRA_GROUPS=gzcompress uuid ev jansson http_async
Browse code

pkg/kamailio/deb: remove dnssec from stretch/sid due #851

Victor Seva authored on 30/01/2017 13:06:22
Showing 1 changed files
... ...
@@ -27,7 +27,7 @@ EXCLUDED_MODULES=
27 27
 # extra modules to skip, because they are not compilable now
28 28
 # - regardless if they go to the main kamailio package or to some module package,
29 29
 # they will be excluded from compile and install of all
30
-EXTRA_EXCLUDED_MODULES=bdb dbtext oracle pa iptrtpproxy mi_xmlrpc
30
+EXTRA_EXCLUDED_MODULES=bdb dbtext oracle pa iptrtpproxy mi_xmlrpc dnssec
31 31
 
32 32
 # module groups that are packaged in seperate packages
33 33
 # (with the name kamailio-$(group_name)-modules)
... ...
@@ -37,7 +37,7 @@ PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
37 37
 			   ldap xml perl utils lua memcached \
38 38
 			   snmpstats carrierroute xmpp cpl redis python geoip\
39 39
 			   sqlite json mono ims sctp java \
40
-			   tls outbound websocket autheph dnssec kazoo cnxcc \
40
+			   tls outbound websocket autheph kazoo cnxcc \
41 41
 			   erlang systemd
42 42
 
43 43
 # module groups to be packaged onto kamailio-extra-modules
Browse code

pkg/kamailio/deb: remove obsolete purple module from packages

Victor Seva authored on 13/12/2016 09:33:53
Showing 1 changed files
... ...
@@ -37,7 +37,7 @@ PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
37 37
 			   ldap xml perl utils lua memcached \
38 38
 			   snmpstats carrierroute xmpp cpl redis python geoip\
39 39
 			   sqlite json mono ims sctp java \
40
-			   purple tls outbound websocket autheph dnssec kazoo cnxcc \
40
+			   tls outbound websocket autheph dnssec kazoo cnxcc \
41 41
 			   erlang systemd
42 42
 
43 43
 # module groups to be packaged onto kamailio-extra-modules
Browse code

pkg/kamailio/deb: add http_async to kamailio-extra-modules

Victor Seva authored on 05/07/2016 17:18:54
Showing 1 changed files
... ...
@@ -41,7 +41,7 @@ PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
41 41
 			   erlang systemd
42 42
 
43 43
 # module groups to be packaged onto kamailio-extra-modules
44
-EXTRA_GROUPS=gzcompress uuid ev jansson
44
+EXTRA_GROUPS=gzcompress uuid ev jansson http_async
45 45
 
46 46
 # name of libdir in the path for libraries (e.g., lib for 32b, lib64 for 64b)
47 47
 LIBDIR ?= lib/$(DEB_HOST_MULTIARCH)
Browse code

pkg/kamailio/deb: add kamailio-systemd-modules package

Victor Seva authored on 05/07/2016 16:58:45
Showing 1 changed files
... ...
@@ -38,7 +38,7 @@ PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
38 38
 			   snmpstats carrierroute xmpp cpl redis python geoip\
39 39
 			   sqlite json mono ims sctp java \
40 40
 			   purple tls outbound websocket autheph dnssec kazoo cnxcc \
41
-			   erlang
41
+			   erlang systemd
42 42
 
43 43
 # module groups to be packaged onto kamailio-extra-modules
44 44
 EXTRA_GROUPS=gzcompress uuid ev jansson
Browse code

pkg/kamailio/deb: fix build rule for modules

Victor Seva authored on 03/06/2016 09:12:50
Showing 1 changed files
... ...
@@ -57,12 +57,11 @@ mod_name=$(subst db_,,$(lastword $(subst /, ,$(1))))
57 57
 
58 58
 define PACKAGE_GRP_BUILD_template
59 59
 	# package all the modules in PACKAGE_GROUPS in separate packages
60
-	$(foreach grp,$(PACKAGE_GROUPS EXTRA_GROUPS),\
60
+	$(foreach grp,$(PACKAGE_GROUPS),\
61 61
 		$(MAKE) every-module group_include="k$(grp)"
62 62
 	)
63 63
 endef
64 64
 
65
-
66 65
 define PACKAGE_GRP_INSTALL_template
67 66
 	$(foreach grp,$(PACKAGE_GROUPS),\
68 67
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
... ...
@@ -81,6 +80,13 @@ define PACKAGE_GRP_INSTALL_template
81 80
 	)
82 81
 endef
83 82
 
83
+define PACKAGE_EXTRA_BUILD_template
84
+	# package all the modules in EXTRA_GROUPS in separate packages
85
+	$(foreach grp,$(EXTRA_GROUPS),\
86
+		$(MAKE) every-module group_include="k$(grp)"
87
+	)
88
+endef
89
+
84 90
 define PACKAGE_EXTRA_INSTALL_template
85 91
 	$(foreach grp,$(EXTRA_GROUPS),\
86 92
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
... ...
@@ -133,6 +139,7 @@ build-stamp: configure-stamp
133 139
 	$(MAKE) all
134 140
 	# make groups
135 141
 	$(call PACKAGE_GRP_BUILD_template)
142
+	$(call PACKAGE_EXTRA_BUILD_template)
136 143
 	touch build-stamp
137 144
 
138 145
 clean:
Browse code

pkg/kamailio/deb: use libradcli-dev for radius

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=822338

kamailio-radius-modules depends on libfreeradius-client
libfreeradius-client has been deprecated in favor of radcli[1]

Victor Seva authored on 03/05/2016 08:18:14 • Victor Seva committed on 10/05/2016 06:25:06
Showing 1 changed files
... ...
@@ -19,9 +19,7 @@ include /usr/share/dpkg/buildflags.mk
19 19
 #export DH_VERBOSE=1
20 20
 
21 21
 export JAVA_HOME=/usr/lib/jvm/java-gcj
22
-
23
-# choose freeradius
24
-export FREERADIUS=1
22
+export RADCLI=1
25 23
 
26 24
 # modules not in the "main" kamailio package
27 25
 EXCLUDED_MODULES=
Browse code

pkg/kamailio/deb: add systemd support

Fix #294

Victor Seva authored on 03/11/2015 19:36:26
Showing 1 changed files
... ...
@@ -175,7 +175,9 @@ binary-common:
175 175
 	dh_installdocs
176 176
 	dh_installexamples -Xobsoleted -Xsr
177 177
 	dh_installmenu
178
+	dh_systemd_enable -pkamailio
178 179
 	dh_installinit -pkamailio -- defaults 23
180
+	dh_systemd_start -pkamailio
179 181
 	dh_installcron
180 182
 	dh_installman
181 183
 	dh_installinfo
Browse code

pkg/kamailio/deb: add sid support

Victor Seva authored on 18/07/2015 09:53:27
Showing 1 changed files
1 1
new file mode 100755
... ...
@@ -0,0 +1,222 @@
1
+#!/usr/bin/make -f
2
+# Sample debian/rules that uses debhelper.
3
+# GNU copyright 1997 to 1999 by Joey Hess.
4
+
5
+DEBVERSION:=$(shell head -n 1 debian/changelog \
6
+                    | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
7
+UPVERSION:=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
8
+
9
+FILENAME := kamailio_$(UPVERSION).orig.tar.gz
10
+URL := http://www.kamailio.org/pub/kamailio/$(UPVERSION)/src/kamailio-$(UPVERSION)_src.tar.gz
11
+
12
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
13
+
14
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
15
+DPKG_EXPORT_BUILDFLAGS = 1
16
+include /usr/share/dpkg/buildflags.mk
17
+
18
+# Uncomment this to turn on verbose mode.
19
+#export DH_VERBOSE=1
20
+
21
+export JAVA_HOME=/usr/lib/jvm/java-gcj
22
+
23
+# choose freeradius
24
+export FREERADIUS=1
25
+
26
+# modules not in the "main" kamailio package
27
+EXCLUDED_MODULES=
28
+
29
+# extra modules to skip, because they are not compilable now
30
+# - regardless if they go to the main kamailio package or to some module package,
31
+# they will be excluded from compile and install of all
32
+EXTRA_EXCLUDED_MODULES=bdb dbtext oracle pa iptrtpproxy mi_xmlrpc
33
+
34
+# module groups that are packaged in seperate packages
35
+# (with the name kamailio-$(group_name)-modules)
36
+# Note: the order is important (should be in dependency order, the one
37
+# on which other depend first)
38
+PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
39
+			   ldap xml perl utils lua memcached \
40
+			   snmpstats carrierroute xmpp cpl redis python geoip\
41
+			   sqlite json mono ims sctp java \
42
+			   purple tls outbound websocket autheph dnssec kazoo cnxcc \
43
+			   erlang
44
+
45
+# module groups to be packaged onto kamailio-extra-modules
46
+EXTRA_GROUPS=gzcompress uuid ev jansson
47
+
48
+# name of libdir in the path for libraries (e.g., lib for 32b, lib64 for 64b)
49
+LIBDIR ?= lib/$(DEB_HOST_MULTIARCH)
50
+
51
+# directories with possible duplicate libraries (that should be deleted
52
+# from current module* packages)
53
+DUP_LIBS_DIRS=$(CURDIR)/debian/kamailio/usr/$(LIBDIR)/kamailio \
54
+			$(CURDIR)/debian/kamailio-db-modules/usr/$(LIBDIR)/kamailio
55
+
56
+# "function" to get package short name out of a dir/module_name
57
+# it also transforms db_foo into foo
58
+mod_name=$(subst db_,,$(lastword $(subst /, ,$(1))))
59
+
60
+define PACKAGE_GRP_BUILD_template
61
+	# package all the modules in PACKAGE_GROUPS in separate packages
62
+	$(foreach grp,$(PACKAGE_GROUPS EXTRA_GROUPS),\
63
+		$(MAKE) every-module group_include="k$(grp)"
64
+	)
65
+endef
66
+
67
+
68
+define PACKAGE_GRP_INSTALL_template
69
+	$(foreach grp,$(PACKAGE_GROUPS),\
70
+		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
71
+		BASEDIR=$(CURDIR)/debian/kamailio-$(grp)-modules \
72
+		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
73
+		doc-dir=share/doc/kamailio-$(grp)-modules
74
+		# eliminate duplicate libs
75
+		-for d in $(DUP_LIBS_DIRS); do \
76
+			test "$$d" != "$(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio" &&\
77
+			for r in `find $$d -name 'lib*'|xargs`; do \
78
+				echo "removing $(grp) lib `basename $$r` present also in $$d";\
79
+				rm -f $(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
80
+			done ; \
81
+		done
82
+		find $(CURDIR)/debian/kamailio-$(grp)-modules -depth -empty -type d -exec rmdir {} \;
83
+	)
84
+endef
85
+
86
+define PACKAGE_EXTRA_INSTALL_template
87
+	$(foreach grp,$(EXTRA_GROUPS),\
88
+		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
89
+		BASEDIR=$(CURDIR)/debian/kamailio-extra-modules \
90
+		cfg_prefix=$(CURDIR)/debian/kamailio-extra-modules \
91
+		doc-dir=share/doc/kamailio-extra-modules
92
+	)
93
+	# eliminate duplicate libs
94
+	-for d in $(DUP_LIBS_DIRS); do \
95
+		test "$$d" != "$(CURDIR)/debian/kamailio-extra-modules/usr/$(LIBDIR)/kamailio" &&\
96
+		for r in `find $$d -name 'lib*'|xargs`; do \
97
+			echo "removing extra lib `basename $$r` present also in $$d";\
98
+			rm -f $(CURDIR)/debian/kamailio-extra-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
99
+		done ; \
100
+	done
101
+	find $(CURDIR)/debian/kamailio-extra-modules -depth -empty -type d -exec rmdir {} \;
102
+endef
103
+
104
+# CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
105
+CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
106
+CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
107
+CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
108
+# LDFLAGS -> LD_EXTRA_OPTS
109
+LD_EXTRA_OPTS := $(shell dpkg-buildflags --get LDFLAGS)
110
+
111
+# https://wiki.debian.org/ReproducibleBuilds/
112
+CC_EXTRA_OPTS += -DVERSION_NODATE
113
+
114
+configure: configure-stamp
115
+configure-stamp:
116
+	dh_testdir
117
+	# Add here commands to configure the package.
118
+	$(MAKE) FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$(CURDIR)/debian/kamailio \
119
+			cfg_target=/etc/kamailio/ \
120
+			BASEDIR=$(CURDIR)/debian/kamailio \
121
+			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
122
+			CC_EXTRA_OPTS="$(CC_EXTRA_OPTS)" \
123
+			LD_EXTRA_OPTS="$(LD_EXTRA_OPTS)" \
124
+			group_include="kstandard"
125
+
126
+	touch configure-stamp
127
+
128
+
129
+build: build-stamp
130
+build-arch: build-stamp
131
+build-indep: build-stamp
132
+build-stamp: configure-stamp
133
+	dh_testdir
134
+	# Add here commands to compile the package.
135
+	$(MAKE) all
136
+	# make groups
137
+	$(call PACKAGE_GRP_BUILD_template)
138
+	touch build-stamp
139
+
140
+clean:
141
+	dh_testdir
142
+	dh_testroot
143
+	rm -f build-stamp configure-stamp
144
+	# Add here commands to clean up after the build process.
145
+	$(MAKE) maintainer-clean
146
+	dh_clean
147
+
148
+install: build
149
+	dh_testdir
150
+	dh_testroot
151
+	dh_prep
152
+	dh_installdirs
153
+	# Add here commands to install the package into debian/kamailio
154
+	$(MAKE) install LIBDIR=$(LIBDIR) group_include="kstandard"
155
+	# make group packages
156
+	$(call PACKAGE_GRP_INSTALL_template)
157
+	$(call PACKAGE_EXTRA_INSTALL_template)
158
+	mv $(CURDIR)/debian/kamailio-berkeley-modules/usr/sbin/kambdb_recover \
159
+		$(CURDIR)/debian/kamailio-berkeley-bin/usr/sbin/kambdb_recover
160
+	# install /etc/default/kamailio file
161
+	mkdir -p $(CURDIR)/debian/kamailio/etc/default
162
+	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
163
+	# delete /var/run/kamailio dir
164
+	rm -rf $(CURDIR)/debian/kamailio/usr/local
165
+
166
+
167
+# This single target is used to build all the packages, all at once, or
168
+# one at a time. So keep in mind: any options passed to commands here will
169
+# affect _all_ packages. Anything you want to only affect one package
170
+# should be put in another target, such as the install target.
171
+binary-common:
172
+	dh_testdir
173
+	dh_testroot
174
+	dh_installdebconf
175
+	dh_installdocs
176
+	dh_installexamples -Xobsoleted -Xsr
177
+	dh_installmenu
178
+	dh_installinit -pkamailio -- defaults 23
179
+	dh_installcron
180
+	dh_installman
181
+	dh_installinfo
182
+	dh_lintian
183
+	dh_installchangelogs ChangeLog
184
+	dh_link
185
+	dh_strip --dbg-package=kamailio-dbg
186
+	dh_compress
187
+	dh_fixperms
188
+	dh_makeshlibs
189
+	dh_installdeb
190
+	dh_shlibdeps
191
+	dh_gencontrol
192
+	dh_md5sums
193
+	dh_builddeb
194
+
195
+# Build architecture-independent packages using the common target
196
+binary-indep: build install
197
+# (Uncomment this next line if you have such packages.)
198
+#        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
199
+# We have nothing to do by default.
200
+
201
+
202
+# Build architecture-dependent packages using the common target
203
+binary-arch: build install
204
+	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
205
+
206
+# Any other binary targets build just one binary package at a time.
207
+binary-%: build install