-
-
Save moos3/2bed4f7e615a7b5d6402 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#### This is only for RHEL 6.x Based Distros | |
# FS Branch to build | |
FS_BUILD_BRANCH='v1.2.stable' | |
# Configure options for FreeSwitch | |
CONFIGURE_OPTIONS='--enable-core-pgsql-support' | |
### git_url <target dir> | |
fs_config_repo='git@git.sendecho.com:freeswitch-conf.git conf' | |
fs_scripts_repo='git@git.sendecho.com:freeswitch-scripts.git scripts' | |
echo "Writing out Patches" | |
cat >> /tmp/configure.patch << '_EOF' | |
--- /usr/local/src/freeswitch/configure 2013-11-14 16:56:23.000000000 -0500 | |
+++ configure 2013-11-14 16:53:30.000000000 -0500 | |
@@ -19901,7 +19901,7 @@ | |
$as_echo_n "(cached) " >&6 | |
else | |
ac_check_lib_save_LIBS=$LIBS | |
-LIBS="-lpq $LIBS" | |
+LIBS="-L/usr/pgsql-9.2/lib -lpq $LIBS" | |
cat >conftest.$ac_ext <<_ACEOF | |
/* confdefs.h. */ | |
_ACEOF | |
@@ -19965,7 +19965,7 @@ | |
#define HAVE_LIBPQ 1 | |
_ACEOF | |
- LIBS="-lpq $LIBS" | |
+ LIBS="-L/usr/pgsql-9.2/lib -lpq $LIBS" | |
else | |
{ { $as_echo "$as_me:$LINENO: error: no usable libpq; please install PostgreSQL devel package or equivalent" >&5 | |
_EOF | |
cat >> /tmp/modules.conf << '_EOF' | |
#applications/mod_abstraction | |
#applications/mod_avmd | |
#applications/mod_blacklist | |
applications/mod_callcenter | |
applications/mod_cidlookup | |
applications/mod_cluechoo | |
applications/mod_commands | |
applications/mod_conference | |
applications/mod_curl | |
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_httapi | |
applications/mod_http_cache | |
#applications/mod_ladspa | |
applications/mod_lcr | |
#applications/mod_memcache | |
#applications/mod_mongo | |
#applications/mod_mp4 | |
#applications/mod_nibblebill | |
#applications/mod_oreka | |
#applications/mod_osp | |
#applications/mod_rad_auth | |
#applications/mod_redis | |
#applications/mod_rss | |
#applications/mod_sonar | |
applications/mod_sms | |
#applications/mod_snapshot | |
applications/mod_snipe_hunt | |
#applications/mod_snom | |
#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 | |
#applications/mod_random | |
#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_bv | |
codecs/mod_b64 | |
#codecs/mod_celt | |
#codecs/mod_codec2 | |
#codecs/mod_com_g729 | |
#codecs/mod_dahdi_codec | |
codecs/mod_g723_1 | |
codecs/mod_g729 | |
codecs/mod_h26x | |
codecs/mod_vp8 | |
#codecs/mod_ilbc | |
#codecs/mod_isac | |
#codecs/mod_mp4v | |
#codecs/mod_opus | |
#codecs/mod_sangoma_codec | |
codecs/mod_silk | |
codecs/mod_siren | |
codecs/mod_speex | |
#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_html5 | |
#endpoints/mod_khomp | |
endpoints/mod_loopback | |
#endpoints/mod_opal | |
#endpoints/mod_portaudio | |
endpoints/mod_rtmp | |
endpoints/mod_skinny | |
#endpoints/mod_skypopen | |
endpoints/mod_sofia | |
#endpoints/mod_unicall | |
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_event_zmq | |
event_handlers/mod_json_cdr | |
#event_handlers/mod_radius_cdr | |
event_handlers/mod_rayo | |
#event_handlers/mod_snmp | |
formats/mod_local_stream | |
formats/mod_native_file | |
#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_java | |
languages/mod_lua | |
#languages/mod_managed | |
#languages/mod_perl | |
languages/mod_python | |
#languages/mod_spidermonkey | |
#languages/mod_yaml | |
loggers/mod_console | |
loggers/mod_logfile | |
loggers/mod_syslog | |
#say/mod_say_de | |
say/mod_say_en | |
#say/mod_say_es | |
#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_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 | |
#../../libs/openzap/mod_openzap | |
## Experimental Modules (don't cry if they're broken) | |
#../../contrib/mod/xml_int/mod_xml_odbc | |
_EOF | |
echo "Bootstraping box for Freeswitch" | |
echo "Installing EPEL 6" | |
if [[ ! -f "/etc/yum.repos.d/epel.repo" ]];then | |
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
fi | |
echo "Installing REMI Repo" | |
if [[ ! -f "/etc/yum.repos.d/remi.repo" ]];then | |
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm | |
fi | |
echo "Installing Postgresql 9.2 repo" | |
if [[ ! -f "/etc/yum.repos.d/pgdg-92-redhat.repo" ]];then | |
rpm -ivh http://yum.postgresql.org/9.2/redhat/rhel-6-x86_64/pgdg-redhat92-9.2-7.noarch.rpm | |
fi | |
yum clean all | |
echo "Installing PostgreSQL" | |
yum groupinstall -y "PostgreSQL Database Server 9.2 PGDG" | |
yum groupinstall -y "Development Tools" | |
yum install -y git autoconf automake libtool ncurses-devel libjpeg-devel expat-devel openssl-devel libtiff-devel libX11-devel unixODBC-devel libssl-devel python-devel zlib-devel libzrtpcpp-devel alsa-lib-devel libogg-devel libvorbis-devel perl-libs gdbm-devel libdbi-devel uuid-devel @development-tools libpqxx-devel gnutls gnutls-devel libuuid-devel libpqxx sqlite-devel libdbi-dbd-sqlite readline-devel | |
echo "Fetching Freeswitch Source" | |
cd /usr/local/src | |
git clone git://git.freeswitch.org/freeswitch.git | |
cd freeswitch | |
git checkout ${FS_BUILD_BRANCH} | |
echo "Bootstraping freeswitch" | |
./bootstrap.sh | |
patch -p1 configure < /tmp/configure.patch | |
./configure ${CONFIGURE_OPTIONS} | |
rm -rf /usr/local/src/freeswitch/modules.conf | |
cp /tmp/modules.conf /usr/local/src/freeswitch/ | |
make | |
make all install cd-sounds-install cd-moh-install | |
if [[ -d /usr/local/freeswitch ]];then | |
echo "Bringing in FreeSwitch Config" | |
cd /usr/local/freeswitch | |
mv conf conf.orig | |
git clone ${fs_conf_repo} | |
mv scripts scripts.orig | |
git clone ${fs_scripts_repo} | |
else | |
echo "Build Failed!!!!" | |
fi | |
echo "Bootstrapper is complete" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment