Refactor dependency logic for libks, sofia-sip, and spandsp

This commit is contained in:
FusionPBX
2026-05-18 20:25:01 +00:00
committed by GitHub
parent 6289b6885b
commit 1d4100b95f

View File

@@ -42,8 +42,8 @@ apt install -y sqlite3 unzip
# preserve the executing directory, so we need to return after we are done
CWD=$(pwd)
#install the following dependencies if the switch version is greater than 1.10.0
if [ ."$switch_branch" = ."stable" || ."$switch_branch" = ."master" ]; then
# install libks - dependency for switch versions greater than 1.10.0
if [ ! -d /usr/src/libks ]; then
# libks build-requirements
apt install -y cmake uuid-dev
@@ -58,8 +58,10 @@ if [ ."$switch_branch" = ."stable" || ."$switch_branch" = ."master" ]; then
# libks C includes
export C_INCLUDE_PATH=/usr/include/libks
fi
# sofia-sip
# sofia-sip - dependency for switch versions greater than 1.10.0
if [ ! -d /usr/src/sofia-sip ]; then
cd /usr/src
if [ ."$sofia_version" = ."master" ]; then
git clone https://github.com/freeswitch/sofia-sip.git sofia-sip
@@ -70,14 +72,17 @@ if [ ."$switch_branch" = ."stable" || ."$switch_branch" = ."master" ]; then
else
wget https://github.com/freeswitch/sofia-sip/archive/refs/tags/v$sofia_version.zip
unzip v$sofia_version.zip
cd sofia-sip-$sofia_version
mv sofia-sip-$sofia_version sofia-sip
cd sofia-sip
fi
sh autogen.sh
./configure --enable-debug
make -j $(getconf _NPROCESSORS_ONLN)
make install
fi
# spandsp
# spandsp - dependency for switch versions greater than 1.10.0
if [ ! -d /usr/src/spandsp ]; then
cd /usr/src
git clone https://github.com/freeswitch/spandsp.git spandsp
cd spandsp