From a69ec918c693efa21dbbab5110ab100d2e2760ed Mon Sep 17 00:00:00 2001 From: goodroot Date: Sun, 31 Aug 2025 11:42:56 -0700 Subject: [PATCH] Initial package release: hyprwhspr 1.0.0 --- .SRCINFO | 24 +++++++++++++++++ PKGBUILD | 67 +++++++++++++++++++++++++++++++++++++++++++++++ hyprwhspr.install | 39 +++++++++++++++++++++++++++ 3 files changed, 130 insertions(+) create mode 100644 .SRCINFO create mode 100644 PKGBUILD create mode 100644 hyprwhspr.install diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..187bd3247576 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = hyprwhspr + pkgdesc = Native Whisper speech-to-text for Arch/Omarchy with Waybar integration + pkgver = 1.0.0 + pkgrel = 1 + url = https://github.com/goodroot/hyprwhspr + install = hyprwhspr.install + arch = x86_64 + license = MIT + depends = python + depends = ydotool + depends = pipewire + depends = pipewire-alsa + depends = pipewire-pulse + depends = pipewire-jack + depends = cmake + depends = make + depends = git + depends = base-devel + optdepends = nvidia-utils: For GPU acceleration + optdepends = cuda: For GPU acceleration + source = hyprwhspr-1.0.0.tar.gz::https://github.com/goodroot/hyprwhspr/archive/v1.0.0.tar.gz + sha256sums = 9b5b66fdb777abf701343f162c7d2d739b374d8eed3c8c5a522a5e511423e687 + +pkgname = hyprwhspr diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..9e9e8585f606 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,67 @@ +# Maintainer: goodroot + +pkgname=hyprwhspr +pkgver=1.0.0 +pkgrel=1 +pkgdesc="Native Whisper speech-to-text for Arch/Omarchy with Waybar integration" +arch=('x86_64') +url="https://github.com/goodroot/hyprwhspr" +license=('MIT') +depends=( + 'python' + 'ydotool' + 'pipewire' + 'pipewire-alsa' + 'pipewire-pulse' + 'pipewire-jack' + 'cmake' + 'make' + 'git' + 'base-devel' +) +makedepends=() +optdepends=( + 'nvidia-utils: For GPU acceleration' + 'cuda: For GPU acceleration' +) +install="${pkgname}.install" +source=( + "${pkgname}-${pkgver}.tar.gz::https://github.com/goodroot/${pkgname}/archive/v${pkgver}.tar.gz" +) +sha256sums=( + '9b5b66fdb777abf701343f162c7d2d739b374d8eed3c8c5a522a5e511423e687' +) + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + + # Create installation directory + install -dm755 "${pkgdir}/opt/${pkgname}" + + # Copy all source files to /opt/hyprwhspr + cp -r . "${pkgdir}/opt/${pkgname}/" + + # Make scripts executable + chmod +x "${pkgdir}/opt/${pkgname}/scripts/"*.sh + chmod +x "${pkgdir}/opt/${pkgname}/bin/hyprwhspr" + + # Create symlink for easy access + install -dm755 "${pkgdir}/usr/bin" + ln -sf "/opt/${pkgname}/bin/hyprwhspr" "${pkgdir}/usr/bin/hyprwhspr" + + # Copy documentation + install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md" + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + + # Create user config template + install -dm755 "${pkgdir}/etc/skel/.config/${pkgname}" + cat > "${pkgdir}/etc/skel/.config/${pkgname}/config.json" << 'EOF' +{ + "primary_shortcut": "SUPER+ALT+D", + "model": "base.en", + "audio_feedback": true, + "start_sound_volume": 0.3, + "stop_sound_volume": 0.3 +} +EOF +} diff --git a/hyprwhspr.install b/hyprwhspr.install new file mode 100644 index 000000000000..fea301b843c4 --- /dev/null +++ b/hyprwhspr.install @@ -0,0 +1,39 @@ +post_install() { + echo "HyprWhspr has been installed to /opt/hyprwhspr/" + echo "" + echo "Running automatic setup..." + + # Run the installation script automatically + if [ -f "/opt/hyprwhspr/scripts/install-omarchy.sh" ]; then + echo "Executing installation script..." + cd /opt/hyprwhspr + ./scripts/install-omarchy.sh + echo "" + echo "✅ HyprWhspr setup completed successfully!" + echo "Use Super+Alt+D to start dictation!" + else + echo "❌ Installation script not found. Please run manually:" + echo " /opt/hyprwhspr/scripts/install-omarchy.sh" + fi + + echo "" + echo "For more information, see: /usr/share/doc/hyprwhspr/README.md" +} + +post_upgrade() { + echo "HyprWhspr has been upgraded successfully!" + echo "" + echo "Running automatic setup update..." + + # Re-run the installation script to update components + if [ -f "/opt/hyprwhspr/scripts/install-omarchy.sh" ]; then + echo "Updating whisper.cpp and dependencies..." + cd /opt/hyprwhspr + ./scripts/install-omarchy.sh + echo "" + echo "✅ HyprWhspr update completed successfully!" + else + echo "❌ Installation script not found. Please run manually:" + echo " /opt/hyprwhspr/scripts/install-omarchy.sh" + fi +}