OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 20-Mar-2008 19:32:49
Branch: HEAD Handle: 2008032018324701
Added files:
openpkg-src/asterisk-flite
asterisk-flite.patch asterisk-flite.spec
flite.conf
Log:
new package: asterisk-flite 0.5 (Asterisk Extension: Flite
Text-To-Speech (TTS) Engine)
Summary:
Revision Changes Path
1.1 +104 -0 openpkg-src/asterisk-flite/asterisk-flite.patch
1.1 +91 -0 openpkg-src/asterisk-flite/asterisk-flite.spec
1.1 +8 -0 openpkg-src/asterisk-flite/flite.conf
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/asterisk-flite/asterisk-flite.patch
============================================================================
$ cvs diff -u -r0 -r1.1 asterisk-flite.patch
--- /dev/null 2008-03-20 19:32:15 +0100
+++ asterisk-flite.patch 2008-03-20 19:32:48 +0100
@@ -0,0 +1,104 @@
+Index: Makefile
+--- Makefile.orig 2007-01-11 20:07:14 +0100
++++ Makefile 2008-03-20 19:20:17 +0100
+@@ -39,7 +39,7 @@
+ OPTIMIZE=-O6
+
+ #Include debug symbols in the executables (-g)
+-DEBUG=-g
++DEBUG=
+
+ CFLAGS+=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE
+ CFLAGS+=$(OPTIMIZE)
+@@ -68,7 +68,7 @@
+ $(CC) -pipe $(INCLUDE) $(CFLAGS) -c -o app_flite.o app_flite.c
+
+ app_flite.so: app_flite.o
+- $(CC) -shared -Xlinker -x -o $@ $< $(LIBS)
++ $(CC) $(LDFLAGS) -shared -Xlinker -x -o $@ $< $(LIBS)
+
+ install: all
+ @if [ -d $(ASTERISKMODDIR) ]; then \
+Index: app_flite.c
+--- app_flite.c.orig 2007-01-11 20:07:14 +0100
++++ app_flite.c 2008-03-20 19:19:18 +0100
+@@ -38,10 +38,13 @@
+ 0 == Asterisk 1.0.x
+ 2 == Asterisk 1.2.x
+ 4 == Asterisk 1.4.x
++ 6 == Asterisk 1.6.x
+ */
+- #define ASTERISK_VERSION 4
++ #define ASTERISK_VERSION 6
+ #endif
+
++#include <asterisk.h>
++
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
+@@ -76,7 +79,7 @@
+ "the user, allowing any given interrupt keys to immediately terminate\n"
+ "and return.\n";
+
+-#if ASTERISK_VERSION != 4
++#if ASTERISK_VERSION < 4
+ STANDARD_LOCAL_USER;
+
+ LOCAL_USER_DECL;
+@@ -108,6 +111,9 @@
+ char filename[27];
+ char wavFilename[27];
+ cst_voice *v;
++#if ASTERISK_VERSION >= 6
++ struct ast_flags config_flags = { 0 };
++#endif
+
+ if (ast_strlen_zero(data))
+ {
+@@ -115,14 +121,16 @@
+ return -1;
+ }
+
+-#if ASTERISK_VERSION == 4
++#if ASTERISK_VERSION >= 4
+ u = ast_module_user_add(chan);
+ #else
+ LOCAL_USER_ADD(u);
+ #endif
+
+ /* Config file stuff */
+-#if ASTERISK_VERSION >= 2
++#if ASTERISK_VERSION >= 6
++ cfg = ast_config_load(FLITE_CONFIG, config_flags);
++#elif ASTERISK_VERSION >= 2
+ cfg = ast_config_load(FLITE_CONFIG);
+ #else
+ cfg = ast_load(FLITE_CONFIG);
+@@ -210,7 +218,7 @@
+ ast_log(LOG_WARNING, "ast_streamfile
failed on %s for Flite\n", chan->name);
+ }
+
+-#if ASTERISK_VERSION == 4
++#if ASTERISK_VERSION >= 4
+ ast_module_user_remove(u);
+ #else
+ LOCAL_USER_REMOVE(u);
+@@ -263,7 +271,7 @@
+ sprintf(cmd, "rm -f %s*", filename);
+ system(cmd);
+
+-#if ASTERISK_VERSION == 4
++#if ASTERISK_VERSION >= 4
+ ast_module_user_remove(u);
+ #else
+ LOCAL_USER_REMOVE(u);
+@@ -271,7 +279,7 @@
+ return res;
+ }
+
+-#if ASTERISK_VERSION == 4
++#if ASTERISK_VERSION >= 4
+ static int unload_module(void)
+ {
+ int res;
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/asterisk-flite/asterisk-flite.spec
============================================================================
$ cvs diff -u -r0 -r1.1 asterisk-flite.spec
--- /dev/null 2008-03-20 19:32:15 +0100
+++ asterisk-flite.spec 2008-03-20 19:32:48 +0100
@@ -0,0 +1,91 @@
+##
+## asterisk-flite.spec -- OpenPKG RPM Package Specification
+## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
+##
+## Permission to use, copy, modify, and distribute this software for
+## any purpose with or without fee is hereby granted, provided that
+## the above copyright notice and this permission notice appear in all
+## copies.
+##
+## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+## SUCH DAMAGE.
+##
+
+# package information
+Name: asterisk-flite
+Summary: Asterisk Extension: Flite Text-To-Speech (TTS) Engine
+URL: http://asterisk-flite.sourceforge.net/
+Vendor: Francois Aucamp
+Packager: OpenPKG Foundation e.V.
+Distribution: OpenPKG Community
+Class: EVAL
+Group: VoIP
+License: GPL
+Version: 0.5
+Release: 20080320
+
+# list of sources
+Source0:
http://switch.dl.sourceforge.net/asterisk-flite/asterisk-flite-%{version}.tar.gz
+Source1: flite.conf
+Patch0: asterisk-flite.patch
+
+# build information
+Prefix: %{l_prefix}
+BuildRoot: %{l_buildroot}
+BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc
+PreReq: OpenPKG, openpkg >= 20060823
+BuildPreReq: asterisk, flite
+PreReq: asterisk, flite
+AutoReq: no
+AutoReqProv: no
+
+%description
+ This is an extension module for the Asterisk PBX which integrates
+ the Flite engine for Text-To-Speech (TTS) functionality.
+
+%track
+ prog asterisk-flite = {
+ version = %{version}
+ url = http://prdownloads.sourceforge.net/asterisk-flite/
+ regex = asterisk-flite-(__VER__)\.tar\.gz
+ }
+
+%prep
+ %setup -q
+ %patch -p0
+
+%build
+ %{l_make} %{l_mflags} \
+ CC="%{l_cc}" \
+ CFLAGS="%{l_cflags -O} %{l_cppflags}" \
+ LDFLAGS="%{l_ldflags}"
+
+%install
+ rm -rf $RPM_BUILD_ROOT
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/asterisk \
+ $RPM_BUILD_ROOT%{l_prefix}/lib/asterisk/modules \
+ $RPM_BUILD_ROOT%{l_prefix}/var/asterisk/spool/flite
+ %{l_shtool} install -c -m 644 %{l_value -s -a} \
+ %{SOURCE flite.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/asterisk/
+ %{l_shtool} install -c -m 755 \
+ app_flite.so $RPM_BUILD_ROOT%{l_prefix}/lib/asterisk/modules/
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
+ %{l_files_std} \
+ '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/asterisk/spool/flite'
+
+%files -f files
+
+%clean
+ rm -rf $RPM_BUILD_ROOT
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/asterisk-flite/flite.conf
============================================================================
$ cvs diff -u -r0 -r1.1 flite.conf
--- /dev/null 2008-03-20 19:32:15 +0100
+++ flite.conf 2008-03-20 19:32:49 +0100
@@ -0,0 +1,8 @@
+;;
+;; flite.conf -- Asterisk Flite Configuration
+;;
+
+[general]
+usecache = no
+cachedir = @l_prefix@/var/asterisk/spool/flite/
+
@@ .
______________________________________________________________________
OpenPKG http://openpkg.org
CVS Repository Commit List [email protected]