mirror of
https://github.com/archlinux/aur.git
synced 2026-02-08 05:02:00 +01:00
feat: Added pacman hooks for auto restarting systemd service
This commit is contained in:
parent
9e9efa57c4
commit
bc550d2e1d
3 changed files with 20 additions and 3 deletions
4
.SRCINFO
4
.SRCINFO
|
|
@ -1,7 +1,7 @@
|
|||
pkgbase = vicinae-bin
|
||||
pkgdesc = Raycast like FOSS app on Linux
|
||||
pkgver = 0.12.2
|
||||
pkgrel = 2
|
||||
pkgrel = 1
|
||||
url = https://github.com/vicinaehq/vicinae
|
||||
arch = x86_64
|
||||
license = GPL3
|
||||
|
|
@ -16,8 +16,10 @@ pkgbase = vicinae-bin
|
|||
source = https://github.com/vicinaehq/vicinae/releases/download/v0.12.2/vicinae-linux-x86_64-v0.12.2.tar.gz
|
||||
source = https://raw.githubusercontent.com/vicinaehq/vicinae/refs/tags/v0.12.2/extra/vicinae.service
|
||||
source = https://raw.githubusercontent.com/vicinaehq/vicinae/refs/tags/v0.12.2/vicinae/icons/vicinae.svg
|
||||
source = vicinae.hook
|
||||
sha256sums = f1dc05032b474d0064f005cd609a71e7389f3125a6e8016da4ff362a76db6698
|
||||
sha256sums = ad9c4ab5a52b13c9c9d1ae705ed72730d333a3c4e528d49bea983f221f89aa42
|
||||
sha256sums = 9b3957bd45e7508dc2d4e16d3186fc679752c0554ad43755cf0044e4f6484dab
|
||||
sha256sums = 2997c7441c4b98b880155303315955d99efdd08e791e36e52a5f4c2b1e3b26b9
|
||||
|
||||
pkgname = vicinae-bin
|
||||
|
|
|
|||
10
PKGBUILD
10
PKGBUILD
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
pkgname=vicinae-bin
|
||||
pkgver=0.12.2
|
||||
pkgrel=2
|
||||
pkgrel=1
|
||||
pkgdesc="Raycast like FOSS app on Linux"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/vicinaehq/vicinae"
|
||||
|
|
@ -16,11 +16,14 @@ source=(
|
|||
"${url}/releases/download/v$pkgver/${pkgname%-bin}-linux-$arch-v$pkgver.tar.gz"
|
||||
"https://raw.githubusercontent.com/vicinaehq/vicinae/refs/tags/v$pkgver/extra/vicinae.service"
|
||||
"https://raw.githubusercontent.com/vicinaehq/vicinae/refs/tags/v$pkgver/vicinae/icons/vicinae.svg"
|
||||
"vicinae.hook"
|
||||
)
|
||||
|
||||
sha256sums=('f1dc05032b474d0064f005cd609a71e7389f3125a6e8016da4ff362a76db6698'
|
||||
'ad9c4ab5a52b13c9c9d1ae705ed72730d333a3c4e528d49bea983f221f89aa42'
|
||||
'9b3957bd45e7508dc2d4e16d3186fc679752c0554ad43755cf0044e4f6484dab')
|
||||
'9b3957bd45e7508dc2d4e16d3186fc679752c0554ad43755cf0044e4f6484dab'
|
||||
'2997c7441c4b98b880155303315955d99efdd08e791e36e52a5f4c2b1e3b26b9'
|
||||
)
|
||||
|
||||
package() {
|
||||
# Bin
|
||||
|
|
@ -38,4 +41,7 @@ package() {
|
|||
|
||||
# SVG icon
|
||||
install -Dm644 "$srcdir/${pkgname%-bin}.svg" "$pkgdir/usr/share/icons/hicolor/scalable/apps/${pkgname%-bin}.svg"
|
||||
|
||||
# Pacman hook
|
||||
install -Dm644 "$srcdir/${pkgname%-bin}.hook" "$pkgdir/usr/share/libalpm/hooks/${pkgname%-bin}.hook"
|
||||
}
|
||||
|
|
|
|||
9
vicinae.hook
Normal file
9
vicinae.hook
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[Trigger]
|
||||
Operation = Upgrade
|
||||
Type = Package
|
||||
Target = vicinae-bin
|
||||
|
||||
[Action]
|
||||
Description = Restarting vicinae.service as a user unit if enabled/active...
|
||||
When = PostTransaction
|
||||
Exec = /usr/bin/bash -c '/usr/bin/loginctl list-users --no-legend | /usr/bin/awk "{print \$2}" | /usr/bin/xargs -I {} /usr/bin/runuser -u {} -- sh -c "/usr/bin/systemctl --user is-enabled --quiet vicinae.service && /usr/bin/systemctl --user restart vicinae.service"'
|
||||
Loading…
Add table
Reference in a new issue