diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
commit | 415856bdd4f48ab4f2732996f0bae58595092bbe (patch) | |
tree | ede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/speech-dispatcher |
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/speech-dispatcher')
-rw-r--r-- | extra/speech-dispatcher/PKGBUILD | 68 | ||||
-rw-r--r-- | extra/speech-dispatcher/speech-dispatcher.install | 21 | ||||
-rw-r--r-- | extra/speech-dispatcher/speechd.sh | 37 |
3 files changed, 126 insertions, 0 deletions
diff --git a/extra/speech-dispatcher/PKGBUILD b/extra/speech-dispatcher/PKGBUILD new file mode 100644 index 000000000..c0269f941 --- /dev/null +++ b/extra/speech-dispatcher/PKGBUILD @@ -0,0 +1,68 @@ +# $Id: PKGBUILD 110767 2011-02-22 05:28:34Z andrea $ +# Maintainer: Andrea Scarpino <andrea@archlinux.org> +# Contributor: Steve Holmes <steve.holmes88@gmail.com> +# Contributor: Alexander Jenisch <nt@divzero.at> +# Contributor: Chris Brannon <cmbrannon@cox.net> +# Contributor: Andreas Messer <andi@bupfen.de> + +pkgname=speech-dispatcher +pkgver=0.7.1 +pkgrel=5 +arch=('i686' 'x86_64') +pkgdesc="High-level device independent layer for speech synthesis interface" +url="http://www.freebsoft.org/speechd" +license=('GPL2' 'FDL') +depends=('glib2' 'python2' 'dotconf' 'texinfo' 'libpulse') +makedepends=('pkgconfig' 'espeak') +optdepends=('festival: Speech output using Festival' + 'espeak: Speech output using ESpeak' + 'pulseaudio: PulseAudio support') +provides=("speechd=${pkgver}") +options=('!libtool') +backup=(etc/speech-dispatcher/clients/gnome-speech.conf + etc/speech-dispatcher/clients/emacs.conf + etc/speech-dispatcher/modules/ibmtts.conf + etc/speech-dispatcher/modules/espeak-generic.conf + etc/speech-dispatcher/modules/espeak.conf + etc/speech-dispatcher/modules/swift-generic.conf + etc/speech-dispatcher/modules/festival.conf + etc/speech-dispatcher/modules/cicero.conf + etc/speech-dispatcher/modules/espeak-mbrola-generic.conf + etc/speech-dispatcher/modules/dtk-generic.conf + etc/speech-dispatcher/modules/llia_phon-generic.conf + etc/speech-dispatcher/modules/ivona.conf + etc/speech-dispatcher/modules/epos-generic.conf + etc/speech-dispatcher/modules/flite.conf + etc/speech-dispatcher/speechd.conf) +install="${pkgname}.install" +source=("http://www.freebsoft.org/pub/projects/speechd/$pkgname-$pkgver.tar.gz" + 'speechd.sh') +md5sums=('ccfc30ac006673d36b4223eb760ed696' + '858293f464b83f03f3b6bb796291c71d') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --without-flite + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR=${pkgdir} install + + install -Dm755 ${srcdir}/speechd.sh ${pkgdir}/etc/rc.d/speechd + install -d ${pkgdir}/var/log/speech-dispatcher + + # Fix spd-conf to use python 2.7 + sed -i -e 's|#!/usr/bin/python|#!/usr/bin/python2|' ${pkgdir}/usr/bin/spd-conf + sed -i -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|' ${pkgdir}/usr/lib/python2.7/site-packages/speechd/_test.py + + rm -f ${pkgdir}/usr/share/info/dir + gzip -9nf ${pkgdir}/usr/share/info/* + + # Remove conflicts with erlang (FS#21674) + rm -r ${pkgdir}/usr/bin/run_test +} diff --git a/extra/speech-dispatcher/speech-dispatcher.install b/extra/speech-dispatcher/speech-dispatcher.install new file mode 100644 index 000000000..17e273bed --- /dev/null +++ b/extra/speech-dispatcher/speech-dispatcher.install @@ -0,0 +1,21 @@ +info_dir=/usr/share/info +info_files=('speech-dispatcher.info' + 'speech-dispatcher-cs.info' + 'ssip.info' + 'spd-say.info') + +post_install() { + for f in ${info_files[@]}; do + install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null + done +} + +post_upgrade() { + post_install +} + +pre_remove() { + for f in ${info_files[@]}; do + install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null + done +} diff --git a/extra/speech-dispatcher/speechd.sh b/extra/speech-dispatcher/speechd.sh new file mode 100644 index 000000000..eb44198cb --- /dev/null +++ b/extra/speech-dispatcher/speechd.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +PID=$(pidof -o %PPID /usr/bin/speech-dispatcher) +case "$1" in + start) + stat_busy "Starting speech dispatcher Daemon" + [ -z "$PID" ] && /usr/bin/speech-dispatcher -d &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon speechd + stat_done + fi + ;; + stop) + stat_busy "Stopping speech dispatcher Daemon" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon speechd + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac + +exit 0 |