mirror of
https://github.com/archlinux/aur.git
synced 2026-03-06 08:12:38 +01:00
prep 1.3.2
This commit is contained in:
parent
0d1c4a81bf
commit
805e6d88fd
4 changed files with 23 additions and 33 deletions
7
.SRCINFO
7
.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
|
||||
|
|
|
|||
49
PKGBUILD
49
PKGBUILD
|
|
@ -1,7 +1,7 @@
|
|||
# Maintainer: goodroot <hyprwhspr@goodroot.ca>
|
||||
|
||||
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"
|
||||
|
|
|
|||
Binary file not shown.
BIN
hyprwhspr-1.3.2.tar.gz
Normal file
BIN
hyprwhspr-1.3.2.tar.gz
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue