Initial package release: hyprwhspr 1.0.0

This commit is contained in:
goodroot 2025-08-31 11:42:56 -07:00
commit a69ec918c6
3 changed files with 130 additions and 0 deletions

24
.SRCINFO Normal file
View file

@ -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

67
PKGBUILD Normal file
View file

@ -0,0 +1,67 @@
# Maintainer: goodroot <hyprwhspr@goodroot.ca>
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
}

39
hyprwhspr.install Normal file
View file

@ -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
}