summaryrefslogtreecommitdiff
path: root/extra/speech-dispatcher/PKGBUILD
blob: 053b65878fd1afdf666b80f06859247e82e6eef9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# $Id: PKGBUILD 165252 2012-08-14 16:20:06Z andrea $
# Maintainer:
# Contributor: 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=7
arch=('i686' 'x86_64' 'mips64el')
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' 'speech-dispatcherd.service')
md5sums=('ccfc30ac006673d36b4223eb760ed696'
        '858293f464b83f03f3b6bb796291c71d'
        'd26f52e2e95a30eaa83560f0e63faca5')

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}/usr/lib/systemd/system/"
  install -m644 "${srcdir}"/speech-dispatcherd.service "${pkgdir}/usr/lib/systemd/system/"
  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
}