From 8052fb4ada9d0004d481d353dda171a68415de80 Mon Sep 17 00:00:00 2001 From: LeonardoTrapani Date: Mon, 8 Sep 2025 13:07:23 +0200 Subject: [PATCH] fix systemd issues on aur install --- packaging/PKGBUILD | 6 ++--- packaging/hyprvoice.install | 44 +++++++++---------------------------- packaging/hyprvoice.service | 4 ++-- 3 files changed, 15 insertions(+), 39 deletions(-) diff --git a/packaging/PKGBUILD b/packaging/PKGBUILD index e4f02db..5b7979d 100644 --- a/packaging/PKGBUILD +++ b/packaging/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Leonardo Trapani pkgname=hyprvoice-bin -pkgver=0.1.2 +pkgver=0.1.3 pkgrel=1 pkgdesc="Voice-powered typing for Wayland/Hyprland" arch=('x86_64') @@ -25,8 +25,8 @@ source=( "hyprvoice-${pkgver}::https://github.com/leonardotrapani/hyprvoice/releases/download/${pkgver}/hyprvoice-linux-x86_64" "hyprvoice.service" ) -sha256sums=('aac0ba89ff96104b526bdbca7e70da17b6c77c44925181a1b9dafc65ca9b3da4' - '8a9a764753c740a6c76e4173ccfb97b6e984ba52978124e307cebc9d62ed2596') +sha256sums=('e0b01b52559936016b17165280bf74232ab58275b4f4e5ee71ee41cae2b27cbd' + '08acdc7d8d1ae5977d75b8e33ce23aead288fe15c1cc6a3c92eb19c2a502dd8d') install=hyprvoice.install package() { diff --git a/packaging/hyprvoice.install b/packaging/hyprvoice.install index bdddfa7..0b82943 100644 --- a/packaging/hyprvoice.install +++ b/packaging/hyprvoice.install @@ -1,49 +1,25 @@ post_install() { - echo "==> Hyprvoice installation complete!" + echo "==> Hyprvoice installed successfully!" echo "" - - # Auto-enable the service (safe to do during installation) - echo "==> Enabling hyprvoice service..." - if systemctl --user enable hyprvoice.service 2>/dev/null; then - echo " ✅ Service enabled successfully" - else - echo " ⚠️ Service enable failed (you may need to run: systemctl --user enable hyprvoice.service)" - fi - echo "" - - echo " 📋 Next steps:" - echo " 1. Configure hyprvoice: hyprvoice configure" - echo " 2. Start the service: systemctl --user start hyprvoice.service" - echo " 3. Add keybinding to your window manager config" + echo " 📋 To use hyprvoice:" + echo " 1. Configure: hyprvoice configure" + echo " 2. Enable service: systemctl --user enable hyprvoice.service" + echo " 3. Start service: systemctl --user start hyprvoice.service" + echo " 4. Add keybinding to your window manager" echo "" echo " 🔑 For Hyprland, add to ~/.config/hypr/hyprland.conf:" echo " bind = SUPER, R, exec, hyprvoice toggle" echo "" - echo " 💡 The configure step will guide you through API key setup and preferences." - echo "" } post_upgrade() { echo "==> Hyprvoice has been upgraded." echo "" - - # Check if service was running before upgrade - was_active=false - if systemctl --user is-active --quiet hyprvoice.service 2>/dev/null; then - was_active=true - echo "==> Service was running, restarting to apply updates..." - if systemctl --user restart hyprvoice.service 2>/dev/null; then - echo " ✅ Service restarted successfully" - else - echo " ⚠️ Service restart failed (you may need to run: systemctl --user restart hyprvoice.service)" - fi - else - echo "==> Service was not running (start with: systemctl --user start hyprvoice.service)" - fi + echo " 📋 If you have hyprvoice running, restart it:" + echo " systemctl --user restart hyprvoice.service" echo "" - - echo " 📋 Additional steps:" - echo " 1. Check for new configuration options: hyprvoice configure" + echo " 📋 Check for new configuration options:" + echo " hyprvoice configure" echo "" } diff --git a/packaging/hyprvoice.service b/packaging/hyprvoice.service index 0656284..2e7384a 100644 --- a/packaging/hyprvoice.service +++ b/packaging/hyprvoice.service @@ -6,9 +6,9 @@ Wants=pipewire.service [Service] Type=simple -ExecStart=%h/.local/bin/hyprvoice serve +ExecStart=/usr/bin/hyprvoice serve Restart=on-failure RestartSec=5 [Install] -WantedBy=default.target \ No newline at end of file +WantedBy=default.target