summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fd7fd793fc0f421138ad20810b435bcd4bdcef65 (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
# Maintainer: Alexander Epaneshnikov <aarnaarn2@gmail.com>
# Maintainer: vantu5z <vantu5z@mail.ru>
# Contributor: der_fenix <derfenix@gmail.com>

pkgname=rhvoice-git
pkgver=1.2.3.r67.af4a529
pkgrel=1
pkgdesc="Free and open source speech synthesizer for Russian and other languages. (development version)"
arch=('x86_64')
url="https://github.com/RHVoice/RHVoice"
license=('GPL3' 'custom' 'custom:by-nc-nd-4.0' 'custom:by-sa-4.0')
depends=('libpulse')
makedepends=('git' 'scons')
optdepends=('rhvoice-dictionary-git: extended russian dictionary'
            'speech-dispatcher: for speech-dispatcher module support'
            'portaudio: for portaudio backend'
            'libao: for ao backend')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
backup=('etc/RHVoice/RHVoice.conf')
source=(${pkgname%-git}::'git+https://github.com/RHVoice/RHVoice.git'
          'git+https://github.com/RHVoice/victoria-ru.git'
          'git+https://github.com/RHVoice/evgeniy-eng.git'
          'git+https://github.com/RHVoice/evgeniy-rus.git')
md5sums=('SKIP'
         'SKIP'
         'SKIP'
         'SKIP')

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

prepare() {
	cd "$srcdir/${pkgname%-git}"
	git submodule init
	git config submodule.data/voices/victoria.url "$srcdir/victoria-ru"
	git config submodule.data/voices/evgeniy-eng.url "$srcdir/evgeniy-eng"
	git config submodule.data/voices/evgeniy-rus.url "$srcdir/evgeniy-rus"
	git config submodule.src/third-party/cldr.active false
	git config submodule.cmake/thirdparty/sanitizers.active false
	git submodule update
}

build() {
	cd "$srcdir/${pkgname%-git}"
	scons prefix="/usr" sysconfdir="/etc" CPPFLAGS="$CPPFLAGS" CCFLAGS="$CFLAGS" \
	      LINKFLAGS="$LDFLAGS"
}

package() {
	cd "$srcdir/${pkgname%-git}"
	install -d "${pkgdir}/usr/lib/speech-dispatcher-modules"
	scons install DESTDIR="${pkgdir}" prefix="/usr" sysconfdir="/etc" \
	      CPPFLAGS="$CPPFLAGS" CCFLAGS="$CFLAGS" LINKFLAGS="$LDFLAGS"
	ln -s "/usr/bin/sd_rhvoice" "${pkgdir}/usr/lib/speech-dispatcher-modules/sd_rhvoice"
	install -Dm0644 LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	install -Dm0644 licenses/by-nc-nd-4.0.txt "${pkgdir}/usr/share/licenses/${pkgname}/by-nc-nd-4.0"
	install -Dm0644 licenses/by-sa-4.0.txt "${pkgdir}/usr/share/licenses/${pkgname}/by-sa-4.0"
}