summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0d926aefb83882753e1d828455f6d46277106478 (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
30
31
32
33
34
35
# Maintainer: Eric Waller <ewwaller+aur gmail com>

pkgname=hpfall-git
pkgver=r5.be24a8b
pkgrel=2
pkgdesc="Disk protection for HP machines."
arch=('x86_64' 'i686')
url="https://github.com/srijan/hpfall.git"
license=('GPL2')
depends=('glibc')
makedepends=('git')
md5sums=('SKIP'  3a6a193021fe5f3078f97b8c2a4c8538 ac946477d1996e68fa63792829fd8a97)

source=("git+${url}" 'log_to_syslog.patch' 'hpfall.service')

pkgver() {
  cd "${srcdir}/${pkgname%-git}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare(){
  cd "${srcdir}/${pkgname%-git}"
  patch -R hpfall.c < ../log_to_syslog.patch
}

build() {
  cd "${srcdir}/${pkgname%-git}"
  make
} 

package() {
  install -Dm755 "${pkgname%-git}/hpfall" "${pkgdir}/usr/bin/hpfall"
  install -Dm644 hpfall.service "${pkgdir}/usr/lib/systemd/system/hpfall.service"

}