diff options
author | David Matson | 2016-10-30 18:22:55 -0700 |
---|---|---|
committer | David Matson | 2016-11-01 23:34:22 -0700 |
commit | e320dfa46cd88d2dc086dccb040bdc853b4ebc21 (patch) | |
tree | 048a73f60994361719062b2d95f15c22e98e3895 | |
download | aur-e320dfa46cd88d2dc086dccb040bdc853b4ebc21.tar.gz |
Add initial package.
-rw-r--r-- | .SRCINFO | 36 | ||||
-rw-r--r-- | PKGBUILD | 182 | ||||
-rw-r--r-- | freeswitch.service | 12 | ||||
l--------- | modules.conf | 1 | ||||
-rw-r--r-- | modules.conf.default | 167 | ||||
-rw-r--r-- | modules.conf.full | 167 |
6 files changed, 565 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ad2375fabdf4 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,36 @@ +pkgbase = freeswitch-core + pkgdesc = A scalable, open source telephony platform + pkgver = 1.6.12 + pkgrel = 1 + url = https://freeswitch.org/ + arch = i686 + arch = x86_64 + license = MPL + makedepends = libjpeg-turbo + makedepends = yasm + makedepends = nasm + makedepends = lua + makedepends = libsndfile + makedepends = opus + depends = curl + depends = libedit + depends = pcre + depends = speex + depends = sqlite + depends = xz + optdepends = lua: for mod_lua module + optdepends = libjpeg-turbo: for mod_spandsp module + optdepends = libsndfile: for mod_sndfile module + optdepends = opus: for mod_opus module + optdepends = ldns: for mod_enum module + provides = freeswitch + conflicts = freeswitch + source = https://files.freeswitch.org/releases/freeswitch/freeswitch-1.6.12.tar.xz + source = freeswitch.service + source = modules.conf + sha256sums = ae072ca2d96fd9ef59ca6f589f932048b088c7b469d46e468bb917371de24ff9 + sha256sums = 7eff153fdae3c99cd884c654335b32f484df5cb7e624bd6adc630372ea83e573 + sha256sums = SKIP + +pkgname = freeswitch-core + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ed68f859526d --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,182 @@ +# Maintainer: David Matson <gitcoder at outlook dot com> +pkgname=freeswitch-core +pkgver=1.6.12 +pkgrel=1 +pkgdesc='A scalable, open source telephony platform' +arch=('i686' 'x86_64') +url='https://freeswitch.org/' +license=('MPL') +depends=('curl' 'libedit' 'pcre' 'speex' 'sqlite' 'xz') +makedepends=('libjpeg-turbo' 'yasm' 'nasm') +optdepends=() +provides=('freeswitch') +conflicts=('freeswitch') +source=("https://files.freeswitch.org/releases/freeswitch/freeswitch-$pkgver.tar.xz" + 'freeswitch.service' + 'modules.conf') +sha256sums=('ae072ca2d96fd9ef59ca6f589f932048b088c7b469d46e468bb917371de24ff9' + '7eff153fdae3c99cd884c654335b32f484df5cb7e624bd6adc630372ea83e573' + 'SKIP') + +declare -A _mod_depends +_mod_depends=(['postgresql-libs']='mod_cdr_pg_csv' + ['unixodbc']='mod_odbc_cdr') + +declare -A _mod_makedepends +_mod_makedepends=(['alsa-lib']='mod_alsa' + ['hiredis']='mod_hiredis' + ['imagemagick']='mod_imagick' + ['ladspa']='mod_ladspa' + ['lua']='mod_lua' + ['libmemcached']='mod_memcache' + ['libmongoc']='mod_mongo' + ['libmp4v2']='mod_mp4 mod_mp4v2' + ['libyaml']='mod_yaml' + ['ptlib-stable']='mod_opal' + ['opal-stable']='mod_opal' + ['opus']='mod_opus' + ['portaudio']='mod_portaudio mod_portaudio_stream' + ['python2']='mod_python mod_v8' + ['libshout']='mod_shout' + ['mpg123']='mod_shout' + ['lame']='mod_shout' + ['libsndfile']='mod_sndfile' + ['soundtouch']='mod_soundtouch' + ['unixodbc']='mod_odbc_cdr' + ['vlc']='mod_vlc') + +declare -A _mod_optdepends +_mod_optdepends=(['hiredis']='mod_hiredis' + ['imagemagick']='mod_imagick' + ['ldns']='mod_enum' + ['libjpeg-turbo']='mod_spandsp' + ['libmemcached']='mod_memcache' + ['libmongoc']='mod_mongo' + ['libmp4v2']='mod_mp4 mod_mp4v2' + ['libsndfile']='mod_sndfile' + ['lua']='mod_lua' + ['mpg123']='mod_shout' + ['opus']='mod_opus' + ['perl']='mod_perl' + ['portaudio']='mod_portaudio mod_portaudio_stream' + ['soundtouch']='mod_soundtouch' + ['vlc']='mod_vlc') + +mod_enabled() { + if [[ "${srcdir}" ]]; then + _path="${srcdir}"/modules.conf + else + _path=modules.conf + fi + + grep -Eq "^[a-z_]+/$1$" ${_path} +} + +for _dep in "${!_mod_depends[@]}"; do + _mods=(${_mod_depends[$_dep]}) + + for _mod in "${_mods[@]}"; do + if [[ ! " ${depends} " =~ " ${_mod} " ]] && mod_enabled "${_mod}"; then + depends+=("${_dep}") + fi + done +done + +for _dep in "${!_mod_makedepends[@]}"; do + _mods=(${_mod_makedepends[$_dep]}) + + for _mod in "${_mods[@]}"; do + if [[ ! " ${makedepends} " =~ " ${_mod} " ]] && mod_enabled "${_mod}"; then + makedepends+=("${_dep}") + fi + done +done + +for _dep in "${!_mod_optdepends[@]}"; do + _mods=(${_mod_optdepends[$_dep]}) + _dep_mods=() + + for _mod in "${_mods[@]}"; do + if mod_enabled "${_mod}"; then + _dep_mods+=("${_mod}") + fi + done + + if [[ ${#_dep_mods[@]} -eq 1 ]]; then + optdepends+=("${_dep}: for ${_dep_mods[0]} module") + elif [[ ${#_dep_mods[@]} -gt 0 ]]; then + _dep_list="${_dep_mods[@]}" + optdepends+=("${_dep}: for ${_dep_list// / and } modules") + fi +done + +build() { + cd "freeswitch-$pkgver" + + _mod_options=() + + if mod_enabled 'mod_cdr_pg_csv'; then + _mod_options+=('--enable-core-pgsql-support') + fi + + if mod_enabled 'mod_odbc_cdr'; then + _mod_options+=('--enable-core-odbc-support') + fi + + if mod_enabled 'mod_python'; then + _mod_options+=('--with-python=/usr/bin/python2') + fi + + ./configure --enable-optimization --disable-debug --prefix=/usr \ + --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib/freeswitch \ + --includedir=/usr/include/freeswitch \ + --with-modinstdir=/usr/lib/freeswitch/mod --with-rundir=/run \ + --with-logfiledir=/var/log/freeswitch --with-dbdir=/var/lib/freeswitch/db \ + --with-htdocsdir=/usr/share/freeswitch/htdocs \ + --with-fontsdir=/usr/share/freeswitch/fonts \ + --with-soundsdir=/usr/share/freeswitch/sounds \ + --with-grammardir=/usr/share/freeswitch/grammar \ + --with-certsdir=/etc/freeswitch/tls \ + --with-scriptdir=/usr/share/freeswitch/scripts \ + --with-recordingsdir=/var/lib/freeswitch/recordings \ + --with-imagesdir=/usr/share/freeswitch/images \ + --with-storagedir=/var/lib/freeswitch/storage \ + --with-cachedir=/var/cache/freeswitch \ + --with-pkgconfigdir=/usr/lib/pkgconfig \ + ${_mod_options[@]} + + cp "${srcdir}"/modules.conf . + make +} + +package() { + cd "freeswitch-$pkgver" + + make DESTDIR="$pkgdir/" install + + rmdir "${pkgdir}"/run + rm -r "${pkgdir}"/etc/freeswitch/* + + if mod_enabled 'mod_perl'; then + mkdir -p "${pkgdir}"/usr/lib/perl5 + mv "${pkgdir}"/usr/perl "${pkgdir}"/usr/lib/perl5/vendor_perl + fi + + if ! mod_enabled 'mod_xml_rpc'; then + rm -r "${pkgdir}"/usr/share/freeswitch/htdocs/* + rm -r "${pkgdir}"/usr/share/freeswitch/fonts/* + rm -r "${pkgdir}"/usr/share/freeswitch/images/* + fi + + if ! mod_enabled 'mod_xml_cdr'; then + rmdir "${pkgdir}"/var/log/freeswitch/xml_cdr + fi + + if [ -e "${pkgdir}"/usr/share/freeswitch/grammar/model/communicator/ ]; then + chown root:root \ + "${pkgdir}"/usr/share/freeswitch/grammar/model/communicator/* + fi + + install -Dm644 "${srcdir}"/freeswitch.service \ + "${pkgdir}"/usr/lib/systemd/system/freeswitch.service +} diff --git a/freeswitch.service b/freeswitch.service new file mode 100644 index 000000000000..737ef3b4a556 --- /dev/null +++ b/freeswitch.service @@ -0,0 +1,12 @@ +[Unit] +Description=FreeSWITCH Service +After=network.target + +[Service] +Type=forking +PIDFile=/run/freeswitch.pid +ExecStart=/usr/bin/freeswitch -ncwait -nonat +ExecStop=/usr/bin/freeswitch -stop + +[Install] +WantedBy=multi-user.target diff --git a/modules.conf b/modules.conf new file mode 120000 index 000000000000..2b728aa709bc --- /dev/null +++ b/modules.conf @@ -0,0 +1 @@ +modules.conf.default
\ No newline at end of file diff --git a/modules.conf.default b/modules.conf.default new file mode 100644 index 000000000000..a3ee343f05a3 --- /dev/null +++ b/modules.conf.default @@ -0,0 +1,167 @@ +#applications/mod_abstraction +#applications/mod_av +#applications/mod_avmd +#applications/mod_bert +#applications/mod_blacklist +#applications/mod_callcenter +#applications/mod_cidlookup +#applications/mod_cluechoo +applications/mod_commands +applications/mod_conference +#applications/mod_curl +#applications/mod_cv +applications/mod_db +#applications/mod_directory +#applications/mod_distributor +applications/mod_dptools +#applications/mod_easyroute +applications/mod_enum +applications/mod_esf +#applications/mod_esl +applications/mod_expr +applications/mod_fifo +#applications/mod_fsk +applications/mod_fsv +applications/mod_hash +#applications/mod_hiredis +applications/mod_httapi +#applications/mod_http_cache +#applications/mod_ladspa +#applications/mod_lcr +#applications/mod_memcache +#applications/mod_mongo +#applications/mod_mp4 +#applications/mod_mp4v2 +#applications/mod_nibblebill +#applications/mod_oreka +#applications/mod_osp +#applications/mod_prefix +#applications/mod_rad_auth +#applications/mod_redis +#applications/mod_rss +applications/mod_sms +#applications/mod_sms_flowroute +#applications/mod_snapshot +#applications/mod_snom +#applications/mod_sonar +#applications/mod_soundtouch +applications/mod_spandsp +#applications/mod_spy +#applications/mod_stress +#applications/mod_translate +applications/mod_valet_parking +#applications/mod_vmd +applications/mod_voicemail +#applications/mod_voicemail_ivr +#asr_tts/mod_cepstral +#asr_tts/mod_flite +#asr_tts/mod_pocketsphinx +#asr_tts/mod_tts_commandline +#asr_tts/mod_unimrcp +codecs/mod_amr +#codecs/mod_amrwb +codecs/mod_b64 +#codecs/mod_bv +#codecs/mod_codec2 +#codecs/mod_com_g729 +#codecs/mod_dahdi_codec +codecs/mod_g723_1 +codecs/mod_g729 +codecs/mod_h26x +#codecs/mod_ilbc +#codecs/mod_isac +#codecs/mod_mp4v +codecs/mod_opus +#codecs/mod_sangoma_codec +#codecs/mod_silk +#codecs/mod_siren +#codecs/mod_theora +dialplans/mod_dialplan_asterisk +#dialplans/mod_dialplan_directory +dialplans/mod_dialplan_xml +#directories/mod_ldap +#endpoints/mod_alsa +#endpoints/mod_dingaling +#endpoints/mod_gsmopen +#endpoints/mod_h323 +#endpoints/mod_khomp +endpoints/mod_loopback +#endpoints/mod_opal +#endpoints/mod_portaudio +endpoints/mod_rtc +#endpoints/mod_rtmp +endpoints/mod_skinny +#endpoints/mod_skypopen +endpoints/mod_sofia +endpoints/mod_verto +#event_handlers/mod_amqp +event_handlers/mod_cdr_csv +#event_handlers/mod_cdr_mongodb +#event_handlers/mod_cdr_pg_csv +event_handlers/mod_cdr_sqlite +#event_handlers/mod_erlang_event +#event_handlers/mod_event_multicast +event_handlers/mod_event_socket +#event_handlers/mod_format_cdr +#event_handlers/mod_json_cdr +#event_handlers/mod_radius_cdr +#event_handlers/mod_odbc_cdr +#event_handlers/mod_kazoo +#event_handlers/mod_rayo +#event_handlers/mod_smpp +#event_handlers/mod_snmp +#event_handlers/mod_event_zmq +#formats/mod_imagick +formats/mod_local_stream +formats/mod_native_file +formats/mod_png +#formats/mod_portaudio_stream +#formats/mod_shell_stream +#formats/mod_shout +formats/mod_sndfile +#formats/mod_ssml +formats/mod_tone_stream +#formats/mod_vlc +#languages/mod_basic +#languages/mod_java +languages/mod_lua +#languages/mod_managed +#languages/mod_perl +#languages/mod_python +#languages/mod_v8 +#languages/mod_yaml +loggers/mod_console +#loggers/mod_graylog2 +loggers/mod_logfile +loggers/mod_syslog +#say/mod_say_de +say/mod_say_en +#say/mod_say_es +#say/mod_say_es_ar +#say/mod_say_fa +#say/mod_say_fr +#say/mod_say_he +#say/mod_say_hr +#say/mod_say_hu +#say/mod_say_it +#say/mod_say_ja +#say/mod_say_nl +#say/mod_say_pl +#say/mod_say_pt +#say/mod_say_ru +#say/mod_say_sv +#say/mod_say_th +#say/mod_say_zh +#timers/mod_posix_timer +#timers/mod_timerfd +xml_int/mod_xml_cdr +#xml_int/mod_xml_curl +#xml_int/mod_xml_ldap +#xml_int/mod_xml_radius +xml_int/mod_xml_rpc +xml_int/mod_xml_scgi + +#../../libs/freetdm/mod_freetdm + +## Experimental Modules (don't cry if they're broken) +#../../contrib/mod/xml_int/mod_xml_odbc diff --git a/modules.conf.full b/modules.conf.full new file mode 100644 index 000000000000..1142f3b335ce --- /dev/null +++ b/modules.conf.full @@ -0,0 +1,167 @@ +applications/mod_abstraction +#applications/mod_av +applications/mod_avmd +applications/mod_bert +applications/mod_blacklist +applications/mod_callcenter +applications/mod_cidlookup +applications/mod_cluechoo +applications/mod_commands +applications/mod_conference +applications/mod_curl +#applications/mod_cv +applications/mod_db +applications/mod_directory +applications/mod_distributor +applications/mod_dptools +applications/mod_easyroute +applications/mod_enum +applications/mod_esf +applications/mod_esl +applications/mod_expr +applications/mod_fifo +applications/mod_fsk +applications/mod_fsv +applications/mod_hash +applications/mod_hiredis +applications/mod_httapi +applications/mod_http_cache +applications/mod_ladspa +applications/mod_lcr +applications/mod_memcache +applications/mod_mongo +applications/mod_mp4 +applications/mod_mp4v2 +applications/mod_nibblebill +applications/mod_oreka +#applications/mod_osp +applications/mod_prefix +applications/mod_rad_auth +applications/mod_redis +applications/mod_rss +applications/mod_sms +#applications/mod_sms_flowroute +applications/mod_snapshot +applications/mod_snom +applications/mod_sonar +applications/mod_soundtouch +applications/mod_spandsp +applications/mod_spy +applications/mod_stress +applications/mod_translate +applications/mod_valet_parking +applications/mod_vmd +applications/mod_voicemail +applications/mod_voicemail_ivr +#asr_tts/mod_cepstral +#asr_tts/mod_flite +asr_tts/mod_pocketsphinx +asr_tts/mod_tts_commandline +asr_tts/mod_unimrcp +codecs/mod_amr +codecs/mod_amrwb +codecs/mod_b64 +#codecs/mod_bv +#codecs/mod_codec2 +#codecs/mod_com_g729 +codecs/mod_dahdi_codec +codecs/mod_g723_1 +codecs/mod_g729 +codecs/mod_h26x +#codecs/mod_ilbc +codecs/mod_isac +codecs/mod_mp4v +codecs/mod_opus +#codecs/mod_sangoma_codec +#codecs/mod_silk +#codecs/mod_siren +codecs/mod_theora +dialplans/mod_dialplan_asterisk +dialplans/mod_dialplan_directory +dialplans/mod_dialplan_xml +directories/mod_ldap +endpoints/mod_alsa +endpoints/mod_dingaling +#endpoints/mod_gsmopen +#endpoints/mod_h323 +#endpoints/mod_khomp +endpoints/mod_loopback +#endpoints/mod_opal +endpoints/mod_portaudio +endpoints/mod_rtc +endpoints/mod_rtmp +endpoints/mod_skinny +#endpoints/mod_skypopen +endpoints/mod_sofia +endpoints/mod_verto +#event_handlers/mod_amqp +event_handlers/mod_cdr_csv +event_handlers/mod_cdr_mongodb +event_handlers/mod_cdr_pg_csv +event_handlers/mod_cdr_sqlite +#event_handlers/mod_erlang_event +event_handlers/mod_event_multicast +event_handlers/mod_event_socket +event_handlers/mod_format_cdr +event_handlers/mod_json_cdr +event_handlers/mod_radius_cdr +event_handlers/mod_odbc_cdr +#event_handlers/mod_kazoo +event_handlers/mod_rayo +#event_handlers/mod_smpp +#event_handlers/mod_snmp +event_handlers/mod_event_zmq +formats/mod_imagick +formats/mod_local_stream +formats/mod_native_file +formats/mod_png +formats/mod_portaudio_stream +formats/mod_shell_stream +formats/mod_shout +formats/mod_sndfile +formats/mod_ssml +formats/mod_tone_stream +formats/mod_vlc +languages/mod_basic +#languages/mod_java +languages/mod_lua +#languages/mod_managed +languages/mod_perl +languages/mod_python +#languages/mod_v8 +#languages/mod_yaml +loggers/mod_console +loggers/mod_graylog2 +loggers/mod_logfile +loggers/mod_syslog +say/mod_say_de +say/mod_say_en +say/mod_say_es +say/mod_say_es_ar +say/mod_say_fa +say/mod_say_fr +say/mod_say_he +say/mod_say_hr +say/mod_say_hu +say/mod_say_it +say/mod_say_ja +say/mod_say_nl +say/mod_say_pl +say/mod_say_pt +say/mod_say_ru +say/mod_say_sv +say/mod_say_th +say/mod_say_zh +timers/mod_posix_timer +timers/mod_timerfd +xml_int/mod_xml_cdr +xml_int/mod_xml_curl +xml_int/mod_xml_ldap +xml_int/mod_xml_radius +xml_int/mod_xml_rpc +xml_int/mod_xml_scgi + +#../../libs/freetdm/mod_freetdm + +## Experimental Modules (don't cry if they're broken) +#../../contrib/mod/xml_int/mod_xml_odbc |