summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Mizrahi <alan+crux@mizrahi.com.ve>2013-04-19 10:53:11 +0900
committerAlan Mizrahi <alan+crux@mizrahi.com.ve>2013-04-19 10:53:11 +0900
commitbdb8008f2753147cb208ebfbbb0b3089b5fc1e2e (patch)
treeb1ae82fc59c3ad5f77d838c5c145e7a27f3c6673
parent3b71696a38dea9dfa45e7c084e8fadfebf993396 (diff)
downloadcontrib-bdb8008f2753147cb208ebfbbb0b3089b5fc1e2e.tar.gz
contrib-bdb8008f2753147cb208ebfbbb0b3089b5fc1e2e.tar.xz
asterisk-espeak: Initial commit
-rw-r--r--asterisk-espeak/.footprint8
-rw-r--r--asterisk-espeak/.md5sum2
-rw-r--r--asterisk-espeak/Pkgfile20
-rw-r--r--asterisk-espeak/build.patch71
4 files changed, 101 insertions, 0 deletions
diff --git a/asterisk-espeak/.footprint b/asterisk-espeak/.footprint
new file mode 100644
index 000000000..57be8fd2a
--- /dev/null
+++ b/asterisk-espeak/.footprint
@@ -0,0 +1,8 @@
+drwxr-xr-x root/root etc/
+drwxr-x--- root/asterisk etc/asterisk/
+-rw-r----- root/asterisk etc/asterisk/espeak.conf
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/lib/
+drwxr-xr-x root/root usr/lib/asterisk/
+drwxr-xr-x root/root usr/lib/asterisk/modules/
+-rwxr-xr-x root/root usr/lib/asterisk/modules/app_espeak.so
diff --git a/asterisk-espeak/.md5sum b/asterisk-espeak/.md5sum
new file mode 100644
index 000000000..13165a1be
--- /dev/null
+++ b/asterisk-espeak/.md5sum
@@ -0,0 +1,2 @@
+88c57ed8f903980984af9e3a7f15631d asterisk-espeak-0.4.tar.gz
+8362ed89281a7880dd63a7068678b48c build.patch
diff --git a/asterisk-espeak/Pkgfile b/asterisk-espeak/Pkgfile
new file mode 100644
index 000000000..880bf189d
--- /dev/null
+++ b/asterisk-espeak/Pkgfile
@@ -0,0 +1,20 @@
+# Description: Asterisk text to speech module
+# URL: http://asterisk-espeak.sf.net/
+# Maintainer: Alan Mizrahi, alan at mizrahi dot com dot ve
+# Depends on: asterisk espeak libsndfile libsamplerate
+
+name=asterisk-espeak
+version=0.4
+release=1
+source=(http://prdownloads.sf.net/$name/$name-$version.tar.gz build.patch)
+
+build() {
+ cd $name-$version
+ patch -p1 -i $SRC/build.patch
+ export CFLAGS="$CFLAGS -DASTERISK_VERSION=8"
+ make
+ mkdir -p $PKG/usr/lib/asterisk/modules $PKG/etc/asterisk
+ make DESTDIR=$PKG install
+ chown -R root:asterisk $PKG/etc/asterisk
+ chmod -R u+rwX,g-w,o= $PKG/etc/asterisk
+}
diff --git a/asterisk-espeak/build.patch b/asterisk-espeak/build.patch
new file mode 100644
index 000000000..3a36e9469
--- /dev/null
+++ b/asterisk-espeak/build.patch
@@ -0,0 +1,71 @@
+diff -u -r asterisk-espeak-0.4.orig/app_espeak.c asterisk-espeak-0.4/app_espeak.c
+--- asterisk-espeak-0.4.orig/app_espeak.c 2011-07-19 16:37:51.109554567 +0900
++++ asterisk-espeak-0.4/app_espeak.c 2011-07-19 17:10:38.136024568 +0900
+@@ -46,12 +46,16 @@
+ #endif
+
+ #include <stdio.h>
+-#include <asterisk/lock.h>
++
++#include <asterisk.h>
+ #include <asterisk/file.h>
+ #include <asterisk/logger.h>
+ #include <asterisk/channel.h>
+ #include <asterisk/pbx.h>
+ #include <asterisk/module.h>
++#include <asterisk/lock.h>
++#include <asterisk/app.h>
++#include <asterisk/config.h>
+ #include <asterisk/translate.h>
+ #include <asterisk/utils.h>
+ #include <asterisk/md5.h>
+@@ -160,11 +164,16 @@
+ #endif
+
+ /* Config file stuff */
++#if ASTERISK_VERSION == 8
++ struct ast_flags config_flags = { 0 };
++ cfg = ast_config_load(ESPEAK_CONFIG, config_flags);
++#else
+ #if ASTERISK_VERSION >= 2
+ cfg = ast_config_load(ESPEAK_CONFIG);
+ #else
+ cfg = ast_load(ESPEAK_CONFIG);
+ #endif
++#endif
+
+ if (!cfg)
+ {
+@@ -521,7 +530,23 @@
+ return res;
+ }
+
+-#if ASTERISK_VERSION == 4
++#if ASTERISK_VERSION == 8
++int unload_module(void)
++{
++ int res;
++ res = ast_unregister_application(app);
++ ast_module_user_hangup_all();
++ return res;
++}
++
++static int load_module(void)
++{
++ return ast_register_application(app, espeak_exec, synopsis, descrip);
++}
++
++AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "eSpeak TTS Interface");
++
++#elif ASTERISK_VERSION == 4
+ static int unload_module(void)
+ {
+ int res;
+@@ -550,7 +575,6 @@
+ return ast_register_application(app, espeak_exec, synopsis, descrip);
+ }
+
+-
+ char *description(void)
+ {
+ return tdesc;

Generated by cgit