1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
# $Id$
#
# example module makefile
#
#
# WARNING: do not run this directly, it should be run by the master Makefile
# extra debug messages
# -DBDB_EXTRA_DEBUG is optional
include ../../Makefile.defs
auto_gen=
NAME=db_berkeley.so
SCRIPTS_DIR?=../../scripts/
UTILS_DIR?=../../utils/
# bsd also ported to ldb
DB_LIB?=ldb
LIBS=-$(DB_LIB)
include ../../Makefile.modules
.PHONY: $(UTILS_DIR)/db_berkeley/bdb_recover
$(UTILS_DIR)/db_berkeley/bdb_recover:
make -C $(UTILS_DIR)/db_berkeley/
install_module_custom: $(bin_prefix)/$(bin_dir) $(UTILS_DIR)/db_berkeley/bdb_recover
mkdir -p $(modules_prefix)/$(lib_dir)/opensipsctl ; \
sed -e "s#/usr/local/share/opensips/#$(data_target)#g" \
< $(SCRIPTS_DIR)/opensipsctl.db_berkeley > /tmp/opensipsctl.db_berkeley ; \
$(INSTALL_CFG) /tmp/opensipsctl.db_berkeley \
$(modules_prefix)/$(lib_dir)/opensipsctl/opensipsctl.db_berkeley ; \
rm -fr /tmp/opensipsctl.db_berkeley ; \
sed -e "s#/usr/local/share/opensips#$(data_target)#g" \
< $(SCRIPTS_DIR)/opensipsdbctl.db_berkeley > /tmp/opensipsdbctl.db_berkeley ; \
$(INSTALL_TOUCH) $(modules_prefix)/$(lib_dir)/opensipsctl/opensipsdbctl.db_berkeley ; \
$(INSTALL_CFG) /tmp/opensipsdbctl.db_berkeley $(modules_prefix)/$(lib_dir)/opensipsctl/ ; \
rm -fr /tmp/opensipsdbctl.db_berkeley ; \
mkdir -p $(data_prefix)/$(data_dir)/db_berkeley/opensips ; \
for FILE in $(wildcard $(SCRIPTS_DIR)/db_berkeley/opensips/*) ; do \
if [ -f $$FILE ] ; then \
$(INSTALL_TOUCH) $$FILE \
$(data_prefix)/$(data_dir)/db_berkeley/opensips/`basename "$$FILE"` ; \
$(INSTALL_CFG) $$FILE \
$(data_prefix)/$(data_dir)/db_berkeley/opensips/`basename "$$FILE"` ; \
fi ;\
done ; \
$(INSTALL_BIN) $(UTILS_DIR)/db_berkeley/bdb_recover $(bin_prefix)/$(bin_dir) ; \
|