1 # maintainer: Steve Holmes <steve.holmes88@gmail.com>
2 # Contributor: Alexander Jenisch <nt@divzero.at>
3 # Contributor: Chris Brannon <cmbrannon@cox.net>
4 # Contributor: Andreas Messer <andi@bupfen.de>
6 pkgname=speech-dispatcher-git
10 pkgdesc="High-level device independent layer for speech synthesis interface"
11 license=('GPL2' 'FDL')
12 depends=('glib2' 'libao' 'python2')
13 optdepends=('festival-freebsoft-utils: Speech output using Festival.'
14 'flite: Speech output using Festival Lite.'
15 'espeak: Speech output using ESpeak.')
16 makedepends=('pkgconfig' 'espeak' 'dotconf' 'automake' 'intltool')
17 provides=("speech-dispatcher")
18 conflicts=('speech-dispatcher')
20 url="http://www.freebsoft.org/speechd"
21 source=("speechd.run" "speechd.sh" "speechd.logrotate")
23 install="speech-dispatcher.install"
25 backup=('etc/speech-dispatcher/clients/gnome-speech.conf'
26 'etc/speech-dispatcher/clients/emacs.conf'
27 'etc/speech-dispatcher/modules/ibmtts.conf'
28 'etc/speech-dispatcher/modules/espeak-generic.conf'
29 'etc/speech-dispatcher/modules/espeak.conf'
30 'etc/speech-dispatcher/modules/swift-generic.conf'
31 'etc/speech-dispatcher/modules/festival.conf'
32 'etc/speech-dispatcher/modules/cicero.conf'
33 'etc/speech-dispatcher/modules/espeak-mbrola-generic.conf'
34 'etc/speech-dispatcher/modules/dtk-generic.conf'
35 'etc/speech-dispatcher/modules/llia_phon-generic.conf'
36 'etc/speech-dispatcher/modules/ivona.conf'
37 'etc/speech-dispatcher/modules/epos-generic.conf'
38 'etc/speech-dispatcher/modules/flite.conf'
39 'etc/speech-dispatcher/speechd.conf'
40 'etc/logrotate.d/speechd')
42 _gitroot="git://git.freebsoft.org/git/speechd"
47 msg "Connecting to GIT server...."
48 if [ -d $_gitname ] ; then
49 cd $_gitname && git pull origin
50 msg "The local files are updated."
52 git clone $_gitroot $_gitname
54 msg "GIT checkout done or server timeout"
55 msg "Starting make..."
56 rm -rf "$srcdir/$_gitname-build"
57 git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
58 cd "$srcdir/$_gitname-build"
62 PYTHON=python2 ./configure --prefix=/usr --sysconfdir=/etc --with-alsa --with-libao
64 make DESTDIR=${pkgdir} install
66 # Remove info dir and compress info pages
67 rm -f ${pkgdir}/usr/share/info/dir
68 gzip -9nf ${pkgdir}/usr/share/info/*
70 # Install startup, profile and logrotate files
71 install -D -m755 ${srcdir}/speechd.run ${pkgdir}/etc/rc.d/speechd
72 install -D -m644 ${srcdir}/speechd.sh ${pkgdir}/etc/profile.d/speechd.sh
73 install -D -m644 ${srcdir}/speechd.logrotate ${pkgdir}/etc/logrotate.d/speechd
75 # Modify speechd.conf to accomodate running as a system wide service
76 cd "${pkgdir}/etc/speech-dispatcher"
77 sed -i -e 's|LogDir "default"|#LogDir "default"|' speechd.conf
78 sed -i -e 's|#LogDir "/var/log/speech-dispatcher/"|LogDir "/var/log/speech-dispatcher/"|' speechd.conf
79 sed -i -e 's|# AudioOutputMethod "pulse"|AudioOutputMethod "alsa"|' speechd.conf
80 sed -i -e 's|# DisableAutoSpawn|DisableAutoSpawn|' speechd.conf
82 # Fix spd-conf to use python 2.7
83 sed -i -e 's|#!/usr/bin/python|#!/usr/bin/python2|' ${pkgdir}/usr/bin/spd-conf
85 md5sums=('bcd48386c47e907442f3d773601637b8'
86 '9e8c90ef357b1932e30dfcfa9ed92d0f'
87 'eb921b0672daae025bb075398b914525')