This commit is contained in:
Thomas Weißschuh 2023-01-04 22:38:40 +00:00
parent f975df360a
commit a9301285bf
2 changed files with 21 additions and 5 deletions

View file

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

10
needrestart.hook Normal file
View file

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