Files
fusionpbx-install.sh/debian/resources/switch/source-release.sh
T

68 lines
2.8 KiB
Bash
Raw Normal View History

2016-05-26 11:55:14 +01:00
#!/bin/sh
2017-03-09 10:40:20 -07:00
2019-02-28 11:45:13 -07:00
#move to script directory so all relative paths work
cd "$(dirname "$0")"
#includes
2019-02-28 11:46:30 -07:00
. ../config.sh
2019-02-28 11:45:13 -07:00
2019-02-21 10:04:23 -07:00
#upgrade packages
2019-02-21 10:17:03 -07:00
apt update && apt upgrade -y
2019-02-21 10:04:23 -07:00
# install dependencies
2019-06-03 19:09:03 -06:00
apt install -y autoconf automake devscripts g++ git-core libncurses5-dev libtool make libjpeg-dev
apt install -y pkg-config flac libgdbm-dev libdb-dev gettext sudo equivs mlocate git dpkg-dev libpq-dev
apt install -y liblua5.2-dev libtiff5-dev libperl-dev libcurl4-openssl-dev libsqlite3-dev libpcre3-dev
apt install -y devscripts libspeexdsp-dev libspeex-dev libldns-dev libedit-dev libopus-dev libmemcached-dev
2019-06-03 19:24:06 -06:00
apt install -y libshout3-dev libmpg123-dev libmp3lame-dev yasm nasm libsndfile1-dev libuv1-dev libvpx-dev libvpx4
2019-02-21 10:04:23 -07:00
# additional dependencies
2019-02-21 10:17:03 -07:00
apt install -y sqlite3 swig3.0 unzip
2016-05-26 11:55:14 +01:00
2016-07-05 18:00:20 +01:00
#we are about to move out of the executing directory so we need to preserve it to return after we are done
CWD=$(pwd)
2019-02-28 05:00:33 -07:00
echo "Using version $switch_version"
2016-07-05 17:59:30 +01:00
cd /usr/src
2019-02-21 10:04:23 -07:00
#git clone -b v1.8 https://freeswitch.org/stash/scm/fs/freeswitch.git /usr/src/freeswitch
2019-02-28 05:00:33 -07:00
wget http://files.freeswitch.org/freeswitch-releases/freeswitch-$switch_version.zip
unzip freeswitch-$switch_version.zip
2016-05-26 11:55:14 +01:00
rm -R freeswitch
2019-02-28 05:00:33 -07:00
mv freeswitch-$switch_version freeswitch
2019-02-21 10:04:23 -07:00
cd /usr/src/freeswitch
2016-05-26 11:55:14 +01:00
2019-02-21 10:04:23 -07:00
# bootstrap is needed if using git
2016-05-26 11:55:14 +01:00
#./bootstrap.sh -j
2019-02-21 10:04:23 -07:00
# enable required modules
2016-05-26 11:55:14 +01:00
sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_avmd:applications/mod_avmd:'
sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_callcenter:applications/mod_callcenter:'
sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_cidlookup:applications/mod_cidlookup:'
sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_memcache:applications/mod_memcache:'
2019-06-24 16:13:34 -06:00
sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_nibblebill:applications/mod_nibblebill:'
2016-05-26 11:55:14 +01:00
sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_curl:applications/mod_curl:'
sed -i /usr/src/freeswitch/modules.conf -e s:'#formats/mod_shout:formats/mod_shout:'
2019-08-07 09:45:50 -06:00
sed -i /usr/src/freeswitch/modules.conf -e s:'#formats/mod_pgsql:formats/mod_pgsql:'
2019-02-21 10:04:23 -07:00
2019-06-03 20:33:05 -06:00
#disable module or install dependency libks to compile signalwire
sed -i /usr/src/freeswitch/modules.conf -e s:'applications/mod_signalwire:#applications/mod_signalwire:'
2019-02-21 10:04:23 -07:00
# prepare the build
#./configure --prefix=/usr/local/freeswitch --enable-core-pgsql-support --disable-fhs
./configure -C --enable-portable-binary --disable-dependency-tracking \
--prefix=/usr --localstatedir=/var --sysconfdir=/etc \
--with-openssl --enable-core-pgsql-support
# compile and install
2016-05-26 11:55:14 +01:00
make
make install
make sounds-install moh-install
make hd-sounds-install hd-moh-install
make cd-sounds-install cd-moh-install
2016-06-14 01:00:28 +01:00
2016-09-04 12:32:10 -06:00
#move the music into music/default directory
2019-02-21 11:02:35 -07:00
mkdir -p /usr/share/freeswitch/sounds/music/default
mv /usr/share/freeswitch/sounds/music/*000 /usr/share/freeswitch/sounds/music/default
2016-09-04 12:32:10 -06:00
2016-07-05 18:00:20 +01:00
#return to the executing directory
cd $CWD