pkgname=alto-dictation
pkgver=1.0.5
pkgrel=1
pkgdesc="System-wide push-to-talk speech-to-text service for Linux"
arch=('any')
url="https://alto-dictation.com"
license=('custom:Proprietary')
depends=(
    'python>=3.11'
    'ydotool'
    'portaudio'
    'libappindicator-gtk3'
    'python-sounddevice>=0.4.6'
    'python-numpy>=1.24.0'
    'python-evdev>=1.7.0'
    'python-pystray>=0.19.5'
    'python-pillow>=10.0.0'
    'python-pywebview>=4.0'
    'python-pygobject>=3.42.0'
)
makedepends=(
    'python-setuptools'
    'python-pip'
    'python-wheel'
)
source=("$pkgname-$pkgver.tar.gz")
sha256sums=('SKIP')

build() {
    cd "$srcdir/Alto-$pkgver"
    python -m build --wheel --no-isolation
}

package() {
    cd "$srcdir/Alto-$pkgver"
    python -m installer --destdir="$pkgdir" dist/*.whl
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
