Fix the FreeeSWITCH compile
This commit is contained in:
parent
8e6a80f29d
commit
0e8f0aa7e5
|
|
@ -1,40 +1,55 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
#send a message
|
||||||
echo "Installing the FreeSWITCH source"
|
echo "Installing the FreeSWITCH source"
|
||||||
DEBIAN_FRONTEND=none APT_LISTCHANGES_FRONTEND=none apt-get install -y --force-yes ntpdate libapache2-mod-log-sql-ssl libfreetype6-dev git-buildpackage doxygen yasm nasm gdb git build-essential automake autoconf 'libtool-bin|libtool' python uuid-dev zlib1g-dev 'libjpeg8-dev|libjpeg62-turbo-dev' libncurses5-dev libssl-dev libpcre3-dev libcurl4-openssl-dev libldns-dev libedit-dev libspeexdsp-dev libspeexdsp-dev libsqlite3-dev perl libgdbm-dev libdb-dev bison libvlc-dev libvlccore-dev vlc-nox pkg-config ccache libpng-dev libvpx-dev libyuv-dev libopenal-dev libbroadvoice-dev libcodec2-dev libflite-dev libg7221-dev libilbc-dev libmongoc-dev libsilk-dev libsoundtouch-dev libmagickcore-dev liblua5.2-dev libopus-dev libsndfile-dev libopencv-dev libavformat-dev libx264-dev erlang-dev libldap2-dev libmemcached-dev libperl-dev portaudio19-dev python-dev libsnmp-dev libyaml-dev libmp4v2-dev
|
|
||||||
apt-get install -y --force-yes unzip libpq-dev memcached libshout3-dev libvpx-dev libmpg123-dev libmp3lame-dev
|
|
||||||
|
|
||||||
apt-get update && apt-get install -y --force-yes ntp curl haveged
|
#install minimum dependencies
|
||||||
curl https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add -
|
pkg install --yes autoconf automake curl git gmake ldns libedit libtool openssl pcre pkgconf speex sqlite3 wget sudo libsndfile lua52 opus libmemcached libvorbis libogg tiff
|
||||||
echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /etc/apt/sources.list.d/freeswitch.list
|
|
||||||
echo "deb http://files.freeswitch.org/repo/deb/debian-unstable/ jessie main" > /etc/apt/sources.list.d/freeswitch.list
|
|
||||||
apt-get update && apt-get upgrade
|
|
||||||
apt-get install -y --force-yes freeswitch-video-deps-most
|
|
||||||
|
|
||||||
|
#additional dependencies
|
||||||
|
#pkg install --yes libshout mpg123 lame
|
||||||
|
|
||||||
|
#get the source
|
||||||
git clone https://freeswitch.org/stash/scm/fs/freeswitch.git /usr/src/freeswitch
|
git clone https://freeswitch.org/stash/scm/fs/freeswitch.git /usr/src/freeswitch
|
||||||
cd /usr/src/freeswitch
|
cd /usr/src/freeswitch
|
||||||
|
|
||||||
sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_avmd:applications/mod_avmd:'
|
#prepare the source
|
||||||
sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_callcenter:applications/mod_callcenter:'
|
cd /usr/src/freeswitch && /bin/sh /usr/src/freeswitch/bootstrap.sh -j
|
||||||
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:'
|
|
||||||
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:'
|
|
||||||
./bootstrap.sh -j
|
|
||||||
#./configure --prefix=/usr/local/freeswitch --enable-core-pgsql-support --enable-system-lua --disable-fhs
|
|
||||||
./configure --prefix=/usr/local/freeswitch --enable-core-pgsql-support --disable-fhs
|
|
||||||
|
|
||||||
#make mod_shout-install
|
#enable the modules
|
||||||
make
|
sed -i' ' -e s:'#applications/mod_avmd:applications/mod_avmd:' /usr/src/freeswitch/modules.conf
|
||||||
|
sed -i' ' -e s:'#applications/mod_callcenter:applications/mod_callcenter:' /usr/src/freeswitch/modules.conf
|
||||||
|
sed -i' ' -e s:'#applications/mod_cidlookup:applications/mod_cidlookup:' /usr/src/freeswitch/modules.conf
|
||||||
|
sed -i' ' -e s:'#applications/mod_memcache:applications/mod_memcache:' /usr/src/freeswitch/modules.conf
|
||||||
|
sed -i' ' -e s:'#applications/mod_curl:applications/mod_curl:' /usr/src/freeswitch/modules.conf
|
||||||
|
#sed -i' ' -e s:'#formats/mod_shout:formats/mod_shout:' /usr/src/freeswitch/modules.conf
|
||||||
|
|
||||||
|
#configure the source (additional option --enable-system-lua)
|
||||||
|
/bin/sh configure --prefix=/usr/local/freeswitch --enable-core-pgsql-support --disable-fhs
|
||||||
|
|
||||||
|
#gmake
|
||||||
rm -rf /usr/local/freeswitch/{lib,mod,bin}/*
|
rm -rf /usr/local/freeswitch/{lib,mod,bin}/*
|
||||||
make install
|
gmake install
|
||||||
make sounds-install moh-install
|
gmake sounds-install moh-install
|
||||||
make hd-sounds-install hd-moh-install
|
gmake hd-sounds-install hd-moh-install
|
||||||
make cd-sounds-install cd-moh-install
|
gmake cd-sounds-install cd-moh-install
|
||||||
|
gmake uhd-sounds-install uhd-sounds-install
|
||||||
|
|
||||||
#move the music into music/default directory
|
#move the music into music/default directory
|
||||||
mkdir -p /usr/local/freeswitch/sounds/music/default
|
mkdir -p /usr/local/freeswitch/sounds/music/default
|
||||||
mv /usr/local/freeswitch/sounds/music/*000 /usr/local/freeswitch/sounds/music/default
|
mv /usr/local/freeswitch/sounds/music/*000 /usr/local/freeswitch/sounds/music/default
|
||||||
|
|
||||||
|
#move to script directory so all relative paths work
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
#configure system service
|
#configure system service
|
||||||
ln -s /usr/local/freeswitch/bin/fs_cli /usr/bin/fs_cli
|
ln -s /usr/local/freeswitch/bin/fs_cli /usr/bin/fs_cli
|
||||||
cp "$(dirname $0)/source/freeswitch.service" /lib/systemd/system/freeswitch.service
|
cp switch/rc.d.freeswitch /usr/local/etc/rc.d/freeswitch
|
||||||
|
chmod u-w,ugo+x /usr/local/etc/rc.d/freeswitch
|
||||||
|
|
||||||
|
#enable the service
|
||||||
|
echo 'freeswitch_enable="YES"' >> /etc/rc.conf
|
||||||
|
echo 'freeswitch_flags="-nc -nonat -reincarnate -u www -g www"' >> /etc/rc.conf
|
||||||
|
|
||||||
|
#start the service
|
||||||
|
service freeswitch start
|
||||||
|
|
|
||||||
|
|
@ -1,56 +1,55 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
#send a message
|
||||||
echo "Installing the FreeSWITCH source"
|
echo "Installing the FreeSWITCH source"
|
||||||
DEBIAN_FRONTEND=none APT_LISTCHANGES_FRONTEND=none apt-get install -y --force-yes ntpdate libapache2-mod-log-sql-ssl libfreetype6-dev git-buildpackage doxygen yasm nasm gdb git build-essential automake autoconf 'libtool-bin|libtool' python uuid-dev zlib1g-dev 'libjpeg8-dev|libjpeg62-turbo-dev' libncurses5-dev libssl-dev libpcre3-dev libcurl4-openssl-dev libldns-dev libedit-dev libspeexdsp-dev libspeexdsp-dev libsqlite3-dev perl libgdbm-dev libdb-dev bison libvlc-dev libvlccore-dev vlc-nox pkg-config ccache libpng-dev libvpx-dev libyuv-dev libopenal-dev libbroadvoice-dev libcodec2-dev libflite-dev libg7221-dev libilbc-dev libmongoc-dev libsilk-dev libsoundtouch-dev libmagickcore-dev liblua5.2-dev libopus-dev libsndfile-dev libopencv-dev libavformat-dev libx264-dev erlang-dev libldap2-dev libmemcached-dev libperl-dev portaudio19-dev python-dev libsnmp-dev libyaml-dev libmp4v2-dev
|
|
||||||
apt-get install -y --force-yes ntp unzip libpq-dev memcached libshout3-dev libvpx-dev libmpg123-dev libmp3lame-dev
|
|
||||||
|
|
||||||
apt-get update && apt-get install -y --force-yes curl haveged
|
#install minimum dependencies
|
||||||
curl https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add -
|
pkg install --yes autoconf automake curl git gmake ldns libedit libtool openssl pcre pkgconf speex sqlite3 wget sudo libsndfile lua52 opus libmemcached libvorbis libogg tiff
|
||||||
echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /etc/apt/sources.list.d/freeswitch.list
|
|
||||||
apt-get update && apt-get upgrade
|
|
||||||
apt-get install -y --force-yes freeswitch-video-deps-most
|
|
||||||
|
|
||||||
#we are about to move out of the executing directory so we need to preserve it to return after we are done
|
#additional dependencies
|
||||||
CWD=$(pwd)
|
#pkg install --yes libshout mpg123 lame
|
||||||
#git clone https://freeswitch.org/stash/scm/fs/freeswitch.git /usr/src/freeswitch
|
|
||||||
#git clone -b v1.6 https://freeswitch.org/stash/scm/fs/freeswitch.git /usr/src/freeswitch
|
|
||||||
SWITCH_MAJOR=$(git ls-remote --heads https://freeswitch.org/stash/scm/fs/freeswitch.git "v*" | cut -d/ -f 3 | grep -P '^v\d+\.\d+' | sort | tail -n 1| cut -dv -f2)
|
|
||||||
SWITCH_MINOR=$(git ls-remote --tags https://freeswitch.org/stash/scm/fs/freeswitch.git v$SWITCH_MAJOR.* | cut -d/ -f3 | cut -dv -f2 | cut -d. -f3 | sort -n | tail -n1)
|
|
||||||
SWITCH_VERSION=$SWITCH_MAJOR.$SWITCH_MINOR
|
|
||||||
echo "Using version $SWITCH_VERSION"
|
|
||||||
cd /usr/src
|
|
||||||
wget http://files.freeswitch.org/freeswitch-releases/freeswitch-$SWITCH_VERSION.zip
|
|
||||||
unzip freeswitch-$SWITCH_VERSION.zip
|
|
||||||
rm -R freeswitch
|
|
||||||
mv freeswitch-$SWITCH_VERSION freeswitch
|
|
||||||
cd freeswitch
|
|
||||||
|
|
||||||
#./bootstrap.sh -j
|
#get the source
|
||||||
sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_avmd:applications/mod_avmd:'
|
git clone -b v1.6 https://freeswitch.org/stash/scm/fs/freeswitch.git /usr/src/freeswitch
|
||||||
sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_callcenter:applications/mod_callcenter:'
|
cd /usr/src/freeswitch
|
||||||
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:'
|
#prepare the source
|
||||||
sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_curl:applications/mod_curl:'
|
cd /usr/src/freeswitch && /bin/sh /usr/src/freeswitch/bootstrap.sh -j
|
||||||
sed -i /usr/src/freeswitch/modules.conf -e s:'#formats/mod_shout:formats/mod_shout:'
|
|
||||||
#./configure --help
|
#enable the modules
|
||||||
#./configure --prefix=/usr/local/freeswitch --enable-core-pgsql-support --enable-system-lua --disable-fhs
|
sed -i' ' -e s:'#applications/mod_avmd:applications/mod_avmd:' /usr/src/freeswitch/modules.conf
|
||||||
./configure --prefix=/usr/local/freeswitch --enable-core-pgsql-support --disable-fhs
|
sed -i' ' -e s:'#applications/mod_callcenter:applications/mod_callcenter:' /usr/src/freeswitch/modules.conf
|
||||||
#make mod_shout-install
|
sed -i' ' -e s:'#applications/mod_cidlookup:applications/mod_cidlookup:' /usr/src/freeswitch/modules.conf
|
||||||
make
|
sed -i' ' -e s:'#applications/mod_memcache:applications/mod_memcache:' /usr/src/freeswitch/modules.conf
|
||||||
|
sed -i' ' -e s:'#applications/mod_curl:applications/mod_curl:' /usr/src/freeswitch/modules.conf
|
||||||
|
#sed -i' ' -e s:'#formats/mod_shout:formats/mod_shout:' /usr/src/freeswitch/modules.conf
|
||||||
|
|
||||||
|
#configure the source (additional option --enable-system-lua)
|
||||||
|
/bin/sh configure --prefix=/usr/local/freeswitch --enable-core-pgsql-support --disable-fhs
|
||||||
|
|
||||||
|
#gmake
|
||||||
rm -rf /usr/local/freeswitch/{lib,mod,bin}/*
|
rm -rf /usr/local/freeswitch/{lib,mod,bin}/*
|
||||||
make install
|
gmake install
|
||||||
make sounds-install moh-install
|
gmake sounds-install moh-install
|
||||||
make hd-sounds-install hd-moh-install
|
gmake hd-sounds-install hd-moh-install
|
||||||
make cd-sounds-install cd-moh-install
|
gmake cd-sounds-install cd-moh-install
|
||||||
|
gmake uhd-sounds-install uhd-sounds-install
|
||||||
|
|
||||||
#move the music into music/default directory
|
#move the music into music/default directory
|
||||||
mkdir -p /usr/local/freeswitch/sounds/music/default
|
mkdir -p /usr/local/freeswitch/sounds/music/default
|
||||||
mv /usr/local/freeswitch/sounds/music/*000 /usr/local/freeswitch/sounds/music/default
|
mv /usr/local/freeswitch/sounds/music/*000 /usr/local/freeswitch/sounds/music/default
|
||||||
|
|
||||||
#return to the executing directory
|
#move to script directory so all relative paths work
|
||||||
cd $CWD
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
#configure system service
|
#configure system service
|
||||||
ln -s /usr/local/freeswitch/bin/fs_cli /usr/bin/fs_cli
|
ln -s /usr/local/freeswitch/bin/fs_cli /usr/bin/fs_cli
|
||||||
cp "$(dirname $0)/source/freeswitch.service" /lib/systemd/system/freeswitch.service
|
cp switch/rc.d.freeswitch /usr/local/etc/rc.d/freeswitch
|
||||||
cp "$(dirname $0)/source/etc.default.freeswitch.source /etc/default/freeswitch
|
chmod u-w,ugo+x /usr/local/etc/rc.d/freeswitch
|
||||||
|
|
||||||
|
#enable the service
|
||||||
|
echo 'freeswitch_enable="YES"' >> /etc/rc.conf
|
||||||
|
echo 'freeswitch_flags="-nc -nonat -reincarnate -u www -g www"' >> /etc/rc.conf
|
||||||
|
|
||||||
|
#start the service
|
||||||
|
service freeswitch start
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue