summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: abc3ef43775b855d272ffca6b654c591496581c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Maintainer: Mark Collins <tera_1225 hat hotmail.com>

pkgname=reboot-guard
pkgver=1.0.1
pkgrel=3
pkgdesc="Block systemd-initiated poweroff/reboot/halt until configurable condition checks pass"
arch=('any')
url="https://github.com/ryran/reboot-guard"
license=('GPL')
depends=('python' 'systemd')
provides=('rguard')
source=("$pkgname-$pkgver.tar.gz::https://github.com/ryran/$pkgname/archive/v$pkgver.tar.gz"
    "reboot-guard-python3.patch")
md5sums=('75e2fcf51057b043163efcc0e35cbfbd'
         'abdfb0be41bd2fad42bc4fc3040c573a')

prepare() {
  cd "$pkgname-$pkgver"
  sed -ie 's#/usr/sbin/#/usr/bin/#' rguard.service
  patch -i "${srcdir}/reboot-guard-python3.patch"
}

package() {
	cd "$pkgname-$pkgver"
	mkdir -p "${pkgdir}/usr/bin/"
	install -D rguard "${pkgdir}/usr/bin/"
	mkdir -p "$pkgdir/etc/systemd/system/"
	install -D rguard.service "$pkgdir/etc/systemd/system/"
}