summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2947e89a532ca4418166a93929776de9e8301f5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Maintainer: Amish <contact at via dot aur>
pkgname=pacman-systemd-inhibit
pkgver=1.0
pkgrel=3
pkgdesc='Inhibit system shutdown, reboot etc. when pacman is upgrading the system'
arch=('x86_64')
url="https://github.com/amishmm/pacman-systemd-inhibit"
license=('GPL')
depends=('pacman' 'systemd')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/amishmm/${pkgname}/archive/v${pkgver}.tar.gz")
sha256sums=('74b8017d8e76efcd38b142d2efb0c25223f7950b932d3666e55a7574dad689e5')

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  install -d -m 755 "${pkgdir}"/usr/bin
  install -D -m 644 -t "${pkgdir}"/usr/share/libalpm/hooks hooks/{00,zz}-50-systemd-inhibit.hook
  install -D -m 700 -t "${pkgdir}"/usr/share/libalpm/scripts scripts/systemd-inhibit-hook
  ln -s sleep "${pkgdir}"/usr/bin/pacman-systemd-inhibit-sleep
}