db_mysql: automatically install sip-router_mysql.sh
authorAndrei Pelinescu-Onciul <andrei@iptel.org>
Thu, 1 Oct 2009 13:57:33 +0000 (15:57 +0200)
committerAndrei Pelinescu-Onciul <andrei@iptel.org>
Thu, 1 Oct 2009 13:57:33 +0000 (15:57 +0200)
modules/db_mysql/Makefile

index c3e3e43..a1b8a8a 100644 (file)
@@ -22,4 +22,12 @@ LIBS=-L/usr/lib/mysql -L$(LOCALBASE)/lib -L$(LOCALBASE)/lib/mysql \
 SERLIBPATH=../../lib
 SER_LIBS=$(SERLIBPATH)/srdb2/srdb2 $(SERLIBPATH)/srdb1/srdb1
 
+install-mysql-script: $(bin_prefix)/$(bin_dir)
+       sed -e "s#^DEFAULT_SCRIPT_DIR.*#DEFAULT_SCRIPT_DIR=\"$(share_prefix)/$(share_dir)\"#g" \
+       < ../../scripts/mysql/$(SCR_NAME)_mysql.sh > \
+       $(bin_prefix)/$(bin_dir)/$(MAIN_NAME)_mysql.sh
+       chmod 755 $(bin_prefix)/$(bin_dir)/$(MAIN_NAME)_mysql.sh
+
+install-scripts: install-mysql-script
+
 include ../../Makefile.modules