Update to v1.2.3

This commit is contained in:
goodroot 2025-09-06 18:34:28 -07:00
parent ab3dd474a2
commit e40f66be5e
3 changed files with 27 additions and 21 deletions

View file

@ -1,6 +1,6 @@
pkgbase = hyprwhspr
pkgdesc = Native Whisper speech-to-text for Arch/Omarchy with Waybar integration
pkgver = 1.2.2
pkgver = 1.2.3
pkgrel = 1
url = https://github.com/goodroot/hyprwhspr
install = hyprwhspr.install
@ -22,7 +22,7 @@ pkgbase = hyprwhspr
optdepends = cuda: For GPU acceleration
optdepends = waybar: For tray/status
optdepends = whisper.cpp: Use system build instead of building locally in setup step
source = hyprwhspr-1.2.2.tar.gz::https://github.com/goodroot/hyprwhspr/archive/refs/tags/v1.2.2.tar.gz
sha256sums = 6a509484426d9cab003d7757620e149f90a8f309f041a79930b54cedc02f0da5
source = hyprwhspr-1.2.3.tar.gz::https://github.com/goodroot/hyprwhspr/archive/refs/tags/v1.2.3.tar.gz
sha256sums = 62b2f4431a827c37730aa22b9057d94698321ac2a894accfc048f80eb4759a3a
pkgname = hyprwhspr

View file

@ -1,7 +1,7 @@
# Maintainer: goodroot <hyprwhspr@goodroot.ca>
pkgname=hyprwhspr
pkgver=1.2.2
pkgver=1.2.3
pkgrel=1
pkgdesc="Native Whisper speech-to-text for Arch/Omarchy with Waybar integration"
arch=('x86_64')
@ -25,8 +25,8 @@ optdepends=(
'whisper.cpp: Use system build instead of building locally in setup step'
)
install=$pkgname.install
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('6a509484426d9cab003d7757620e149f90a8f309f041a79930b54cedc02f0da5')
source=("$pkgname-$pkgver.tar.gz::https://github.com/goodroot/$pkgname/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('62b2f4431a827c37730aa22b9057d94698321ac2a894accfc048f80eb4759a3a')
build() {
cd "$srcdir/$pkgname-$pkgver"
@ -40,15 +40,16 @@ package() {
install -d "$pkgdir/usr/lib/$pkgname"
cp -r lib bin scripts config README.md LICENSE requirements.txt "$pkgdir/usr/lib/$pkgname"
# Runtime launcher (prefers user venv; otherwise system python)
# Runtime launcher: prefers user venv + user whisper.cpp bin
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}"
# venv lookup order: explicit env → XDG → ~/.local/share → package-dir
# 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
@ -59,6 +60,12 @@ elif [[ -d "$PKG_ROOT/venv" ]]; then
VENV="$PKG_ROOT/venv"
fi
# 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
if [[ -x "$VENV/bin/python" ]]; then
exec "$VENV/bin/python" "$PKG_ROOT/lib/main.py" "$@"
else
@ -67,11 +74,7 @@ fi
EOF
chmod 755 "$pkgdir/usr/bin/$pkgname"
# Expose your installer; users run this after install
install -m755 "$srcdir/$pkgname-$pkgver/scripts/install-omarchy.sh" \
"$pkgdir/usr/lib/$pkgname/scripts/install-omarchy.sh"
# Convenience wrapper → AUR mode
# Setup wrapper → AUR mode
cat > "$pkgdir/usr/bin/hyprwhspr-setup" << 'EOF'
#!/usr/bin/env bash
export HYPRWHSPR_AUR_INSTALL=1
@ -79,17 +82,19 @@ exec /usr/lib/hyprwhspr/scripts/install-omarchy.sh "$@"
EOF
chmod 755 "$pkgdir/usr/bin/hyprwhspr-setup"
# Ship AUR-friendly user units so users can enable them directly
# AUR-friendly user units so users can enable them directly
install -d "$pkgdir/usr/lib/systemd/user"
# If you added packaging/systemd, install from there; otherwise copy your config/systemd.
if [[ -f "$srcdir/$pkgname-$pkgver/packaging/systemd/hyprwhspr.service" ]]; then
install -m644 "$srcdir/$pkgname-$pkgver/packaging/systemd/hyprwhspr.service" \
"$pkgdir/usr/lib/systemd/user/hyprwhspr.service"
install -m644 "$srcdir/$pkgname-$pkgver/packaging/systemd/ydotoold.service" \
"$pkgdir/usr/lib/systemd/user/ydotoold.service"
else
install -m644 "$srcdir/$pkgname-$pkgver/config/systemd/hyprwhspr.service" \
"$pkgdir/usr/lib/systemd/user/hyprwhspr.service"
fi
if [[ -f "$srcdir/$pkgname-$pkgver/packaging/systemd/ydotoold.service" ]]; then
install -m644 "$srcdir/$pkgname-$pkgver/packaging/systemd/ydotoold.service" \
"$pkgdir/usr/lib/systemd/user/ydotoold.service"
elif [[ -f "$srcdir/$pkgname-$pkgver/config/systemd/ydotoold.service" ]]; then
install -m644 "$srcdir/$pkgname-$pkgver/config/systemd/ydotoold.service" \
"$pkgdir/usr/lib/systemd/user/ydotoold.service"
fi

View file

@ -1,7 +1,7 @@
post_install() {
cat <<'EOF'
HyprWhspr installed.
hyprwhspr installed.
Finish setup:
hyprwhspr-setup
@ -11,7 +11,7 @@ Enable the user services:
systemctl --user enable --now hyprwhspr.service
Waybar (optional):
• Tray script: /usr/lib/hyprwhspr/config/hyprland/hyprwhspr-tray.sh
• Tray script: /usr/lib/hyprwhspr/config/hyprwhspr-tray.sh
• To auto-edit Waybar (opt-in), run:
HYPRWHSPR_WAYBAR_AUTO=1 hyprwhspr-setup
@ -29,7 +29,7 @@ EOF
post_upgrade() {
cat <<'EOF'
HyprWhspr upgraded.
hyprwhspr upgraded.
If needed, re-run setup (idempotent):
hyprwhspr-setup
@ -44,10 +44,11 @@ EOF
post_remove() {
cat <<'EOF'
HyprWhspr removed.
hyprwhspr removed.
Note: user data remains (remove manually if desired):
~/.config/hyprwhspr
~/.local/share/hyprwhspr
EOF
}