summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: da2b38ecd6310a90f1397b31d097a818c12d928d (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
# Contributor: vantu5z <vantu5z@mail.ru>
pkgname=rhvoice-dictionary-git
pkgver=r1746.20210115
pkgrel=1
pkgdesc="Русский словарь для RHVoice. Дополнительные иструменты (Python)."
arch=('i686' 'x86_64')
url="https://github.com/vantu5z/RHVoice-dictionary"
license=('GPL3')
depends=('rhvoice')
optdepends=("python>3: for text preprocessing support"
            "python-pymorphy2: morphology tool for text preprocessing")
makedepends=('git' 'python>3')

source=($pkgname::git+https://github.com/vantu5z/RHVoice-dictionary.git)
sha256sums=('SKIP')

pkgver() {
	cd $pkgname
	# get number of last git commit
	_commitCount=$(git rev-list --count HEAD)
	# get time of last git commit
	_commitTime=$(git show -s --format="%ci" | grep -o "....-..-.." | sed "s/-//g")
	# add "r*.*" from package version
	echo "r$_commitCount.$_commitTime"
}

build() {
    cd $pkgname/tools
    python build.py
}

package()
{
    cd $pkgname
    mkdir -p ${pkgdir}/etc/RHVoice/

    cp -R "dicts" "$pkgdir/etc/RHVoice/"
    cp -R "tools/build/usr/" "$pkgdir/"
}