archrelease: copy trunk to extra-x86_64
[arch-packages.git] / speech-dispatcher / repos / testing-x86_64 / PKGBUILD
blob3841fd46ee499a2cf1e606d782fcc821b8f9eb38
1 # Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
2 pkgbase=speech-dispatcher
3 pkgname=(speech-dispatcher libspeechd)
4 pkgver=0.10.2
5 pkgrel=3
6 arch=('x86_64')
7 pkgdesc="High-level device independent layer for speech synthesis interface"
8 url="http://www.freebsoft.org/speechd"
9 license=('GPL2' 'FDL')
10 makedepends=('intltool' 'espeak-ng' 'libltdl' 'python-xdg' 'dotconf' 'libpulse' 'libao')
11 source=("https://github.com/brailcom/speechd/releases/download/${pkgver}/speech-dispatcher-${pkgver}.tar.gz"
12         'glib2.68.patch'
13         'speech-dispatcherd.service')
14 sha512sums=('9af240d9a15062489c170440911e9d148d0d113a0f22211f1496e9754345a5d079e160962d666801322dc2efa1134f8b5e209c0183d93a1f0896705dc6011122'
15             '098efb310446ebf25b80dac2a321bb1f5d74905d92a5f8a49838df687f5ef1e3bdae513f3b65451b8befcbaa485069730555c522ff96517adb74fcf41b2df85b'
16             '73eb563003b03f4836b17af66335664050d1dc3bd8434be368cd09ff8933aa2adc4bd17c4ce5c1bbbd406a0b0880191426a679fa05eac0a30f4005eaeeb47340')
18 prepare() {
19   cd ${pkgname}-${pkgver}
21   # https://github.com/brailcom/speechd/issues/616
22   patch -Np1 -i ../glib2.68.patch
24   # Disabled due to bug: https://bugs.archlinux.org/task/35700
25   sed -i "s/cicero //g" configure.ac
26   sed -i "s/sd_cicero//g" src/modules/Makefile.am
29 build() {
30   cd ${pkgname}-${pkgver}
32   CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common
34   ./configure --prefix=/usr \
35     --enable-shared \
36     --sysconfdir=/etc \
37     --without-flite
38   make
41 package_speech-dispatcher() {
42   depends=("libspeechd=$pkgver-$pkgrel" 'libltdl' 'python-xdg' 'dotconf' 'libpulse' 'libao')
43   optdepends=('festival: Speech output using Festival'
44               'espeak-ng: Speech output using ESpeak-ng'
45               'pulseaudio: PulseAudio support')
46   backup=(etc/speech-dispatcher/clients/emacs.conf
47               etc/speech-dispatcher/modules/ibmtts.conf
48               etc/speech-dispatcher/modules/espeak-generic.conf
49               etc/speech-dispatcher/modules/espeak.conf
50               etc/speech-dispatcher/modules/espeak-ng.conf
51               etc/speech-dispatcher/modules/swift-generic.conf
52               etc/speech-dispatcher/modules/festival.conf
53               etc/speech-dispatcher/modules/cicero.conf
54               etc/speech-dispatcher/modules/espeak-mbrola-generic.conf
55               etc/speech-dispatcher/modules/espeak-ng-mbrola-generic.conf
56               etc/speech-dispatcher/modules/dtk-generic.conf
57               etc/speech-dispatcher/modules/llia_phon-generic.conf
58               etc/speech-dispatcher/modules/ivona.conf
59               etc/speech-dispatcher/modules/epos-generic.conf
60           etc/speech-dispatcher/modules/flite.conf
61           etc/speech-dispatcher/modules/pico-generic.conf
62           etc/speech-dispatcher/speechd.conf)
64   cd ${pkgname}-${pkgver}
65   make DESTDIR="${pkgdir}" install
67   install -Dm644 "${srcdir}"/speech-dispatcherd.service "${pkgdir}/usr/lib/systemd/system/speech-dispatcherd.service"
68   install -d "${pkgdir}/var/log/speech-dispatcher"
70   sed -i 's|includedir=.*|includedir=${prefix}/include/speech-dispatcher|g' "${pkgdir}/usr/lib/pkgconfig/speech-dispatcher.pc"
72   mkdir -p "${srcdir}"/libspeechd/usr/lib
73   mv "${pkgdir}"/usr/include "${srcdir}"/libspeechd/usr
74   mv "${pkgdir}"/usr/lib/libspeechd*so* "${srcdir}"/libspeechd/usr/lib
77 package_libspeechd() {
78   mkdir -p "${pkgdir}"/usr/lib
80   mv "${srcdir}"/libspeechd/usr/include "${pkgdir}"/usr
81   mv "${srcdir}"/libspeechd/usr/lib/* "${pkgdir}"/usr/lib