summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 848b544de2af07b4b91f049c0031a929aa2552f1 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Maintainer: Alexander Epaneshnikov <alex19ep@archlinux.org>
# Maintainer: Storm Dragon <stormdragon2976@gmail.com>
# Maintainer: Michael Taboada <michael@2mb.solutions>
# Contributor: Kyle <kyle@free2.ml>
# 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>

pkgbase=speech-dispatcher-git
pkgname=(speech-dispatcher-git libspeechd-git)
pkgver=0.12.0.rc3.r52.g7a04f7f9
pkgrel=1
pkgdesc="High-level device independent layer for speech synthesis interface (development version)"
arch=('x86_64')
url='http://www.freebsoft.org/speechd'
license=('GPL2' 'FDL')
makedepends=('glib2' 'intltool' 'espeak-ng' 'libtool' 'python-pyxdg' 'dotconf'
             "libpipewire" 'libpulse' 'libao' 'git')
source=(${pkgname%-git}::'git+https://github.com/brailcom/speechd.git')
sha512sums=('SKIP')

pkgver() {
	cd "${pkgname%-git}"
	git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
	cd "${pkgname%-git}"
	autoreconf -i
}

build() {
	cd "${pkgname%-git}"
	./configure --prefix=/usr --sysconfdir=/etc \
	            --disable-static \
	            --libexecdir=/usr/lib/speech-dispatcher/ \
	            --with-ibmtts=no --with-kali=no --with-baratinoo=no \
	            --with-voxin=no --without-flite
	make
}

package_speech-dispatcher-git() {
	depends=("libspeechd-git=$pkgver-$pkgrel" 'python-pyxdg' 'dotconf' 'libpulse' 'libao')
	optdepends=('festival: Speech output using Festival'
	            'espeak-ng: Speech output using ESpeak-ng'
	            'pulseaudio: PulseAudio support'
	            'pipewire: Pipewire support')
	conflicts=("speech-dispatcher")
	provides=("speech-dispatcher")
	backup=('etc/speech-dispatcher/clients/emacs.conf'
	        'etc/speech-dispatcher/modules/dtk-generic.conf'
	        'etc/speech-dispatcher/modules/epos-generic.conf'
	        'etc/speech-dispatcher/modules/espeak-ng.conf'
	        'etc/speech-dispatcher/modules/espeak-ng-mbrola.conf'
	        'etc/speech-dispatcher/modules/espeak-ng-mbrola-generic.conf'
	        'etc/speech-dispatcher/modules/festival.conf'
	        'etc/speech-dispatcher/modules/llia_phon-generic.conf'
	        'etc/speech-dispatcher/modules/mary-generic.conf'
	        'etc/speech-dispatcher/modules/swift-generic.conf'
	        'etc/speech-dispatcher/speechd.conf'
	)

	cd "${pkgname%-git}"
	make DESTDIR="${pkgdir}" install

	rm "${pkgdir}/etc/speech-dispatcher/modules/cicero.conf"
	rm "${pkgdir}/etc/speech-dispatcher/modules/espeak.conf"
	rm "${pkgdir}/etc/speech-dispatcher/modules/espeak-mbrola-generic.conf"
	rm "${pkgdir}/etc/speech-dispatcher/modules/flite.conf"
	rm "${pkgdir}/usr/lib/speech-dispatcher/speech-dispatcher-modules/sd_cicero"

	sed -i 's|includedir=.*|includedir=${prefix}/include/speech-dispatcher|g' "${pkgdir}/usr/lib/pkgconfig/speech-dispatcher.pc"

	mkdir -p "${srcdir}"/libspeechd/usr/lib
	mv "${pkgdir}"/usr/include "${srcdir}"/libspeechd/usr
	mv "${pkgdir}"/usr/lib/libspeechd*so* "${srcdir}"/libspeechd/usr/lib
}

package_libspeechd-git() {
	depends=('glib2' 'libtool')
	conflicts=("libspeechd")
	provides=("libspeechd")
	mkdir -p "${pkgdir}"/usr/lib

	mv "${srcdir}"/libspeechd/usr/include "${pkgdir}"/usr
	mv "${srcdir}"/libspeechd/usr/lib/* "${pkgdir}"/usr/lib
}