add 'make sounds' and 'make sounds-install' makefile targets to download and install soundfiles (FSBUILD-28)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6611 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
4fb9901b25
commit
3d5fcabea7
15
Makefile.am
15
Makefile.am
|
@ -10,10 +10,21 @@ AM_LDFLAGS = $(SWITCH_AM_LDFLAGS)
|
||||||
BASE = $(switch_srcdir)
|
BASE = $(switch_srcdir)
|
||||||
OSARCH=`uname -s`
|
OSARCH=`uname -s`
|
||||||
|
|
||||||
|
DEFAULT_SOUNDS=en-us-callie-8000
|
||||||
|
|
||||||
.DEFAULT:
|
.DEFAULT:
|
||||||
@target=`echo $@ | sed -e 's|^.*-||'`; \
|
@target=`echo $@ | sed -e 's|^.*-||'`; \
|
||||||
if test "$$target" = "install"; then $(MAKE) $(AM_MAKEFLAGS) core_install; else $(MAKE) $(AM_MAKEFLAGS) core ; fi;
|
target_prefix=`echo $@ | sed -e 's|-.*$$||'`; \
|
||||||
@cd src/mod && $(MAKE) $(AM_MAKEFLAGS) $@
|
sound_perfix=`echo $@ | sed -e 's|-.*||'`; \
|
||||||
|
full_sound_dir=`echo $@ | sed -e 's|^sounds-||' | sed -e 's|-install$$||'`; \
|
||||||
|
test -z "$$full_sound_dir" || full_sound_dir=`echo $(DEFAULT_SOUNDS)`; \
|
||||||
|
soundfile=`echo freeswitch-sounds-$$full_sound_dir-$(PACKAGE_VERSION).tar.gz`; \
|
||||||
|
if test "$$target" = "install"; then $(MAKE) $(AM_MAKEFLAGS) core_install; else $(MAKE) $(AM_MAKEFLAGS) core ; fi; \
|
||||||
|
if test "$$target_prefix" = "sounds"; then \
|
||||||
|
if test "$$target" = "install"; then $(GETSOUNDS) $$soundfile $(PREFIX)/sounds/; else $(GETSOUNDS) $$soundfile ; fi; \
|
||||||
|
else \
|
||||||
|
cd src/mod && $(MAKE) $(AM_MAKEFLAGS) $@ ;\
|
||||||
|
fi
|
||||||
|
|
||||||
libfreeswitch_la_SOURCES = \
|
libfreeswitch_la_SOURCES = \
|
||||||
src/switch_apr.c \
|
src/switch_apr.c \
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
TAR=@TAR@
|
||||||
|
ZCAT=@ZCAT@
|
||||||
|
WGET=@WGET@
|
||||||
|
CURL=@CURL@
|
||||||
|
|
||||||
|
DIR=`pwd`
|
||||||
|
|
||||||
|
if [ -f $WGET ] ; then
|
||||||
|
DOWNLOAD_CMD=$WGET
|
||||||
|
else
|
||||||
|
if [ -f $CURL ] ; then
|
||||||
|
DOWNLOAD_CMD="$CURL -O"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
base=http://files.freeswitch.org/
|
||||||
|
tarfile=$1
|
||||||
|
install=$2
|
||||||
|
|
||||||
|
if [ ! -f $tarfile ] ; then
|
||||||
|
$DOWNLOAD_CMD $base$tarfile
|
||||||
|
if [ ! -f $tarfile ] ; then
|
||||||
|
echo cannot find $tarfile
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z $install ] ; then
|
||||||
|
test -d $install || mkdir $install
|
||||||
|
cd $install && $ZCAT -c -d $DIR/$tarfile | $TAR x
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
|
@ -382,6 +382,8 @@ AC_PATH_PROGS(WGET, wget)
|
||||||
AC_PATH_PROGS(CURL, curl)
|
AC_PATH_PROGS(CURL, curl)
|
||||||
GETLIB="cd $switch_srcdir/libs && ${SHELL} $switch_srcdir/build/getlib.sh"
|
GETLIB="cd $switch_srcdir/libs && ${SHELL} $switch_srcdir/build/getlib.sh"
|
||||||
AC_SUBST(GETLIB)
|
AC_SUBST(GETLIB)
|
||||||
|
GETSOUNDS="${SHELL} $switch_srcdir/build/getsounds.sh"
|
||||||
|
AC_SUBST(GETSOUNDS)
|
||||||
|
|
||||||
|
|
||||||
LIBCURL_CHECK_CONFIG([yes], [7.13.0], [LIBCURL_DEPS=''], [LIBCURL_DEPS='${switch_srcdir}/libs/curl/lib/libcurl.la';LIBCURL='${switch_srcdir}/libs/curl/lib/libcurl.la';LIBCURL_CPPFLAGS='-I${switch_srcdir}/libs/curl/include'])
|
LIBCURL_CHECK_CONFIG([yes], [7.13.0], [LIBCURL_DEPS=''], [LIBCURL_DEPS='${switch_srcdir}/libs/curl/lib/libcurl.la';LIBCURL='${switch_srcdir}/libs/curl/lib/libcurl.la';LIBCURL_CPPFLAGS='-I${switch_srcdir}/libs/curl/include'])
|
||||||
|
@ -414,6 +416,7 @@ AC_CONFIG_FILES([Makefile
|
||||||
src/mod/event_handlers/mod_radius_cdr/Makefile
|
src/mod/event_handlers/mod_radius_cdr/Makefile
|
||||||
src/mod/languages/mod_java/Makefile
|
src/mod/languages/mod_java/Makefile
|
||||||
src/include/switch_am_config.h
|
src/include/switch_am_config.h
|
||||||
|
build/getsounds.sh
|
||||||
build/getlib.sh
|
build/getlib.sh
|
||||||
build/modmake.rules])
|
build/modmake.rules])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue