From 79a570936260bdb23644b0b140e2537fed0fcfe6 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Sun, 10 Feb 2013 08:11:59 +0000 Subject: [PATCH] Add debian support for installing languages Languages are installed at /usr/share/freeswitch/lang so that they can be referred to by the user's configuration in /etc/freeswitch. As a Debian package user isn't going to have access to `make vm-sync` these files need to be readily available somewhere. --- debian/.gitignore | 1 + debian/bootstrap.sh | 76 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) diff --git a/debian/.gitignore b/debian/.gitignore index a5ce34d6b9..81fc750bf9 100644 --- a/debian/.gitignore +++ b/debian/.gitignore @@ -8,6 +8,7 @@ /freeswitch-autotools.install /freeswitch-mod-*.install /freeswitch-conf-*.install +/freeswitch-lang-*.install /freeswitch-music-*.install /freeswitch-sounds-*.install /*.lintian-overrides diff --git a/debian/bootstrap.sh b/debian/bootstrap.sh index db339aa09d..b54611581f 100755 --- a/debian/bootstrap.sh +++ b/debian/bootstrap.sh @@ -4,6 +4,7 @@ mod_dir="../src/mod" conf_dir="../conf" +lang_dir="../conf/vanilla/lang" fs_description="FreeSWITCH is a scalable open source cross-platform telephony platform designed to route and interconnect popular communication protocols using audio, video, text or any other form of media." mod_build_depends="." supported_distros="squeeze wheezy sid" @@ -158,6 +159,16 @@ map_confs () { done } +map_langs () { + local fs="$1" + for x in $lang_dir/*; do + test ! -d $x && continue + lang=${x##*/} lang_dir=$x + for f in $fs; do $f; done + unset lang lang_dir + done +} + print_source_control () { cat <> $f } +genlang () { + print_lang_control >> control + local p=freeswitch-lang-${lang//_/-} + local f=$p.install + (print_edit_warning; print_lang_install) > $f + test -f $f.tmpl && cat $f.tmpl >> $f + local f=$p.lintian-overrides + (print_edit_warning; print_lang_overrides "$p") > $f + test -f $f.tmpl && cat $f.tmpl >> $f +} + accumulate_build_depends () { local x="" if [ -n "$(eval echo \$build_depends_$codename)" ]; then @@ -979,6 +1052,9 @@ echo "Generating debian/..." >&2 echo "Generating debian/ (conf)..." >&2 (echo "### conf"; echo) >> control map_confs 'genconf' +echo "Generating debian/ (lang)..." >&2 +(echo "### lang"; echo) >> control +map_langs 'genlang' echo "Generating debian/ (modules)..." >&2 (echo "### modules"; echo) >> control print_edit_warning > modules_.conf