blob: 5a1009860ee59fcc4c62d45c52a42e628b89521e (
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
|
# Maintainer: Martchus <martchus@gmx.net>
# Contributor: éclairevoyant
# Contributor: Marco Pompili <aur AT emarcs DOT org>
# Contributor: Ben Duffield <bavardage AT archlinux.us>
pkgbase=pocketsphinx
pkgname=(pocketsphinx python-pocketsphinx)
pkgver=5.0.3
pkgrel=2
pkgdesc='A small speech recognizer'
arch=('i686' 'x86_64')
url='https://cmusphinx.github.io'
license=('BSD-2-Clause' 'BSD-3-Clause' 'MIT')
depends=('glibc')
makedepends=('cmake' 'cython' 'gst-plugins-base-libs' 'ninja' 'python-build' 'python-installer' 'python-scikit-build-core' 'python-sounddevice')
source=("$pkgbase-$pkgver.tar.gz::https://github.com/cmusphinx/pocketsphinx/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('5d952cb1c22e0a51ed1fafc36871612df38f145df64fa017fdc8074532ec007f')
prepare() {
cd $pkgbase-$pkgver
}
build() {
cd $pkgbase-$pkgver
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON -DBUILD_GSTREAMER=ON
cmake --build build
python -m build --wheel --no-isolation
}
package_pocketsphinx() {
cd $pkgbase-$pkgver
optdepends=('gst-plugins-base-libs: GStreamer plugin')
DESTDIR="$pkgdir" cmake --install build
install -D -m644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgbase/"
}
package_python-pocketsphinx() {
cd $pkgbase-$pkgver
depends+=('python' 'python-sounddevice')
python -m installer --destdir=${pkgdir} dist/*.whl
install -D -m644 LICENSE -t "$pkgdir/usr/share/licenses/python-$pkgbase/"
}
|