瀏覽代碼

Add 1.10.7 to source-script. (#379)

Squashed commit of the following:
-install iptables as it is not part of minimal install.
-change swig for bullseye to swig4.0
-php7.4-dev for build required (php-config)
-add python3-distutils
-libks seems to be required for mod_verto
-disable mod_avmd to keep in sync with ubuntu-config (https://github.com/fusionpbx/fusionpbx-install.sh/commit/eaaef0316349e7f737c2e01196a0aa9f1c5e2e1f#diff-62a8f25a3200194e88b1073f2b11ebdf1622761f025a30158c012e83e5f593aa)
Andy Binder 3 年之前
父節點
當前提交
73e1606d6c
共有 4 個文件被更改,包括 52 次插入7 次删除
  1. 3 0
      debian/resources/config.sh
  2. 1 0
      debian/resources/iptables.sh
  3. 1 1
      debian/resources/php.sh
  4. 47 6
      debian/resources/switch/source-release.sh

+ 3 - 0
debian/resources/config.sh

@@ -12,6 +12,9 @@ switch_package=true             # true or false
 switch_version=1.10.3           # only for source
 switch_tls=true                 # true or false
 
+# Sofia-Sip Settings
+sofia_version=1.13.6            # release-version for sofia-sip to use
+
 # Database Settings
 database_password=random        # random or a custom value (safe characters A-Z, a-z, 0-9)
 database_repo=official          # PostgreSQL official, system, 2ndquadrant

+ 1 - 0
debian/resources/iptables.sh

@@ -17,6 +17,7 @@ if [ ."$os_codename" = ."buster" ]; then
 	update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
 fi
 if [ ."$os_codename" = ."bullseye" ]; then
+	apt-get install -y iptables
 	update-alternatives --set iptables /usr/sbin/iptables-legacy
 	update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
 fi

+ 1 - 1
debian/resources/php.sh

@@ -75,7 +75,7 @@ if [ ."$php_version" = ."7.3" ]; then
 		apt-get install -y php7.3 php7.3-cli php7.3-fpm php7.3-pgsql php7.3-sqlite3 php7.3-odbc php7.3-curl php7.3-imap php7.3-xml php7.3-gd php7.3-mbstring
 fi
 if [ ."$php_version" = ."7.4" ]; then
-		apt-get install -y php7.4 php7.4-cli php7.4-fpm php7.4-pgsql php7.4-sqlite3 php7.4-odbc php7.4-curl php7.4-imap php7.4-xml php7.4-gd php7.4-mbstring
+		apt-get install -y php7.4 php7.4-cli php7.4-dev php7.4-fpm php7.4-pgsql php7.4-sqlite3 php7.4-odbc php7.4-curl php7.4-imap php7.4-xml php7.4-gd php7.4-mbstring
 fi
 
 #update config if source is being used

+ 47 - 6
debian/resources/switch/source-release.sh

@@ -11,7 +11,7 @@ cd "$(dirname "$0")"
 apt update && apt upgrade -y
 
 # install dependencies
-apt install -y autoconf automake devscripts g++ git-core libncurses5-dev libtool make libjpeg-dev 
+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
@@ -20,20 +20,61 @@ apt install -y libavformat-dev libswscale-dev
 
 #install dependencies that depend on the operating system version
 if [ ."$os_codename" = ."stretch" ]; then
-	apt install -y libvpx4
+	apt install -y libvpx4 swig3.0
 fi
 if [ ."$os_codename" = ."buster" ]; then
-	apt install -y libvpx5
+	apt install -y libvpx5 swig3.0
 fi
 if [ ."$os_codename" = ."bullseye" ]; then
-	apt install -y libvpx6
+	apt install -y libvpx6 swig4.0 python3-distutils
 fi
 
 # additional dependencies
-apt install -y sqlite3 swig3.0 unzip
+apt install -y sqlite3 unzip
 
 #we are about to move out of the executing directory so we need to preserve it to return after we are done
 CWD=$(pwd)
+
+if [ $(echo "$switch_version" | tr -d '.') -gt 1103 ]
+then
+# libks build-requirements
+apt install -y cmake uuid-dev
+
+# libks
+cd /usr/src
+git clone https://github.com/signalwire/libks.git libks
+cd libks
+cmake .
+make
+make install
+
+# libks C includes
+export C_INCLUDE_PATH=/usr/include/libks
+
+# sofia-sip
+cd /usr/src
+#git clone https://github.com/freeswitch/sofia-sip.git sofia-sip
+wget https://github.com/freeswitch/sofia-sip/archive/refs/tags/v$sofia_version.zip
+unzip v$sofia_version.zip
+rm -R sofia-sip
+mv sofia-sip-$sofia_version sofia-sip
+cd sofia-sip
+sh autogen.sh
+./configure
+make
+make install
+
+# spandsp
+cd /usr/src
+git clone https://github.com/freeswitch/spandsp.git spandsp
+cd spandsp
+sh autogen.sh
+./configure
+make
+make install
+ldconfig
+fi
+
 echo "Using version $switch_version"
 cd /usr/src
 #git clone -b v1.8 https://freeswitch.org/stash/scm/fs/freeswitch.git /usr/src/freeswitch
@@ -50,7 +91,7 @@ cd /usr/src/freeswitch
 #./bootstrap.sh -j
 
 # enable required modules
-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_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:'