Browse code

pkg/kamailio/deb: use BASEDIR and clean usr/local

since 8c2b9ae build process failed

Victor Seva authored on 14/02/2015 08:00:20
Showing 6 changed files
... ...
@@ -67,7 +67,7 @@ endef
67 67
 define PACKAGE_GRP_INSTALL_template
68 68
 	$(foreach grp,$(PACKAGE_GROUPS),\
69 69
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
70
-		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
70
+		BASEDIR=$(CURDIR)/debian/kamailio-$(grp)-modules \
71 71
 		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
72 72
 		doc-dir=share/doc/kamailio-$(grp)-modules
73 73
 		# eliminate duplicate libs
... ...
@@ -85,7 +85,7 @@ endef
85 85
 define PACKAGE_EXTRA_INSTALL_template
86 86
 	$(foreach grp,$(EXTRA_GROUPS),\
87 87
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
88
-		basedir=$(CURDIR)/debian/kamailio-extra-modules \
88
+		BASEDIR=$(CURDIR)/debian/kamailio-extra-modules \
89 89
 		cfg_prefix=$(CURDIR)/debian/kamailio-extra-modules \
90 90
 		doc-dir=share/doc/kamailio-extra-modules
91 91
 	)
... ...
@@ -100,13 +100,6 @@ define PACKAGE_EXTRA_INSTALL_template
100 100
 	find $(CURDIR)/debian/kamailio-extra-modules -depth -empty -type d -exec rmdir {} \;
101 101
 endef
102 102
 
103
-ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
104
-	CFLAGS += -g
105
-endif
106
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
107
-	INSTALL_PROGRAM += -s
108
-endif
109
-
110 103
 # CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
111 104
 CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
112 105
 CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
... ...
@@ -123,7 +116,7 @@ configure-stamp:
123 123
 	# Add here commands to configure the package.
124 124
 	$(MAKE) FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$(CURDIR)/debian/kamailio \
125 125
 			cfg_target=/etc/kamailio/ \
126
-			basedir=$(CURDIR)/debian/kamailio \
126
+			BASEDIR=$(CURDIR)/debian/kamailio \
127 127
 			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
128 128
 			CC_EXTRA_OPTS="$(CC_EXTRA_OPTS)" \
129 129
 			LD_EXTRA_OPTS="$(LD_EXTRA_OPTS)" \
... ...
@@ -166,6 +159,8 @@ install: build
166 166
 	# install /etc/default/kamailio file
167 167
 	mkdir -p $(CURDIR)/debian/kamailio/etc/default
168 168
 	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
169
+	# delete /var/run/kamailio dir
170
+	rm -rf $(CURDIR)/debian/kamailio/usr/local
169 171
 
170 172
 
171 173
 # This single target is used to build all the packages, all at once, or
... ...
@@ -67,7 +67,7 @@ endef
67 67
 define PACKAGE_GRP_INSTALL_template
68 68
 	$(foreach grp,$(PACKAGE_GROUPS),\
69 69
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
70
-		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
70
+		BASEDIR=$(CURDIR)/debian/kamailio-$(grp)-modules \
71 71
 		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
72 72
 		doc-dir=share/doc/kamailio-$(grp)-modules
73 73
 		# eliminate duplicate libs
... ...
@@ -85,7 +85,7 @@ endef
85 85
 define PACKAGE_EXTRA_INSTALL_template
86 86
 	$(foreach grp,$(EXTRA_GROUPS),\
87 87
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
88
-		basedir=$(CURDIR)/debian/kamailio-extra-modules \
88
+		BASEDIR=$(CURDIR)/debian/kamailio-extra-modules \
89 89
 		cfg_prefix=$(CURDIR)/debian/kamailio-extra-modules \
90 90
 		doc-dir=share/doc/kamailio-extra-modules
91 91
 	)
... ...
@@ -100,13 +100,6 @@ define PACKAGE_EXTRA_INSTALL_template
100 100
 	find $(CURDIR)/debian/kamailio-extra-modules -depth -empty -type d -exec rmdir {} \;
101 101
 endef
102 102
 
103
-ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
104
-	CFLAGS += -g
105
-endif
106
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
107
-	INSTALL_PROGRAM += -s
108
-endif
109
-
110 103
 # CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
111 104
 CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
112 105
 CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
... ...
@@ -123,7 +116,7 @@ configure-stamp:
123 123
 	# Add here commands to configure the package.
124 124
 	$(MAKE) FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$(CURDIR)/debian/kamailio \
125 125
 			cfg_target=/etc/kamailio/ \
126
-			basedir=$(CURDIR)/debian/kamailio \
126
+			BASEDIR=$(CURDIR)/debian/kamailio \
127 127
 			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
128 128
 			CC_EXTRA_OPTS="$(CC_EXTRA_OPTS)" \
129 129
 			LD_EXTRA_OPTS="$(LD_EXTRA_OPTS)" \
... ...
@@ -166,6 +159,8 @@ install: build
166 166
 	# install /etc/default/kamailio file
167 167
 	mkdir -p $(CURDIR)/debian/kamailio/etc/default
168 168
 	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
169
+	# delete /var/run/kamailio dir
170
+	rm -rf $(CURDIR)/debian/kamailio/usr/local
169 171
 
170 172
 
171 173
 # This single target is used to build all the packages, all at once, or
... ...
@@ -66,7 +66,7 @@ endef
66 66
 define PACKAGE_GRP_INSTALL_template
67 67
 	$(foreach grp,$(PACKAGE_GROUPS),\
68 68
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
69
-		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
69
+		BASEDIR=$(CURDIR)/debian/kamailio-$(grp)-modules \
70 70
 		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
71 71
 		doc-dir=share/doc/kamailio-$(grp)-modules
72 72
 		# eliminate duplicate libs
... ...
@@ -84,7 +84,7 @@ endef
84 84
 define PACKAGE_EXTRA_INSTALL_template
85 85
 	$(foreach grp,$(EXTRA_GROUPS),\
86 86
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
87
-		basedir=$(CURDIR)/debian/kamailio-extra-modules \
87
+		BASEDIR=$(CURDIR)/debian/kamailio-extra-modules \
88 88
 		cfg_prefix=$(CURDIR)/debian/kamailio-extra-modules \
89 89
 		doc-dir=share/doc/kamailio-extra-modules
90 90
 	)
... ...
@@ -99,13 +99,6 @@ define PACKAGE_EXTRA_INSTALL_template
99 99
 	find $(CURDIR)/debian/kamailio-extra-modules -depth -empty -type d -exec rmdir {} \;
100 100
 endef
101 101
 
102
-ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
103
-	CFLAGS += -g
104
-endif
105
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
106
-	INSTALL_PROGRAM += -s
107
-endif
108
-
109 102
 # CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
110 103
 CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
111 104
 CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
... ...
@@ -122,7 +115,7 @@ configure-stamp:
122 122
 	# Add here commands to configure the package.
123 123
 	$(MAKE) FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$(CURDIR)/debian/kamailio \
124 124
 			cfg_target=/etc/kamailio/ \
125
-			basedir=$(CURDIR)/debian/kamailio \
125
+			BASEDIR=$(CURDIR)/debian/kamailio \
126 126
 			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
127 127
 			CC_EXTRA_OPTS="$(CC_EXTRA_OPTS)" \
128 128
 			LD_EXTRA_OPTS="$(LD_EXTRA_OPTS)" \
... ...
@@ -165,6 +158,8 @@ install: build
165 165
 	# install /etc/default/kamailio file
166 166
 	mkdir -p $(CURDIR)/debian/kamailio/etc/default
167 167
 	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
168
+	# delete /var/run/kamailio dir
169
+	rm -rf $(CURDIR)/debian/kamailio/usr/local
168 170
 
169 171
 
170 172
 # This single target is used to build all the packages, all at once, or
... ...
@@ -64,7 +64,7 @@ endef
64 64
 define PACKAGE_GRP_INSTALL_template
65 65
 	$(foreach grp,$(PACKAGE_GROUPS),\
66 66
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
67
-		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
67
+		BASEDIR=$(CURDIR)/debian/kamailio-$(grp)-modules \
68 68
 		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
69 69
 		doc-dir=share/doc/kamailio-$(grp)-modules
70 70
 		# eliminate duplicate libs
... ...
@@ -82,7 +82,7 @@ endef
82 82
 define PACKAGE_EXTRA_INSTALL_template
83 83
 	$(foreach grp,$(EXTRA_GROUPS),\
84 84
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
85
-		basedir=$(CURDIR)/debian/kamailio-extra-modules \
85
+		BASEDIR=$(CURDIR)/debian/kamailio-extra-modules \
86 86
 		cfg_prefix=$(CURDIR)/debian/kamailio-extra-modules \
87 87
 		doc-dir=share/doc/kamailio-extra-modules
88 88
 	)
... ...
@@ -97,13 +97,6 @@ define PACKAGE_EXTRA_INSTALL_template
97 97
 	find $(CURDIR)/debian/kamailio-extra-modules -depth -empty -type d -exec rmdir {} \;
98 98
 endef
99 99
 
100
-ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
101
-	CFLAGS += -g
102
-endif
103
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
104
-	INSTALL_PROGRAM += -s
105
-endif
106
-
107 100
 # CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
108 101
 CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
109 102
 CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
... ...
@@ -120,7 +113,7 @@ configure-stamp:
120 120
 	# Add here commands to configure the package.
121 121
 	$(MAKE) FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$(CURDIR)/debian/kamailio \
122 122
 			cfg_target=/etc/kamailio/ \
123
-			basedir=$(CURDIR)/debian/kamailio \
123
+			BASEDIR=$(CURDIR)/debian/kamailio \
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)" \
... ...
@@ -163,6 +156,8 @@ install: build
163 163
 	# install /etc/default/kamailio file
164 164
 	mkdir -p $(CURDIR)/debian/kamailio/etc/default
165 165
 	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
166
+	# delete /var/run/kamailio dir
167
+	rm -rf $(CURDIR)/debian/kamailio/usr/local
166 168
 
167 169
 
168 170
 # This single target is used to build all the packages, all at once, or
... ...
@@ -67,7 +67,7 @@ endef
67 67
 define PACKAGE_GRP_INSTALL_template
68 68
 	$(foreach grp,$(PACKAGE_GROUPS),\
69 69
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
70
-		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
70
+		BASEDIR=$(CURDIR)/debian/kamailio-$(grp)-modules \
71 71
 		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
72 72
 		doc-dir=share/doc/kamailio-$(grp)-modules
73 73
 		# eliminate duplicate libs
... ...
@@ -85,7 +85,7 @@ endef
85 85
 define PACKAGE_EXTRA_INSTALL_template
86 86
 	$(foreach grp,$(EXTRA_GROUPS),\
87 87
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
88
-		basedir=$(CURDIR)/debian/kamailio-extra-modules \
88
+		BASEDIR=$(CURDIR)/debian/kamailio-extra-modules \
89 89
 		cfg_prefix=$(CURDIR)/debian/kamailio-extra-modules \
90 90
 		doc-dir=share/doc/kamailio-extra-modules
91 91
 	)
... ...
@@ -100,13 +100,6 @@ define PACKAGE_EXTRA_INSTALL_template
100 100
 	find $(CURDIR)/debian/kamailio-extra-modules -depth -empty -type d -exec rmdir {} \;
101 101
 endef
102 102
 
103
-ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
104
-	CFLAGS += -g
105
-endif
106
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
107
-	INSTALL_PROGRAM += -s
108
-endif
109
-
110 103
 # CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
111 104
 CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
112 105
 CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
... ...
@@ -123,7 +116,7 @@ configure-stamp:
123 123
 	# Add here commands to configure the package.
124 124
 	$(MAKE) FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$(CURDIR)/debian/kamailio \
125 125
 			cfg_target=/etc/kamailio/ \
126
-			basedir=$(CURDIR)/debian/kamailio \
126
+			BASEDIR=$(CURDIR)/debian/kamailio \
127 127
 			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
128 128
 			CC_EXTRA_OPTS="$(CC_EXTRA_OPTS)" \
129 129
 			LD_EXTRA_OPTS="$(LD_EXTRA_OPTS)" \
... ...
@@ -166,6 +159,8 @@ install: build
166 166
 	# install /etc/default/kamailio file
167 167
 	mkdir -p $(CURDIR)/debian/kamailio/etc/default
168 168
 	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
169
+	# delete /var/run/kamailio dir
170
+	rm -rf $(CURDIR)/debian/kamailio/usr/local
169 171
 
170 172
 
171 173
 # This single target is used to build all the packages, all at once, or
... ...
@@ -66,7 +66,7 @@ endef
66 66
 define PACKAGE_GRP_INSTALL_template
67 67
 	$(foreach grp,$(PACKAGE_GROUPS),\
68 68
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
69
-		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
69
+		BASEDIR=$(CURDIR)/debian/kamailio-$(grp)-modules \
70 70
 		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
71 71
 		doc-dir=share/doc/kamailio-$(grp)-modules
72 72
 		# eliminate duplicate libs
... ...
@@ -84,7 +84,7 @@ endef
84 84
 define PACKAGE_EXTRA_INSTALL_template
85 85
 	$(foreach grp,$(EXTRA_GROUPS),\
86 86
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
87
-		basedir=$(CURDIR)/debian/kamailio-extra-modules \
87
+		BASEDIR=$(CURDIR)/debian/kamailio-extra-modules \
88 88
 		cfg_prefix=$(CURDIR)/debian/kamailio-extra-modules \
89 89
 		doc-dir=share/doc/kamailio-extra-modules
90 90
 	)
... ...
@@ -99,13 +99,6 @@ define PACKAGE_EXTRA_INSTALL_template
99 99
 	find $(CURDIR)/debian/kamailio-extra-modules -depth -empty -type d -exec rmdir {} \;
100 100
 endef
101 101
 
102
-ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
103
-	CFLAGS += -g
104
-endif
105
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
106
-	INSTALL_PROGRAM += -s
107
-endif
108
-
109 102
 # CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
110 103
 CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
111 104
 CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
... ...
@@ -122,7 +115,7 @@ configure-stamp:
122 122
 	# Add here commands to configure the package.
123 123
 	$(MAKE) FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$(CURDIR)/debian/kamailio \
124 124
 			cfg_target=/etc/kamailio/ \
125
-			basedir=$(CURDIR)/debian/kamailio \
125
+			BASEDIR=$(CURDIR)/debian/kamailio \
126 126
 			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
127 127
 			CC_EXTRA_OPTS="$(CC_EXTRA_OPTS)" \
128 128
 			LD_EXTRA_OPTS="$(LD_EXTRA_OPTS)" \
... ...
@@ -165,6 +158,8 @@ install: build
165 165
 	# install /etc/default/kamailio file
166 166
 	mkdir -p $(CURDIR)/debian/kamailio/etc/default
167 167
 	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
168
+	# delete /var/run/kamailio dir
169
+	rm -rf $(CURDIR)/debian/kamailio/usr/local
168 170
 
169 171
 
170 172
 # This single target is used to build all the packages, all at once, or