diff options
Diffstat (limited to 'main/freeswitch')
-rw-r--r-- | main/freeswitch/APKBUILD | 61 | ||||
-rw-r--r-- | main/freeswitch/freeswitch.confd | 25 | ||||
-rwxr-xr-x | main/freeswitch/freeswitch.initd | 58 | ||||
-rwxr-xr-x | main/freeswitch/freeswitch.post-install | 5 | ||||
-rwxr-xr-x | main/freeswitch/freeswitch.pre-install | 5 | ||||
-rw-r--r-- | main/freeswitch/modules.conf | 75 |
6 files changed, 229 insertions, 0 deletions
diff --git a/main/freeswitch/APKBUILD b/main/freeswitch/APKBUILD new file mode 100644 index 00000000..860ec0ff --- /dev/null +++ b/main/freeswitch/APKBUILD @@ -0,0 +1,61 @@ +# Contributor: Michael Mason <ms13sp@gmail.com> +pkgname=freeswitch +pkgver=1.0.6 +pkgrel=6 +pkgdesc="A communications platform written in C from the ground up" +url="http://www.freeswitch.org" +license="GPL" +depends="" +makedepends="curl-dev unixodbc-dev zlib-dev openssl-dev + autoconf automake libtool" +install="$pkgname.pre-install $pkgname.post-install" +subpackages="$pkgname-dev" +source="http://files.freeswitch.org/freeswitch-$pkgver.tar.gz + modules.conf + freeswitch.confd + freeswitch.initd + freeswitch.post-install + freeswitch.pre-install + " + +build() { + cd "$srcdir/$pkgname-$pkgver" + cp -f "$srcdir/modules.conf" modules.conf || return 1 + + # i think our max cmd len is 32768 + # by specifying it here we save our selves from some CPU cycles + export lt_cv_sys_max_cmd_len=8192 + + ./configure --prefix=/usr \ + --sysconfdir=/etc/freeswitch \ + --with-modinstdir=/usr/lib/freeswitch \ + --with-rundir=/var/run/freeswitch \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + + make all || return 1 +} +package(){ + cd "$srcdir/$pkgname-$pkgver" + make -j1 DESTDIR="$pkgdir" install + # we need to do some moving/cleanup to allow some... kind of FHS + mkdir -p "$pkgdir"/var/run/freeswitch + mkdir -p "$pkgdir"/var/lib/freeswitch + mkdir -p "$pkgdir"/var/log + mkdir -p "$pkgdir"/usr/share/freeswitch + mv "$pkgdir"/usr/db "$pkgdir"/var/lib/freeswitch/ + mv "$pkgdir"/usr/grammar "$pkgdir"/var/lib/freeswitch/ + mv "$pkgdir"/usr/htdocs "$pkgdir"/usr/share/freeswitch/ + mv "$pkgdir"/usr/recordings "$pkgdir"/var/lib/freeswitch/ + mv "$pkgdir"/usr/scripts "$pkgdir"/usr/share/freeswitch/ + mv "$pkgdir"/usr/log "$pkgdir"/var/log/freeswitch + install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname +} + +md5sums="388effee587887a81fe7f411b7350590 freeswitch-1.0.6.tar.gz +c05f2356be159e99b3845f5260a33599 modules.conf +c608cca8ad773acebf201f581438c7e7 freeswitch.confd +a15f739b6f4f2c1685ab9f8831d30ca6 freeswitch.initd +107c52398ff88275006b8223ee0b4907 freeswitch.post-install +25945ad43b7dd988f37bf6f2603e22be freeswitch.pre-install" diff --git a/main/freeswitch/freeswitch.confd b/main/freeswitch/freeswitch.confd new file mode 100644 index 00000000..378e4b41 --- /dev/null +++ b/main/freeswitch/freeswitch.confd @@ -0,0 +1,25 @@ +# +# FreeSWITCH startup configuration +# + +# freeswitch will be running with this userid +FREESWITCH_USER="freeswitch" + + +# optional: group the freeswitch process should be running with +# +# (note: without this option freeswitch will be using all groups +# the user in FREESWITCH_USER is a member of) +# +#FREESWITCH_GROUP="freeswitch" + + + +# optional: other options, e.g. +# +# -hp Use realtime priority and protect freeswitch +# process from being swapped to disk +# (warning: dangerous on machines with little ram!) +# +#FREESWITCH_OPTS="" + diff --git a/main/freeswitch/freeswitch.initd b/main/freeswitch/freeswitch.initd new file mode 100755 index 00000000..0538fff5 --- /dev/null +++ b/main/freeswitch/freeswitch.initd @@ -0,0 +1,58 @@ +#!/sbin/runscript +# Copyright 2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: $ + +depend() { + need net +} + +opts="reload" + +start() { + local OPTS + + [ -n "${FREESWITCH_USER}" ] && \ + OPTS="${OPTS} -u ${FREESWITCH_USER}" + + [ -n "${FREESWITCH_GROUP}" ] && \ + OPTS="${OPTS} -g ${FREESWITCH_GROUP}" + + [ -n "${FREESWITCH_OPTS}" ] && \ + OPTS="${OPTS} ${FREESWITCH_OPTS}" + + ebegin "Starting Freeswitch" + limits + start-stop-daemon --start --quiet --exec /usr/bin/freeswitch \ + -- -nc -conf /etc/freeswitch -log /var/log/freeswitch \ + -run /var/run/freeswitch -db /var/lib/freeswitch/db \ + -htdocs /usr/share/freeswitch/htdocs \ + -scripts /usr/share/freeswitch/scripts ${OPTS} + eend $? +} + +# Recomended ULIMIT settings +# http://tinyurl.com/2dr467l (i,q,u,x not suppoted) + +limits() { + ulimit -c unlimited + ulimit -d unlimited + ulimit -f unlimited + ulimit -n 999999 + ulimit -v unlimited + ulimit -s 244 + ulimit -l unlimited +} + +stop() { + ebegin "Stopping Freeswitch" + /usr/bin/freeswitch -stop + eend $? +} + +reload() { + start-stop-daemon --stop --signal 1 --quiet --pidfile \ + /var/run/freeswitch.pid --name freeswitch + return 0 +} + diff --git a/main/freeswitch/freeswitch.post-install b/main/freeswitch/freeswitch.post-install new file mode 100755 index 00000000..fef23cae --- /dev/null +++ b/main/freeswitch/freeswitch.post-install @@ -0,0 +1,5 @@ +#!/bin/sh + +chown -R freeswitch:freeswitch /var/*/freeswitch + +exit 0 diff --git a/main/freeswitch/freeswitch.pre-install b/main/freeswitch/freeswitch.pre-install new file mode 100755 index 00000000..043b963b --- /dev/null +++ b/main/freeswitch/freeswitch.pre-install @@ -0,0 +1,5 @@ +#!/bin/sh + +adduser -H -h /var/run/freeswitch -s /bin/false -D freeswitch 2>/dev/null + +exit 0 diff --git a/main/freeswitch/modules.conf b/main/freeswitch/modules.conf new file mode 100644 index 00000000..c6f5a05d --- /dev/null +++ b/main/freeswitch/modules.conf @@ -0,0 +1,75 @@ +loggers/mod_console +loggers/mod_logfile +loggers/mod_syslog +applications/mod_commands +applications/mod_conference +applications/mod_dptools +applications/mod_enum +applications/mod_fifo +#applications/mod_fax +applications/mod_voicemail +#applications/mod_lcr +applications/mod_limit +applications/mod_expr +applications/mod_esf +#applications/mod_easyroute +applications/mod_fsv +#applications/mod_soundtouch +#applications/mod_rss +#applications/mod_snom +#applications/mod_vmd +#asr_tts/mod_flite +#asr_tts/mod_pocketsphinx +#asr_tts/mod_cepstral +codecs/mod_g723_1 +codecs/mod_amr +#codecs/mod_amrwb +codecs/mod_g729 +codecs/mod_h26x +codecs/mod_voipcodecs +codecs/mod_ilbc +codecs/mod_speex +#codecs/mod_siren +#codecs/mod_celt +#codecs/mod_dahdi_codec +#dialplans/mod_dialplan_directory +dialplans/mod_dialplan_xml +dialplans/mod_dialplan_asterisk +#directories/mod_ldap +#endpoints/mod_dingaling +endpoints/mod_iax +#endpoints/mod_portaudio +endpoints/mod_sofia +endpoints/mod_loopback +#endpoints/mod_alsa +#endpoints/mod_opal +#../../libs/openzap/mod_openzap +#event_handlers/mod_event_multicast +event_handlers/mod_event_socket +event_handlers/mod_cdr_csv +#event_handlers/mod_radius_cdr +formats/mod_native_file +formats/mod_sndfile +#formats/mod_shout +formats/mod_local_stream +formats/mod_tone_stream +#languages/mod_python +#languages/mod_spidermonkey +#languages/mod_spidermonkey_teletone +#languages/mod_spidermonkey_core_db +#languages/mod_spidermonkey_socket +#languages/mod_spidermonkey_odbc +languages/mod_lua +#languages/mod_perl +#languages/mod_yaml +#xml_int/mod_xml_rpc +#xml_int/mod_xml_curl +#xml_int/mod_xml_cdr +#xml_int/mod_xml_ldap +say/mod_say_en +#say/mod_say_de +#say/mod_say_es +#say/mod_say_fr +#say/mod_say_it +#say/mod_say_nl +#say/mod_say_zh |