diff --git a/.SRCINFO b/.SRCINFO index 0396cabf4336..03b8744f6734 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = hyprwhspr pkgdesc = Native Whisper speech-to-text for Arch/Omarchy with Waybar integration - pkgver = 1.3.0 + pkgver = 1.3.2 pkgrel = 1 url = https://github.com/goodroot/hyprwhspr install = hyprwhspr.install @@ -12,7 +12,6 @@ pkgbase = hyprwhspr depends = python-pyperclip depends = python-psutil depends = python-rich - depends = python-json5 depends = python-sounddevice depends = python-evdev depends = python-requests @@ -30,7 +29,7 @@ pkgbase = hyprwhspr optdepends = nvidia-utils: For GPU acceleration optdepends = cuda: For GPU acceleration optdepends = whisper.cpp: Use system build instead of building locally in setup step - source = hyprwhspr-1.3.0.tar.gz::https://github.com/goodroot/hyprwhspr/archive/refs/tags/v1.3.0.tar.gz - sha256sums = 1558bd7bc836934c1b77bf7186b20541e525944e4537b1d5091c37a68c62b1db + source = hyprwhspr-1.3.2.tar.gz::https://github.com/goodroot/hyprwhspr/archive/refs/tags/v1.3.2.tar.gz + sha256sums = 11020097a73e3528b84e8f39d1f16c13c18a677ad6aa7d019d63ac0f47cf2ca2 pkgname = hyprwhspr diff --git a/PKGBUILD b/PKGBUILD index 45df8f51ebc1..e98adbfe8c64 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: goodroot pkgname=hyprwhspr -pkgver=1.3.0 +pkgver=1.3.2 pkgrel=1 pkgdesc="Native Whisper speech-to-text for Arch/Omarchy with Waybar integration" arch=('x86_64') @@ -14,7 +14,6 @@ depends=( 'python-pyperclip' 'python-psutil' 'python-rich' - 'python-json5' 'python-sounddevice' 'python-evdev' 'python-requests' @@ -34,7 +33,7 @@ optdepends=( ) install=$pkgname.install source=("$pkgname-$pkgver.tar.gz::https://github.com/goodroot/$pkgname/archive/refs/tags/v$pkgver.tar.gz") -sha256sums=('1558bd7bc836934c1b77bf7186b20541e525944e4537b1d5091c37a68c62b1db') +sha256sums=('11020097a73e3528b84e8f39d1f16c13c18a677ad6aa7d019d63ac0f47cf2ca2') build() { cd "$srcdir/$pkgname-$pkgver" @@ -48,50 +47,42 @@ package() { install -d "$pkgdir/usr/lib/$pkgname" cp -r lib bin scripts config share README.md LICENSE requirements.txt "$pkgdir/usr/lib/$pkgname" - # Runtime launcher: prefers user venv + user whisper.cpp bin + # Runtime launcher: unified approach - always uses user-space venv install -d "$pkgdir/usr/bin" cat > "$pkgdir/usr/bin/$pkgname" << 'EOF' #!/usr/bin/env bash # hyprwhspr launcher -PKG_ROOT="/usr/lib/hyprwhspr" -export HYPRWHSPR_ROOT="$PKG_ROOT" -export PYTHONPATH="$PKG_ROOT/lib${PYTHONPATH:+:$PYTHONPATH}" -# Prefer a user venv; fall back to package venv; else system python -if [[ -n "$HYPRWHSPR_VENV" ]]; then - VENV="$HYPRWHSPR_VENV" -elif [[ -n "$XDG_DATA_HOME" && -d "$XDG_DATA_HOME/hyprwhspr/venv" ]]; then - VENV="$XDG_DATA_HOME/hyprwhspr/venv" -elif [[ -d "$HOME/.local/share/hyprwhspr/venv" ]]; then - VENV="$HOME/.local/share/hyprwhspr/venv" -elif [[ -d "$PKG_ROOT/venv" ]]; then - VENV="$PKG_ROOT/venv" -fi +# Get the directory where this script is located +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PACKAGE_ROOT="$(dirname "$SCRIPT_DIR")" -# Ensure user whisper.cpp bin is on PATH if present -USER_WC_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/hyprwhspr/whisper.cpp" -if [[ -x "$USER_WC_DIR/build/bin/whisper-cli" ]]; then - export PATH="$USER_WC_DIR/build/bin:$PATH" -fi +# Set environment variables +export HYPRWHSPR_ROOT="$PACKAGE_ROOT" +export PYTHONPATH="$PACKAGE_ROOT/lib:$PYTHONPATH" -if [[ -x "$VENV/bin/python" ]]; then - exec "$VENV/bin/python" "$PKG_ROOT/lib/main.py" "$@" +# Activate virtual environment in user space +USER_VENV="${XDG_DATA_HOME:-$HOME/.local/share}/hyprwhspr/venv" +if [ -f "$USER_VENV/bin/activate" ]; then + source "$USER_VENV/bin/activate" else - exec python3 "$PKG_ROOT/lib/main.py" "$@" + echo "Error: Virtual environment not found at $USER_VENV" + echo "Please run hyprwhspr-setup to set up hyprwhspr" + exit 1 fi + +# Run the main application +exec python3 "$PACKAGE_ROOT/lib/main.py" "$@" EOF chmod 755 "$pkgdir/usr/bin/$pkgname" - # Setup wrapper → AUR mode + # Setup wrapper - unified approach cat > "$pkgdir/usr/bin/hyprwhspr-setup" << 'EOF' #!/usr/bin/env bash -export HYPRWHSPR_AUR_INSTALL=1 exec /usr/lib/hyprwhspr/scripts/install-omarchy.sh "$@" EOF chmod 755 "$pkgdir/usr/bin/hyprwhspr-setup" - # Service files are handled by the install script, not installed by package - # Docs & license install -d "$pkgdir/usr/share/doc/$pkgname" "$pkgdir/usr/share/licenses/$pkgname" install -m644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md" diff --git a/hyprwhspr-1.3.0.tar.gz b/hyprwhspr-1.3.0.tar.gz deleted file mode 100644 index cbaf3cf15580..000000000000 Binary files a/hyprwhspr-1.3.0.tar.gz and /dev/null differ diff --git a/hyprwhspr-1.3.2.tar.gz b/hyprwhspr-1.3.2.tar.gz new file mode 100644 index 000000000000..fe8696501577 Binary files /dev/null and b/hyprwhspr-1.3.2.tar.gz differ