update wanpipe to be fully automated

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4721 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2007-03-21 23:42:16 +00:00
parent 9bacb04df9
commit 850cd58fc1
2 changed files with 46 additions and 7 deletions

View File

@ -13,8 +13,14 @@ else
fi
fi
base=http://svn.freeswitch.org/downloads/libs
base=http://svn.freeswitch.org/downloads/libs/
tarfile=$1
url=`echo $tarfile | grep "://"`
if [ ! -z $url ] ; then
base=$tarfile/
tarfile=$2
fi
if [ ! -d $tarfile ] ; then
uncompressed=`echo $tarfile | sed "s/\.tar\.gz//g"`
@ -22,7 +28,7 @@ if [ ! -d $tarfile ] ; then
if [ ! -f $tarfile ] ; then
rm -fr $uncompressed
$DOWNLOAD_CMD $base/$tarfile
$DOWNLOAD_CMD $base$tarfile
if [ ! -f $tarfile ] ; then
echo cannot find $tarfile
exit 1

View File

@ -1,10 +1,43 @@
BASE=../../../..
LOCAL_CFLAGS =-I/usr/local/include -I/usr/src/libpri -I/usr/src/linux/include -I. -I/usr/include
LIBPRI_HOST=http://ftp.digium.com/pub/libpri
LIBPRI=libpri-1.2.4
LIBPRI_FILE=$(LIBPRI).tar.gz
LIBPRI_DIR=$(BASE)/libs/$(LIBPRI)
LIBPRI_A=$(LIBPRI_DIR)/libpri.a
WANPIPE=wanpipe-3.1.0.p12
WANPIPE_HOST=ftp://ftp.sangoma.com/linux/custom/3.1
WANPIPE_FILE=$(WANPIPE).tgz
WANPIPE_DIR=$(BASE)/libs/$(WANPIPE)
WANPIPE_INCLUDE=$(WANPIPE_DIR)/patches/kdrivers/include
LIBSANGOMA_DIR=$(WANPIPE_DIR)/api/libsangoma
LIBSANGOMA_LA=$(LIBSANGOMA_DIR)/.libs/libsangoma.la
LIBSANGOMA_MAKEFILE=$(LIBSANGOMA_DIR)/Makefile
LOCAL_CFLAGS =-I$(WANPIPE_INCLUDE) -I$(LIBSANGOMA_DIR) -I/usr/local/include -I$(LIBPRI_DIR) -I/usr/src/linux/include -I. -I/usr/include
LOCAL_CFLAGS +=-D__LINUX__ -D_REENTRANT -D_GNU_SOURCE -DAFT_A104 -DWANPIPE_TDM_API -I$(switch_srcdir)/libs/libteletone/src
LOCAL_CFLAGS +=-w
LOCAL_LDFLAGS=-lsangoma $(BASE)/libs/libteletone/libteletone.la
LOCAL_OBJS=ss7boost_client.o
#LOCAL_LDFLAGS=
LOCAL_OBJS=ss7boost_client.o $(BASE)/libs/libteletone/libteletone.la $(LIBSANGOMA_LA) $(LIBPRI_A)
OPTS=--prefix=$(PREFIX) --with-libpri=$(LIBPRI_DIR) --disable-shared
include $(BASE)/build/modmake.rules
local_depend:
MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install libsangoma --prefix=$(PREFIX) --with-libpri=/usr/src/libpri
$(LIBPRI_DIR):
$(GETLIB) $(LIBPRI_HOST) $(LIBPRI_FILE)
cd $(LIBPRI_DIR) && $(MAKE)
$(LIBPRI_A): $(LIBPRI_DIR)
$(LIBSANGOMA_MAKEFILE):
cd $(LIBSANGOMA_DIR) && CFLAGS="-I$(WANPIPE_INCLUDE)" ./configure $(OPTS)
$(LIBSANGOMA_LA): $(LIBSANGOMA_MAKEFILE)
cd $(LIBSANGOMA_DIR) && $(MAKE)
$(WANPIPE_DIR):
$(GETLIB) $(WANPIPE_HOST) $(WANPIPE_FILE)
cd $(WANPIPE_DIR) && $(MAKE) && $(MAKE) install
$(TOUCH_TARGET)
local_depend: $(WANPIPE_DIR)
#MOD_CFLAGS="-I$(WANPIPE_INCLUDE)" MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) libsangoma $(OPTS)