2008-12-15 22:56:11 -05:00
|
|
|
#!/bin/sh
|
2012-07-01 23:38:31 -04:00
|
|
|
|
|
|
|
if [ -z "$1" ]; then
|
|
|
|
INSTALLDIR=/usr/local
|
|
|
|
else
|
|
|
|
INSTALLDIR="$1"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z `which svn` ]; then
|
|
|
|
echo "Need SVN installed!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2009-06-22 15:40:30 -04:00
|
|
|
uname -a | grep -qi bsd && MAKE=gmake || MAKE=make
|
2012-07-01 23:38:31 -04:00
|
|
|
|
|
|
|
#Locate our script, then go up one directory to be in FreeSWITCH root
|
|
|
|
cd `dirname $0`
|
|
|
|
cd ..
|
2009-06-22 12:56:33 -04:00
|
|
|
FS_DIR=`pwd`
|
2009-06-22 15:40:30 -04:00
|
|
|
|
2012-07-01 23:38:31 -04:00
|
|
|
export PKG_CONFIG_PATH=$INSTALLDIR/lib/pkgconfig
|
2009-06-22 15:40:30 -04:00
|
|
|
|
2012-07-01 23:38:31 -04:00
|
|
|
|
|
|
|
# Version and patch for PTLib and OPAL. These are almost always in lock
|
2012-09-06 00:25:24 -04:00
|
|
|
# step so should be the same unless you really know what you are doing!
|
2012-07-01 23:38:31 -04:00
|
|
|
# The PATCH should be set to a specific"snapshot release" when things
|
2012-09-06 00:25:24 -04:00
|
|
|
# are nice and stable. But right now comment them out for using trunk.
|
2012-07-01 23:38:31 -04:00
|
|
|
|
2012-09-06 00:25:24 -04:00
|
|
|
#VERSION=10
|
|
|
|
#PATCH=7
|
2012-07-01 23:38:31 -04:00
|
|
|
|
2012-09-06 00:25:24 -04:00
|
|
|
if [ -z "$VERSION" ]; then
|
|
|
|
PTLIB_VERSION=trunk
|
|
|
|
OPAL_VERSION=trunk
|
|
|
|
elif [ -z "$PATCH" ]; then
|
2012-07-01 23:38:31 -04:00
|
|
|
PTLIB_VERSION=branches/v2_$VERSION
|
|
|
|
OPAL_VERSION=branches/v3_$VERSION
|
|
|
|
else
|
|
|
|
PTLIB_VERSION=tags/v2_${VERSION}_$PATCH
|
|
|
|
OPAL_VERSION=tags/v3_${VERSION}_$PATCH
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
cd $FS_DIR/libs
|
|
|
|
svn co https://opalvoip.svn.sourceforge.net/svnroot/opalvoip/ptlib/$PTLIB_VERSION ptlib
|
|
|
|
cd $FS_DIR/libs/ptlib
|
|
|
|
# LDAP disabled due to conflict wit libs in spidermonkey
|
|
|
|
./configure --disable-plugins --disable-openldap --prefix=$INSTALLDIR
|
2009-06-22 15:40:30 -04:00
|
|
|
${MAKE}
|
2012-07-01 23:38:31 -04:00
|
|
|
sudo ${MAKE} install
|
|
|
|
|
|
|
|
cd $FS_DIR/libs
|
|
|
|
svn co https://opalvoip.svn.sourceforge.net/svnroot/opalvoip/opal/$OPAL_VERSION opal
|
|
|
|
cd $FS_DIR/libs/opal
|
|
|
|
./configure --disable-plugins --prefix=$INSTALLDIR
|
|
|
|
$MAKE
|
|
|
|
sudo $MAKE install
|
|
|
|
|
|
|
|
echo "======================================"
|
|
|
|
echo "PTLib/OPAL build and install completed"
|
|
|
|
echo "======================================"
|
|
|
|
|
|
|
|
cd $FS_DIR
|
|
|
|
$MAKE mod_opal-install
|