network/asterisk: Update script.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Chris Walker 2018-11-18 07:21:31 +07:00 committed by Willy Sudiarto Raharjo
parent 165863605b
commit 1ae375f4d4
No known key found for this signature in database
GPG key ID: 887B8374D7333381
2 changed files with 41 additions and 12 deletions

View file

@ -43,10 +43,15 @@ This build script supports the following flags:
Set this flag to 'yes' if you would like to build the projects
internal jansson libraries. The default for this option is 'no',
which requires you to have jansson >= 2.11 installed on your system
system. Set this to 'yes' if you would like to ignore the system
requirement and have Asterisk build an internal version of the
library.
which requires you to have jansson >= 2.11 installed on your system.
Set this to 'yes' if you would like to ignore the system requirement
and have Asterisk build an internal version of the library.
* LANGUAGE : [default = EN]
Set this flag to change the language used by Asterisk. This flag
supports the following values: EN, EN_AU, EN_GB, EN_NX, ES, FR, IT,
RU, JA, and SV.
* MEETME : [default = no]

View file

@ -24,7 +24,7 @@
PRGNAM=asterisk
VERSION=${VERSION:-16.0.0}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -99,7 +99,7 @@ if [ "${VM_IMAP:-no}" != "no" ] && [ "${VM_ODBC:-no}" = "no" ]; then
CONFIGURE_OPTS="--with-imap=$TMP/$IMAPDIR"
fi
if [ "${JANSSON:-no}" != "no" ]; then
if [ "${JANSSON:-no}" != "yes" ]; then
CONFIGURE_OPTS="${CONFIGURE_OPTS} --with-jansson-bundled"
else
CONFIGURE_OPTS="${CONFIGURE_OPTS} --without-jansson-bundled"
@ -136,8 +136,19 @@ CXXFLAGS="$SLKCFLAGS" \
)
make menuselect-tree
LANGUAGE=${LANGUAGE:-EN}
menuselect/menuselect \
--enable res_config_mysql \
--enable CORE-SOUNDS-${LANGUAGE}-WAV \
--enable CORE-SOUNDS-${LANGUAGE}-ULAW \
--enable CORE-SOUNDS-${LANGUAGE}-ALAW \
--enable CORE-SOUNDS-${LANGUAGE}-GSM \
--enable CORE-SOUNDS-${LANGUAGE}-G729 \
--enable CORE-SOUNDS-${LANGUAGE}-G722 \
--enable CORE-SOUNDS-${LANGUAGE}-SLN16 \
--enable CORE-SOUNDS-${LANGUAGE}-SIREN6 \
--enable CORE-SOUNDS-${LANGUAGE}-SIREN17 \
menuselect.makeopts
if [ "${MOH:-no}" != "no" ]; then
@ -146,16 +157,29 @@ if [ "${MOH:-no}" != "no" ]; then
--enable MOH-OPSOUND-ALAW \
--enable MOH-OPSOUND-GSM \
--enable MOH-OPSOUND-G729 \
--enable MOH-OPSOUND-G722 \
--enable MOH-OPSOUND-SLN16 \
--enable MOH-OPSOUND-SIREN7 \
--enable MOH-OPSOUND-SIREN14 \
menuselect.makeopts
fi
if [ "${SOUNDS_EXTRA:-no}" != "no" ]; then
# EXTRA_SOUNDS only has a subset of languages available for CORE_SOUNDS
LANGUAGE_EXTRA=EN
if [ "${LANGUAGE}" = "EN" -o "${LANGUAGE}" = "EN_GB" -o "${LANGUAGE}" -o "FR" ]; then
LANGUAGE_EXTRA="${LANGUAGE}"
fi
menuselect/menuselect \
--enable EXTRA-SOUNDS-EN-WAV \
--enable EXTRA-SOUNDS-EN-ULAW \
--enable EXTRA-SOUNDS-EN-ALAW \
--enable EXTRA-SOUNDS-EN-GSM \
--enable EXTRA-SOUNDS-EN-G729 \
--enable EXTRA-SOUNDS-${LANGUAGE_EXTRA}-WAV \
--enable EXTRA-SOUNDS-${LANGUAGE_EXTRA}-ULAW \
--enable EXTRA-SOUNDS-${LANGUAGE_EXTRA}-ALAW \
--enable EXTRA-SOUNDS-${LANGUAGE_EXTRA}-GSM \
--enable EXTRA-SOUNDS-${LANGUAGE_EXTRA}-G729 \
--enable EXTRA-SOUNDS-${LANGUAGE-EXTRA}-G722 \
--enable EXTRA-SOUNDS-${LANGUAGE-EXTRA}-SLN16 \
--enable EXTRA-SOUNDS-${LANGUAGE_EXTRA}-SIREN7 \
--enable EXTRA-SOUNDS-${LANGUAGE_EXTRA}-SIREN14 \
menuselect.makeopts
fi
@ -203,7 +227,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
# Install a few typical config files for common asterisk servers
for i in \
asterisk codecs extensions iax indications musiconhold sip modules voicemail ;
asterisk codecs extensions iax indications musiconhold sip smdi modules voicemail ;
do
cat $PKG/usr/doc/$PRGNAM-$VERSION/sample_confs/${i}.conf > \
$PKG/etc/asterisk/${i}.conf.new ;