diff options
author | James Cuzella | 2023-09-28 19:46:19 -0600 |
---|---|---|
committer | Paragoumba | 2023-09-30 16:21:00 +0200 |
commit | d3143101d9873a2d0f6998d9535e98518780809a (patch) | |
tree | b170075c8e2cbbbe137231ccb9dcafba65f6b61a | |
parent | a86bcc0f7569b5b540384e7323f37e3a454f6ff0 (diff) | |
download | aur-d3143101d9873a2d0f6998d9535e98518780809a.tar.gz |
Fix user-level post-install & pre-remove hooks
Note: browser plugin will now find the companion app for current user that
installed via pacman / yay / AUR-helper
-rw-r--r-- | PKGBUILD | 8 | ||||
-rw-r--r-- | vdhcoapp-user-install.hook | 10 | ||||
-rw-r--r-- | vdhcoapp-user-remove.hook | 9 |
3 files changed, 25 insertions, 2 deletions
@@ -16,10 +16,14 @@ makedepends=() options=('!strip') # IMPORTANT! DO NOT REMOVE THIS, OTHERWISE THE BINARY WILL BE BROKEN! source=(https://github.com/aclap-dev/vdhcoapp/releases/download/v${pkgver}/vdhcoapp-${pkgver}-linux-x86_64.deb vdhcoapp-install.hook - vdhcoapp-remove.hook) + vdhcoapp-remove.hook + vdhcoapp-user-install.hook + vdhcoapp-user-remove.hook) sha256sums=('cf4e1b02b90fd9b6bf6b4072688c956d21ac292f3a36feed2e395f6e5eb81723' 'a2b56e6ae3f7f8933e20762baa90e69f63f0802b2e6d213b51e0bc68843e5d27' - '3287859986d67e15e269965676bf9c75d1e853ea0ec97695811072fb8f10a7a8') + '3287859986d67e15e269965676bf9c75d1e853ea0ec97695811072fb8f10a7a8' + 'a74a57aac6b2e76ded9524599d3047486f9f2d8f820c5114ad41209c8117ab35' + 'fddf971ed2d6d976cd6ce34f9f04c9c2d18c03112eccda44ccf887cda0344b7c') prepare() { rm control.tar.xz diff --git a/vdhcoapp-user-install.hook b/vdhcoapp-user-install.hook new file mode 100644 index 000000000000..a9687896b01e --- /dev/null +++ b/vdhcoapp-user-install.hook @@ -0,0 +1,10 @@ +[Trigger] +Operation = Install +Operation = Upgrade +Type = Package +Target = vdhcoapp-bin + +[Action] +Description = Installing JSON configuration file for current user ... +When = PostTransaction +Exec = /bin/sh -c 'sudo -u $SUDO_USER /usr/bin/vdhcoapp install --user' diff --git a/vdhcoapp-user-remove.hook b/vdhcoapp-user-remove.hook new file mode 100644 index 000000000000..ac6e3fb286ce --- /dev/null +++ b/vdhcoapp-user-remove.hook @@ -0,0 +1,9 @@ +[Trigger] +Operation = Remove +Type = Package +Target = vdhcoapp-bin + +[Action] +Description = Uninstalling JSON configuration file for current user ... +When = PreTransaction +Exec = /bin/sh -c 'sudo -u $SUDO_USER /usr/bin/vdhcoapp uninstall --user' |