瀏覽代碼

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

since 8c2b9ae build process failed
Victor Seva 10 年之前
父節點
當前提交
bf39780f47

+ 5 - 10
pkg/kamailio/deb/debian/rules

@@ -67,7 +67,7 @@ endef
 define PACKAGE_GRP_INSTALL_template
 	$(foreach grp,$(PACKAGE_GROUPS),\
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
-		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
+		BASEDIR=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		doc-dir=share/doc/kamailio-$(grp)-modules
 		# eliminate duplicate libs
@@ -85,7 +85,7 @@ endef
 define PACKAGE_EXTRA_INSTALL_template
 	$(foreach grp,$(EXTRA_GROUPS),\
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
-		basedir=$(CURDIR)/debian/kamailio-extra-modules \
+		BASEDIR=$(CURDIR)/debian/kamailio-extra-modules \
 		cfg_prefix=$(CURDIR)/debian/kamailio-extra-modules \
 		doc-dir=share/doc/kamailio-extra-modules
 	)
@@ -100,13 +100,6 @@ define PACKAGE_EXTRA_INSTALL_template
 	find $(CURDIR)/debian/kamailio-extra-modules -depth -empty -type d -exec rmdir {} \;
 endef
 
-ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -g
-endif
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-	INSTALL_PROGRAM += -s
-endif
-
 # CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
 CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
 CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
@@ -123,7 +116,7 @@ configure-stamp:
 	# Add here commands to configure the package.
 	$(MAKE) FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$(CURDIR)/debian/kamailio \
 			cfg_target=/etc/kamailio/ \
-			basedir=$(CURDIR)/debian/kamailio \
+			BASEDIR=$(CURDIR)/debian/kamailio \
 			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
 			CC_EXTRA_OPTS="$(CC_EXTRA_OPTS)" \
 			LD_EXTRA_OPTS="$(LD_EXTRA_OPTS)" \
@@ -166,6 +159,8 @@ install: build
 	# install /etc/default/kamailio file
 	mkdir -p $(CURDIR)/debian/kamailio/etc/default
 	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
+	# delete /var/run/kamailio dir
+	rm -rf $(CURDIR)/debian/kamailio/usr/local
 
 
 # This single target is used to build all the packages, all at once, or

+ 5 - 10
pkg/kamailio/deb/jessie/rules

@@ -67,7 +67,7 @@ endef
 define PACKAGE_GRP_INSTALL_template
 	$(foreach grp,$(PACKAGE_GROUPS),\
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
-		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
+		BASEDIR=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		doc-dir=share/doc/kamailio-$(grp)-modules
 		# eliminate duplicate libs
@@ -85,7 +85,7 @@ endef
 define PACKAGE_EXTRA_INSTALL_template
 	$(foreach grp,$(EXTRA_GROUPS),\
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
-		basedir=$(CURDIR)/debian/kamailio-extra-modules \
+		BASEDIR=$(CURDIR)/debian/kamailio-extra-modules \
 		cfg_prefix=$(CURDIR)/debian/kamailio-extra-modules \
 		doc-dir=share/doc/kamailio-extra-modules
 	)
@@ -100,13 +100,6 @@ define PACKAGE_EXTRA_INSTALL_template
 	find $(CURDIR)/debian/kamailio-extra-modules -depth -empty -type d -exec rmdir {} \;
 endef
 
-ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -g
-endif
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-	INSTALL_PROGRAM += -s
-endif
-
 # CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
 CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
 CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
@@ -123,7 +116,7 @@ configure-stamp:
 	# Add here commands to configure the package.
 	$(MAKE) FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$(CURDIR)/debian/kamailio \
 			cfg_target=/etc/kamailio/ \
-			basedir=$(CURDIR)/debian/kamailio \
+			BASEDIR=$(CURDIR)/debian/kamailio \
 			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
 			CC_EXTRA_OPTS="$(CC_EXTRA_OPTS)" \
 			LD_EXTRA_OPTS="$(LD_EXTRA_OPTS)" \
@@ -166,6 +159,8 @@ install: build
 	# install /etc/default/kamailio file
 	mkdir -p $(CURDIR)/debian/kamailio/etc/default
 	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
+	# delete /var/run/kamailio dir
+	rm -rf $(CURDIR)/debian/kamailio/usr/local
 
 
 # This single target is used to build all the packages, all at once, or

+ 5 - 10
pkg/kamailio/deb/precise/rules

@@ -66,7 +66,7 @@ endef
 define PACKAGE_GRP_INSTALL_template
 	$(foreach grp,$(PACKAGE_GROUPS),\
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
-		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
+		BASEDIR=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		doc-dir=share/doc/kamailio-$(grp)-modules
 		# eliminate duplicate libs
@@ -84,7 +84,7 @@ endef
 define PACKAGE_EXTRA_INSTALL_template
 	$(foreach grp,$(EXTRA_GROUPS),\
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
-		basedir=$(CURDIR)/debian/kamailio-extra-modules \
+		BASEDIR=$(CURDIR)/debian/kamailio-extra-modules \
 		cfg_prefix=$(CURDIR)/debian/kamailio-extra-modules \
 		doc-dir=share/doc/kamailio-extra-modules
 	)
@@ -99,13 +99,6 @@ define PACKAGE_EXTRA_INSTALL_template
 	find $(CURDIR)/debian/kamailio-extra-modules -depth -empty -type d -exec rmdir {} \;
 endef
 
-ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -g
-endif
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-	INSTALL_PROGRAM += -s
-endif
-
 # CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
 CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
 CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
@@ -122,7 +115,7 @@ configure-stamp:
 	# Add here commands to configure the package.
 	$(MAKE) FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$(CURDIR)/debian/kamailio \
 			cfg_target=/etc/kamailio/ \
-			basedir=$(CURDIR)/debian/kamailio \
+			BASEDIR=$(CURDIR)/debian/kamailio \
 			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
 			CC_EXTRA_OPTS="$(CC_EXTRA_OPTS)" \
 			LD_EXTRA_OPTS="$(LD_EXTRA_OPTS)" \
@@ -165,6 +158,8 @@ install: build
 	# install /etc/default/kamailio file
 	mkdir -p $(CURDIR)/debian/kamailio/etc/default
 	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
+	# delete /var/run/kamailio dir
+	rm -rf $(CURDIR)/debian/kamailio/usr/local
 
 
 # This single target is used to build all the packages, all at once, or

+ 5 - 10
pkg/kamailio/deb/squeeze/rules

@@ -64,7 +64,7 @@ endef
 define PACKAGE_GRP_INSTALL_template
 	$(foreach grp,$(PACKAGE_GROUPS),\
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
-		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
+		BASEDIR=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		doc-dir=share/doc/kamailio-$(grp)-modules
 		# eliminate duplicate libs
@@ -82,7 +82,7 @@ endef
 define PACKAGE_EXTRA_INSTALL_template
 	$(foreach grp,$(EXTRA_GROUPS),\
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
-		basedir=$(CURDIR)/debian/kamailio-extra-modules \
+		BASEDIR=$(CURDIR)/debian/kamailio-extra-modules \
 		cfg_prefix=$(CURDIR)/debian/kamailio-extra-modules \
 		doc-dir=share/doc/kamailio-extra-modules
 	)
@@ -97,13 +97,6 @@ define PACKAGE_EXTRA_INSTALL_template
 	find $(CURDIR)/debian/kamailio-extra-modules -depth -empty -type d -exec rmdir {} \;
 endef
 
-ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -g
-endif
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-	INSTALL_PROGRAM += -s
-endif
-
 # CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
 CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
 CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
@@ -120,7 +113,7 @@ configure-stamp:
 	# Add here commands to configure the package.
 	$(MAKE) FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$(CURDIR)/debian/kamailio \
 			cfg_target=/etc/kamailio/ \
-			basedir=$(CURDIR)/debian/kamailio \
+			BASEDIR=$(CURDIR)/debian/kamailio \
 			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
 			CC_EXTRA_OPTS="$(CC_EXTRA_OPTS)" \
 			LD_EXTRA_OPTS="$(LD_EXTRA_OPTS)" \
@@ -163,6 +156,8 @@ install: build
 	# install /etc/default/kamailio file
 	mkdir -p $(CURDIR)/debian/kamailio/etc/default
 	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
+	# delete /var/run/kamailio dir
+	rm -rf $(CURDIR)/debian/kamailio/usr/local
 
 
 # This single target is used to build all the packages, all at once, or

+ 5 - 10
pkg/kamailio/deb/trusty/rules

@@ -67,7 +67,7 @@ endef
 define PACKAGE_GRP_INSTALL_template
 	$(foreach grp,$(PACKAGE_GROUPS),\
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
-		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
+		BASEDIR=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		doc-dir=share/doc/kamailio-$(grp)-modules
 		# eliminate duplicate libs
@@ -85,7 +85,7 @@ endef
 define PACKAGE_EXTRA_INSTALL_template
 	$(foreach grp,$(EXTRA_GROUPS),\
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
-		basedir=$(CURDIR)/debian/kamailio-extra-modules \
+		BASEDIR=$(CURDIR)/debian/kamailio-extra-modules \
 		cfg_prefix=$(CURDIR)/debian/kamailio-extra-modules \
 		doc-dir=share/doc/kamailio-extra-modules
 	)
@@ -100,13 +100,6 @@ define PACKAGE_EXTRA_INSTALL_template
 	find $(CURDIR)/debian/kamailio-extra-modules -depth -empty -type d -exec rmdir {} \;
 endef
 
-ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -g
-endif
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-	INSTALL_PROGRAM += -s
-endif
-
 # CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
 CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
 CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
@@ -123,7 +116,7 @@ configure-stamp:
 	# Add here commands to configure the package.
 	$(MAKE) FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$(CURDIR)/debian/kamailio \
 			cfg_target=/etc/kamailio/ \
-			basedir=$(CURDIR)/debian/kamailio \
+			BASEDIR=$(CURDIR)/debian/kamailio \
 			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
 			CC_EXTRA_OPTS="$(CC_EXTRA_OPTS)" \
 			LD_EXTRA_OPTS="$(LD_EXTRA_OPTS)" \
@@ -166,6 +159,8 @@ install: build
 	# install /etc/default/kamailio file
 	mkdir -p $(CURDIR)/debian/kamailio/etc/default
 	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
+	# delete /var/run/kamailio dir
+	rm -rf $(CURDIR)/debian/kamailio/usr/local
 
 
 # This single target is used to build all the packages, all at once, or

+ 5 - 10
pkg/kamailio/deb/wheezy/rules

@@ -66,7 +66,7 @@ endef
 define PACKAGE_GRP_INSTALL_template
 	$(foreach grp,$(PACKAGE_GROUPS),\
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
-		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
+		BASEDIR=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
 		doc-dir=share/doc/kamailio-$(grp)-modules
 		# eliminate duplicate libs
@@ -84,7 +84,7 @@ endef
 define PACKAGE_EXTRA_INSTALL_template
 	$(foreach grp,$(EXTRA_GROUPS),\
 		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
-		basedir=$(CURDIR)/debian/kamailio-extra-modules \
+		BASEDIR=$(CURDIR)/debian/kamailio-extra-modules \
 		cfg_prefix=$(CURDIR)/debian/kamailio-extra-modules \
 		doc-dir=share/doc/kamailio-extra-modules
 	)
@@ -99,13 +99,6 @@ define PACKAGE_EXTRA_INSTALL_template
 	find $(CURDIR)/debian/kamailio-extra-modules -depth -empty -type d -exec rmdir {} \;
 endef
 
-ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -g
-endif
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-	INSTALL_PROGRAM += -s
-endif
-
 # CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
 CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
 CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
@@ -122,7 +115,7 @@ configure-stamp:
 	# Add here commands to configure the package.
 	$(MAKE) FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$(CURDIR)/debian/kamailio \
 			cfg_target=/etc/kamailio/ \
-			basedir=$(CURDIR)/debian/kamailio \
+			BASEDIR=$(CURDIR)/debian/kamailio \
 			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
 			CC_EXTRA_OPTS="$(CC_EXTRA_OPTS)" \
 			LD_EXTRA_OPTS="$(LD_EXTRA_OPTS)" \
@@ -165,6 +158,8 @@ install: build
 	# install /etc/default/kamailio file
 	mkdir -p $(CURDIR)/debian/kamailio/etc/default
 	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
+	# delete /var/run/kamailio dir
+	rm -rf $(CURDIR)/debian/kamailio/usr/local
 
 
 # This single target is used to build all the packages, all at once, or