[asterisk-commits] tzafrir: branch group/zapata_conf r96300 - /team/group/zapata_conf/contrib/sc...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 3 15:16:44 CST 2008


Author: tzafrir
Date: Thu Jan  3 15:16:43 2008
New Revision: 96300

URL: http://svn.digium.com/view/asterisk?view=rev&rev=96300
Log:
* Support a config file for custom settings.
* Support a custom zaptel directory or a custom libpri directory 
  from custom settings.
* Other custom libraries should be simple to add.

Modified:
    team/group/zapata_conf/contrib/scripts/live_ast

Modified: team/group/zapata_conf/contrib/scripts/live_ast
URL: http://svn.digium.com/view/asterisk/team/group/zapata_conf/contrib/scripts/live_ast?view=diff&rev=96300&r1=96299&r2=96300
==============================================================================
--- team/group/zapata_conf/contrib/scripts/live_ast (original)
+++ team/group/zapata_conf/contrib/scripts/live_ast Thu Jan  3 15:16:43 2008
@@ -34,18 +34,37 @@
 AST_BIN=$BASE_DIR/usr/sbin/asterisk
 GDB_INIT=$BASE_DIR/gdbinit
 
-# Optional pathes. Unrem them to use various libraries from custom locations:
-#CONFIGURE_PARAMS="--with-pri=/usr/src/libpri-svn"
-#LD_PATH_EXTRA="/usr/src/libpri-svn"
+if [ -r $BASE_DIR/live.conf ]; then . $BASE_DIR/live.conf; fi
+
+# To use a libpri SVN directory (without running 'make install': make include
+# a symlink to the current directory:
+#ln -s . /path/to/checkout/of/libpri/include
+# Be sure to run there 'make'. Then set in live.conf:
+#CUSTOM_LIBPRI_PATH="/path/to.checkout/of/libpri"
+if [ "$CUSTOM_LIBPRI_PATH" != '' ]; then
+  CONFIGURE_PARAMS="$CONFIGURE_PARAMS --with-pri=$CUSTOM_LIBPRI_PATH"
+  LD_PATH_EXTRA="$LD_PATH_EXTRA $CUSTOM_LIBPRI_PATH"
+fi
+
+# If you copied Zaptel to this system with 'live_zap rsync':
+#CUSTOM_ZAPTEL_PATH="/tmp/live/usr"
+# Otherwise you can use a trick similar to the above with a symlink to 
+# 'zaptel'
+if [ "$CUSTOM_ZAPTEL_PATH" != '' ]; then
+  CONFIGURE_PARAMS="$CONFIGURE_PARAMS --with-tonezone=$CUSTOM_ZAPTEL_PATH"
+  CONFIGURE_PARAMS="$CONFIGURE_PARAMS --with-zaptel=$CUSTOM_ZAPTEL_PATH"
+  CONFIGURE_PARAMS="$CONFIGURE_PARAMS --with-zaptel_transcode=$CUSTOM_ZAPTEL_PATH"
+  CONFIGURE_PARAMS="$CONFIGURE_PARAMS --with-zaptel_vldtmf=$CUSTOM_ZAPTEL_PATH"
+  LD_PATH_EXTRA="$LD_PATH_EXTRA $CUSTOM_ZAPTEL_PATH"
+fi
+
+# gets rid of excessive spaces. Leves nothing if there were only white spaces:
+LD_PATH_EXTRA=`echo $LD_PATH_EXTRA | tr ' ' :`
 
 set_ld_env() {
-  if [ "$LD_PATH_EXTRA" = '' ]; then return; fi
+  if [ "$LD_PATH_EXTRA$LD_LIBRARY_PATH" = '' ]; then return; fi
 
-  if [ "$LD_LIBRARY_PATH" = '' ]; then
-    LD_LIBRARY_PATH="$LD_PATH_EXTRA"
-  else
-    LD_LIBRARY_PATH="$LD_PATH_EXTRA:$LD_LIBRARY_PATH"
-  fi
+  LD_LIBRARY_PATH=`echo $LD_PATH_EXTRA $LD_PATH_EXTRA | tr ' ' :`
   export LD_LIBRARY_PATH
 }
 




More information about the asterisk-commits mailing list