diff options
author | Thomas Weißschuh | 2023-01-04 22:38:40 +0000 |
---|---|---|
committer | Thomas Weißschuh | 2023-01-04 22:38:40 +0000 |
commit | a9301285bfab2a2201a47da89d0fbe8779c5d7b6 (patch) | |
tree | a1fba667a3961b33b9a2d3bc77640448fad47d9b | |
parent | f975df360a59bff2c07ac3204721f6c9a98bbb8f (diff) | |
download | aur-a9301285bfab2a2201a47da89d0fbe8779c5d7b6.tar.gz |
add hook
-rw-r--r-- | PKGBUILD | 16 | ||||
-rw-r--r-- | needrestart.hook | 10 |
2 files changed, 21 insertions, 5 deletions
@@ -4,8 +4,11 @@ pkgname=needrestart url=https://github.com/liske/needrestart pkgdesc='Restart daemons after library updates.' pkgver=3.6 -pkgrel=1 -source=("needrestart-${pkgver}.tar.gz::https://github.com/liske/needrestart/archive/v${pkgver}.tar.gz") +pkgrel=2 +source=( + "needrestart-${pkgver}.tar.gz::https://github.com/liske/needrestart/archive/v${pkgver}.tar.gz" + 'needrestart.hook' +) arch=(any) license=('GPL') options=(!emptydirs) @@ -17,7 +20,7 @@ depends=(perl-module-find perl-libintl-perl ) optdepends=( - 'iucode-tool: for outdated microcode detection' + 'iucode-tool: for outdated microcode detection' ) build() { @@ -37,7 +40,10 @@ package() { unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps make DESTDIR="${pkgdir}" install - find "$pkgdir" -type d -empty -delete + + install -Dm444 "${srcdir}/needrestart.hook" \ + "${pkgdir}/usr/share/libalpm/hooks/needrestart.hook" } -sha256sums=('3dced40d6116287b163da018d57014b0b7cee04794a95f8602126e2c296ed1a7') +sha256sums=('3dced40d6116287b163da018d57014b0b7cee04794a95f8602126e2c296ed1a7' + 'e5c6696a281f5445a3b7e2b7d1055f9189a2c39d4940721aa0c2718780f15f63') diff --git a/needrestart.hook b/needrestart.hook new file mode 100644 index 000000000000..7d206c767816 --- /dev/null +++ b/needrestart.hook @@ -0,0 +1,10 @@ +[Trigger] +Operation = Upgrade +Type = Package +Target = * + +[Action] +Description = Check if daemons need restart after library/binary upgrades +Exec = /usr/bin/needrestart +When = PostTransaction +Depends = needrestart |