Module: sip-router
Branch: 3.1
Commit: 41e576663d1826fd94106d8aa1b8aff0fc7104ae
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=41e5766…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri May 6 06:42:51 2011 +0200
pkg: deb lib dir name is set by variable LIBDIR
- fixes the check for duplicate libs to variants of deb distros
- reported in FS#130 and FS#128
(cherry picked from commit 807b73d8a242ae12f93564b024baaa38dce89c8e)
---
pkg/kamailio/deb/lenny/rules | 15 +++++++++------
pkg/kamailio/deb/lucid/rules | 15 +++++++++------
pkg/kamailio/deb/squeeze/rules | 15 +++++++++------
3 files changed, 27 insertions(+), 18 deletions(-)
diff --git a/pkg/kamailio/deb/lenny/rules b/pkg/kamailio/deb/lenny/rules
index d9ec443..38066c0 100755
--- a/pkg/kamailio/deb/lenny/rules
+++ b/pkg/kamailio/deb/lenny/rules
@@ -44,10 +44,13 @@ PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
ldap xml perl utils purple memcached tls \
snmpstats carrierroute xmpp cpl lua python
+# name of libdir in the path for libraries (e.g., lib for 32b, lib64 for 64b)
+LIBDIR ?= lib
+
# 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
+DUP_LIBS_DIRS=$(CURDIR)/debian/kamailio/usr/$(LIBDIR)/kamailio \
+ $(CURDIR)/debian/kamailio-db-modules/usr/$(LIBDIR)/kamailio
# modules names out of modules sp
MODULES_SP_NAMES=$(filter-out $(MDIRS),$(subst /, ,$(MODULES_SP)))
@@ -80,10 +83,10 @@ define PACKAGE_GRP_INSTALL_template
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" &&\
+ test "$$d" !=
"$(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/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"` ; \
+ rm -f $(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio/`basename
"$$r"` ; \
done ; \
done
)
@@ -98,10 +101,10 @@ define PACKAGE_MODULE_INSTALL_template
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" &&\
+ test "$$d" != "$(CURDIR)/debian/kamailio-$(call
mod_name,$(mod))-module/usr/$(LIBDIR)/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"` ; \
+ rm -f $(CURDIR)/debian/kamailio-$(call
mod_name,$(mod))-module/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
done ; \
done
)
diff --git a/pkg/kamailio/deb/lucid/rules b/pkg/kamailio/deb/lucid/rules
index fbaccf6..30feea7 100755
--- a/pkg/kamailio/deb/lucid/rules
+++ b/pkg/kamailio/deb/lucid/rules
@@ -44,10 +44,13 @@ PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
ldap xml perl utils purple memcached tls \
snmpstats carrierroute xmpp cpl lua python geoip
+# name of libdir in the path for libraries (e.g., lib for 32b, lib64 for 64b)
+LIBDIR ?= lib
+
# 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
+DUP_LIBS_DIRS=$(CURDIR)/debian/kamailio/usr/$(LIBDIR)/kamailio \
+ $(CURDIR)/debian/kamailio-db-modules/usr/$(LIBDIR)/kamailio
# modules names out of modules sp
MODULES_SP_NAMES=$(filter-out $(MDIRS),$(subst /, ,$(MODULES_SP)))
@@ -80,10 +83,10 @@ define PACKAGE_GRP_INSTALL_template
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" &&\
+ test "$$d" !=
"$(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/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"` ; \
+ rm -f $(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio/`basename
"$$r"` ; \
done ; \
done
)
@@ -98,10 +101,10 @@ define PACKAGE_MODULE_INSTALL_template
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" &&\
+ test "$$d" != "$(CURDIR)/debian/kamailio-$(call
mod_name,$(mod))-module/usr/$(LIBDIR)/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"` ; \
+ rm -f $(CURDIR)/debian/kamailio-$(call
mod_name,$(mod))-module/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
done ; \
done
)
diff --git a/pkg/kamailio/deb/squeeze/rules b/pkg/kamailio/deb/squeeze/rules
index a64793a..0f2e2a5 100755
--- a/pkg/kamailio/deb/squeeze/rules
+++ b/pkg/kamailio/deb/squeeze/rules
@@ -44,10 +44,13 @@ PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
ldap xml perl utils geoip memcached tls \
snmpstats carrierroute xmpp cpl lua python
+# name of libdir in the path for libraries (e.g., lib for 32b, lib64 for 64b)
+LIBDIR ?= lib
+
# 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
+DUP_LIBS_DIRS=$(CURDIR)/debian/kamailio/usr/$(LIBDIR)/kamailio \
+ $(CURDIR)/debian/kamailio-db-modules/usr/$(LIBDIR)/kamailio
# modules names out of modules sp
MODULES_SP_NAMES=$(filter-out $(MDIRS),$(subst /, ,$(MODULES_SP)))
@@ -80,10 +83,10 @@ define PACKAGE_GRP_INSTALL_template
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" &&\
+ test "$$d" !=
"$(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/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"` ; \
+ rm -f $(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio/`basename
"$$r"` ; \
done ; \
done
)
@@ -98,10 +101,10 @@ define PACKAGE_MODULE_INSTALL_template
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" &&\
+ test "$$d" != "$(CURDIR)/debian/kamailio-$(call
mod_name,$(mod))-module/usr/$(LIBDIR)/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"` ; \
+ rm -f $(CURDIR)/debian/kamailio-$(call
mod_name,$(mod))-module/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
done ; \
done
)