From e3dedc4f33044debd81cec16741814c565bfb468 Mon Sep 17 00:00:00 2001 From: Massimo Cetra Date: Tue, 8 Jul 2008 09:49:53 +0000 Subject: [PATCH] Debian build scripts updates. * Updated revision number * Fixed init problem reported by Jay Binks (FSSCRIPTS-1) * Added a patch to the debian build system add more features (thanks to Hadley Rich) (FSBUILD-45) - Added en-us-callie sounds and music on hold packages - Added recommends and suggests - Added mod_say_es and mod_say_nl - Updated descriptions - Added mod_cdr_csv * Fixed typos and some errors in the previus patch. * Modified monit script. Now it should work. * The debian build system now bootstrap automagically if it's necessary and all scripts are in place. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8926 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- debian/changelog | 16 ++++++ debian/control | 49 ++++++++++++++++--- debian/default/freeswitch | 7 --- debian/freeswitch-lang-es.install | 1 + debian/freeswitch-lang-nl.install | 1 + ...eeswitch-sounds-en-us-callie-16000.install | 2 + ...eeswitch-sounds-en-us-callie-32000.install | 2 + ...reeswitch-sounds-en-us-callie-8000.install | 2 + debian/freeswitch-sounds-music-8000.install | 2 + debian/freeswitch.default | 11 +++++ debian/freeswitch.init | 22 +++------ debian/freeswitch.install | 1 + debian/monit/freeswitch.monitrc | 9 ++-- debian/rules | 24 +++++---- 14 files changed, 108 insertions(+), 41 deletions(-) delete mode 100644 debian/default/freeswitch create mode 100644 debian/freeswitch-lang-es.install create mode 100644 debian/freeswitch-lang-nl.install create mode 100644 debian/freeswitch-sounds-en-us-callie-16000.install create mode 100644 debian/freeswitch-sounds-en-us-callie-32000.install create mode 100644 debian/freeswitch-sounds-en-us-callie-8000.install create mode 100644 debian/freeswitch-sounds-music-8000.install create mode 100644 debian/freeswitch.default diff --git a/debian/changelog b/debian/changelog index 9e5fab1427..10f1797523 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,19 @@ +freeswitch (1.0.1~trunk) unstable; urgency=low + + * Updated revision number + * Fixed init problem reported by Jay Binks (FSSCRIPTS-1) + * Added a patch to the debian build system add more features (thanks to Hadley Rich) (FSBUILD-45) + - Added en-us-callie sounds and music on hold packages + - Added recommends and suggests + - Added mod_say_es and mod_say_nl + - Updated descriptions + - Added mod_cdr_csv + * Fixed typos and some errors in the previus patch. + * Modified monit script. Now it should work. + * The debian build system now bootstrap automagically if it's necessary and all scripts are in place. + + -- Massimo Cetra Sun, 6 Jul 2008 16:30:00 +0100 + freeswitch (1.0.0-1) unstable; urgency=low * Enhanced sofia sip nat handling diff --git a/debian/control b/debian/control index 0b0edc7c20..3c1613f65a 100644 --- a/debian/control +++ b/debian/control @@ -2,14 +2,15 @@ Source: freeswitch Maintainer: Michal Bielicki Section: net Priority: extra -Build-Depends: debhelper (>= 5), automake1.9, autoconf, libtool, unixodbc-dev, libasound2-dev, libcurl3-dev|libcurl4-openssl-dev, libssl-dev, ncurses-dev, libogg-dev, libvorbis-dev, libperl-dev, libgdbm-dev, libdb4.4-dev, libgnutls-dev -Standards-Version: 3.7.2 +Build-Depends: debhelper (>= 5), fakeroot, automake1.9, autoconf, libtool, unixodbc-dev, libasound2-dev, libcurl3-dev|libcurl4-openssl-dev, libssl-dev, ncurses-dev, libogg-dev, libvorbis-dev, libperl-dev, libgdbm-dev, libdb-dev, libgnutls-dev +Standards-Version: 3.7.3 Package: freeswitch Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, unixodbc, libasound2, libcurl3, openssl, libncurses5 -Suggests: monit -Description: A telephony platform that really kicks some ass... +Recommends: freeswitch-lang-en +Suggests: freeswitch-spidermonkey, freeswitch-lua, freeswitch-perl, freeswitch-sounds-music-8000, monit +Description: The FreeSWITCH open source telephony platform FreeSWITCH is an open source telephony platform designed to facilitate the creation of voice and chat driven products scaling from a soft-phone up to a soft-switch. It can be used as a simple switching engine, a media gateway @@ -19,22 +20,22 @@ Description: A telephony platform that really kicks some ass... Package: freeswitch-dev Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, freeswitch -Description: Development Package for the FreeSwitch open source telephony platform +Description: Development Package for the FreeSWITCH open source telephony platform Package: freeswitch-spidermonkey Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, freeswitch -Description: A Javascript engine for freeswitch +Description: A Javascript engine for FreeSWITCH Package: freeswitch-perl Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, freeswitch -Description: A perl engine for freeswitch +Description: A perl engine for FreeSWITCH Package: freeswitch-lua Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, freeswitch -Description: A lua engine for freeswitch +Description: A lua engine for FreeSWITCH Package: freeswitch-codec-passthru-g7231 Architecture: any @@ -54,8 +55,30 @@ Description: Pass through g729 Codec support for the FreeSWITCH open source tele Package: freeswitch-lang-en Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, freeswitch +Recommends: freeswitch-sounds-en-us-callie-8000 +Suggests: freeswitch-sounds-en-us-callie-16000, freeswitch-sounds-en-us-callie-32000 Description: English language files for the FreeSWITCH open source telephony platform +Package: freeswitch-sounds-en-us-callie-8000 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, freeswitch +Description: English language files for the FreeSWITCH open source telephony platform + +Package: freeswitch-sounds-en-us-callie-16000 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, freeswitch +Description: English language files for the FreeSWITCH open source telephony platform (16000) + +Package: freeswitch-sounds-en-us-callie-32000 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, freeswitch +Description: English language files for the FreeSWITCH open source telephony platform (32000) + +Package: freeswitch-sounds-music-8000 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, freeswitch +Description: Music on hold files for the FreeSWITCH open source telephony platform + Package: freeswitch-lang-de Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, freeswitch @@ -70,3 +93,13 @@ Package: freeswitch-lang-it Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, freeswitch Description: Italian language files for the FreeSWITCH open source telephony platform + +Package: freeswitch-lang-es +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, freeswitch +Description: Spanish language files for the FreeSWITCH open source telephony platform + +Package: freeswitch-lang-nl +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, freeswitch +Description: Dutch language files for the FreeSWITCH open source telephony platform diff --git a/debian/default/freeswitch b/debian/default/freeswitch deleted file mode 100644 index 4d64ab5712..0000000000 --- a/debian/default/freeswitch +++ /dev/null @@ -1,7 +0,0 @@ -# Startup settings fffor freeswitch -# In this package install if monit is instaled it will automatically control -# start and stop of freeswitch - -# Enable initd (let init handle start and stop of freeswitch) - -USE_INIT="false" diff --git a/debian/freeswitch-lang-es.install b/debian/freeswitch-lang-es.install new file mode 100644 index 0000000000..fc91c7985e --- /dev/null +++ b/debian/freeswitch-lang-es.install @@ -0,0 +1 @@ +opt/freeswitch/mod/mod_say_es.so* diff --git a/debian/freeswitch-lang-nl.install b/debian/freeswitch-lang-nl.install new file mode 100644 index 0000000000..061a87e465 --- /dev/null +++ b/debian/freeswitch-lang-nl.install @@ -0,0 +1 @@ +opt/freeswitch/mod/mod_say_nl.so* diff --git a/debian/freeswitch-sounds-en-us-callie-16000.install b/debian/freeswitch-sounds-en-us-callie-16000.install new file mode 100644 index 0000000000..47c795c0f0 --- /dev/null +++ b/debian/freeswitch-sounds-en-us-callie-16000.install @@ -0,0 +1,2 @@ +opt/freeswitch/sounds/en/us/callie/*/16000/* + diff --git a/debian/freeswitch-sounds-en-us-callie-32000.install b/debian/freeswitch-sounds-en-us-callie-32000.install new file mode 100644 index 0000000000..05538a76c2 --- /dev/null +++ b/debian/freeswitch-sounds-en-us-callie-32000.install @@ -0,0 +1,2 @@ +opt/freeswitch/sounds/en/us/callie/*/32000/* + diff --git a/debian/freeswitch-sounds-en-us-callie-8000.install b/debian/freeswitch-sounds-en-us-callie-8000.install new file mode 100644 index 0000000000..90e6afa388 --- /dev/null +++ b/debian/freeswitch-sounds-en-us-callie-8000.install @@ -0,0 +1,2 @@ +opt/freeswitch/sounds/en/us/callie/*/8000/* + diff --git a/debian/freeswitch-sounds-music-8000.install b/debian/freeswitch-sounds-music-8000.install new file mode 100644 index 0000000000..4f116068a9 --- /dev/null +++ b/debian/freeswitch-sounds-music-8000.install @@ -0,0 +1,2 @@ +opt/freeswitch/sounds/music/8000/* + diff --git a/debian/freeswitch.default b/debian/freeswitch.default new file mode 100644 index 0000000000..df94d7f0df --- /dev/null +++ b/debian/freeswitch.default @@ -0,0 +1,11 @@ +# Startup settings for FreeSWITCH + +# Enable initd (let init handle start and stop of freeswitch). +# Set to "true" (lowercase) to enable. + +FREESWITCH_ENABLED="false" + +# The parameters Freeswitch should be started with + +FREESWITCH_PARAMS="-nc" + diff --git a/debian/freeswitch.init b/debian/freeswitch.init index b28f96b20b..556e4800cb 100755 --- a/debian/freeswitch.init +++ b/debian/freeswitch.init @@ -19,26 +19,20 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin:/opt/freeswitch/bin DESC="FreeSwitch Voice Switching System" NAME=freeswitch DAEMON=/opt/freeswitch/bin/$NAME -DAEMON_ARGS="-nc" USER=freeswitch PIDFILE=/opt/freeswitch/log/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME # Check if we are being executed by init -. /etc/default/$NAME CALLEDSCRIPT=`basename $0` -echo $CALLEDSCRIPT -case "$CALLEDSCRIPT" in - freeswitch) - ;; - *) - if [ "$USE_INIT" != "TRUE" ]; then - echo "FreeSwitch disabled" ; - exit 0 ; - fi - ;; -esac + +if [ -r /etc/default/$NAME ]; then . /etc/default/$NAME; fi + +if [ "$FREESWITCH_ENABLED" != "true" ]; then + echo "$DESC not enabled yet. Edit /etc/default/$NAME first." + exit 0 ; +fi # Exit if the package is not installed # [ -x "$DAEMON" ] || exit 0 @@ -65,7 +59,7 @@ do_start() start-stop-daemon -c $USER --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ || return 1 start-stop-daemon -c $USER --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ - $DAEMON_ARGS \ + $FREESWITCH_PARAMS \ || return 2 # Add code here, if necessary, that waits for the process to be ready # to handle requests from services started subsequently which depend diff --git a/debian/freeswitch.install b/debian/freeswitch.install index f8282fb43c..ea788b2f72 100644 --- a/debian/freeswitch.install +++ b/debian/freeswitch.install @@ -3,6 +3,7 @@ opt/freeswitch/bin/freeswitch opt/freeswitch/bin/scripts/* opt/freeswitch/lib/libfreeswitch*.so* opt/freeswitch/mod/mod_shout* +opt/freeswitch/mod/mod_cdr_csv.so* opt/freeswitch/mod/mod_console.so* opt/freeswitch/mod/mod_expr.so* opt/freeswitch/mod/mod_rss.so* diff --git a/debian/monit/freeswitch.monitrc b/debian/monit/freeswitch.monitrc index 0fa046ee0b..8b67cf7e3a 100644 --- a/debian/monit/freeswitch.monitrc +++ b/debian/monit/freeswitch.monitrc @@ -2,7 +2,10 @@ group voice start program = "/etc/init.d/freeswitch start" stop program = "/etc/init.d/freeswitch stop" - if failed port 5060 type UDP then restart +# Checks sip port on localhost, not wlways suitable +# if failed port 5060 type UDP then restart +# Checks mod_event_socket on localhost. Maybe more suitable + if failed port 8021 type TCP then restart if 5 restarts within 5 cycles then timeout depends on freeswitch_bin depends on freeswitch_rc @@ -10,9 +13,9 @@ check file freeswitch_bin with path /opt/freeswitch/bin/freeswitch group voice if failed checksum then unmonitor - if failed permission 755 then unmonitor + if failed permission 750 then unmonitor if failed uid freeswitch then unmonitor - if failed gid daemon then unmonitor +# if failed gid daemon then unmonitor check file freeswitch_rc with path /etc/init.d/freeswitch group voice diff --git a/debian/rules b/debian/rules index 301bca9ab0..6c8ed6986b 100755 --- a/debian/rules +++ b/debian/rules @@ -16,13 +16,13 @@ export DIALPLANS_MODULES=dialplans/mod_dialplan_asterisk dialplans/mod_dialplan_ export DIRECTORIES_MODULES= export DOTNET_MODULES= export ENDPOINTS_MODULES=endpoints/mod_dingaling endpoints/mod_iax endpoints/mod_portaudio endpoints/mod_sofia endpoints/mod_woomera ../../libs/openzap/mod_openzap -export EVENT_HANDLERS_MODULES=event_handlers/mod_event_multicast event_handlers/mod_event_socket +export EVENT_HANDLERS_MODULES=event_handlers/mod_event_multicast event_handlers/mod_event_socket event_handlers/mod_cdr_csv export FORMATS_MODULES=formats/mod_local_stream formats/mod_native_file formats/mod_sndfile formats/mod_tone_stream formats/mod_shout export LANGUAGES_MODULES=languages/mod_perl languages/mod_lua export LOGGERS_MODULES=loggers/mod_console loggers/mod_logfile loggers/mod_syslog -export SAY_MODULES=say/mod_say_de say/mod_say_en say/mod_say_fr say/mod_say_it +export SAY_MODULES=say/mod_say_en say/mod_say_it say/mod_say_de say/mod_say_fr say/mod_say_es say/mod_say_nl export TIMERS_MODULES= -export DISABLED_MODULES=applications/mod_soundtouch directories/mod_ldap languages/mod_java languages/mod_python languages/mod_spidermonkey_skel ast_tts/mod_cepstral asr_tts/mod_lumenvox endpoints/mod_wanpipe event_handlers/mod_event_test event_handlers/mod_radius_cdr event_handlers/mod_zeroconf say/mod_say_es say/mod_say_nl +export DISABLED_MODULES=applications/mod_soundtouch directories/mod_ldap languages/mod_java languages/mod_python languages/mod_spidermonkey_skel ast_tts/mod_cepstral asr_tts/mod_lumenvox endpoints/mod_wanpipe event_handlers/mod_event_test event_handlers/mod_radius_cdr event_handlers/mod_zeroconf export XML_INT_MODULES=xml_int/mod_xml_rpc xml_int/mod_xml_curl xml_int/mod_xml_cdr export MYMODULES=$(PASSTHRU_CODEC_MODULES) $(SPIDERMONKEY_MODULES) $(APPLICATIONS_MODULES) $(ASR_TTS_MODULES) $(CODECS_MODULES) $(DIALPLANS_MODULES) $(DIRECTORIES_MODULES) $(DOTNET_MODULES) $(ENDPOINTS_MODULES) $(EVENT_HANDLERS_MODULES) $(FORMATS_MODULES) $(LANGUAGES_MODULES) $(LOGGERS_MODULES) $(SAY_MODULES) $(TIMERS_MODULES) $(XML_INT_MODULES) export MODULES=$(MYMODULES) @@ -49,14 +49,21 @@ endif config.status: configure dh_testdir - rm modules.conf + rm -f modules.conf touch modules.conf echo $(MODULES) for i in $(MODULES); do echo $$i >> modules.conf; done ./configure --prefix=/opt/freeswitch --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) ${FEATURES} -configure: bootstrap.sh - AUTOCONF=${AUTOCONF} ./bootstrap.sh +configure: + if test ! -f Makefile.in ; then \ + if test -f ./bootstrap.sh ; then \ + AUTOCONF=${AUTOCONF} ./bootstrap.sh ; \ + else \ + echo "No Makefile.in and no known way to bootstrap." ; \ + exit 1; \ + fi; \ + fi; build: build-stamp build-stamp: config.status @@ -89,7 +96,7 @@ install: build dh_clean -k dh_installdirs -A --sourcedir=debian/tmp - $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install + $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install uhd-sounds-install moh-install # Build architecture-independent files here. @@ -116,8 +123,7 @@ binary-arch: build install # dh_installinfo # dh_undocumented # dh_installman - cp debian/monit/freeswitch.monitrc debian/freeswitch/etc/monit/freswitch.monitrc - cp debian/default/freeswitch debian/freeswitch/etc/default + cp debian/monit/freeswitch.monitrc debian/freeswitch/etc/monit/freeswitch.monitrc dh_install --sourcedir=debian/tmp dh_strip dh_compress