diff options
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 36 | ||||
-rw-r--r-- | hpfall.service | 8 | ||||
-rw-r--r-- | log_to_syslog.patch | 4 |
4 files changed, 65 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b5d4900ee499 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = hpfall-git + pkgdesc = Disk protection for HP machines. + pkgver = r5.be24a8b + pkgrel = 1 + url = https://github.com/srijan/hpfall.git + arch = x86_64 + arch = i686 + makedepends = git + source = hpfall-git::git://github.com/srijan/hpfall.git + source = log_to_syslog.patch + source = hpfall.service + md5sums = SKIP + md5sums = 3a6a193021fe5f3078f97b8c2a4c8538 + md5sums = ac946477d1996e68fa63792829fd8a97 + +pkgname = hpfall-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4c10d4e9ea7d --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: Eric Waller <ewwaller+aur gmail com> + +pkgname=hpfall-git +pkgver=r5.be24a8b +pkgrel=1 +pkgdesc="Disk protection for HP machines." +arch=('x86_64' 'i686') +url_name="github.com/srijan/hpfall.git" +url="https://"${url_name} +License=('GPL') +depends=() +makedepends=('git') +md5sums=('SKIP' 3a6a193021fe5f3078f97b8c2a4c8538 ac946477d1996e68fa63792829fd8a97) + +source=("${pkgname}"::"git://"${url_name} 'log_to_syslog.patch' 'hpfall.service') + +pkgver() { + cd "$srcdir/${pkgname}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare(){ + cd "$srcdir/${pkgname}" + patch -R hpfall.c < ../log_to_syslog.patch +} + +build() { + cd "$srcdir"/${pkgname} + make +} + +package() { + install -Dm755 ${pkgname}/hpfall $pkgdir/usr/bin/hpfall + install -Dm755 ${pkgname}/../hpfall.service $pkgdir/usr/lib/systemd/system/hpfall.service + +}
\ No newline at end of file diff --git a/hpfall.service b/hpfall.service new file mode 100644 index 000000000000..33ab2ffc9afd --- /dev/null +++ b/hpfall.service @@ -0,0 +1,8 @@ +[Unit] +Description=HP laptop freefall disk protection daemon +[Service] +Type=forking +ExecStart=/usr/bin/hpfall +ExecReload=/bin/kill -HUP $MAINPID +[Install] +WantedBy=multi-user.target diff --git a/log_to_syslog.patch b/log_to_syslog.patch new file mode 100644 index 000000000000..831c2aa8bfbe --- /dev/null +++ b/log_to_syslog.patch @@ -0,0 +1,4 @@ +21d20 +< #include <syslog.h> +143d141 +< syslog(LOG_WARNING, "Freefall detected, heads parked"); |