summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO20
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD25
-rw-r--r--asus-nb-wmi-reload.install27
4 files changed, 77 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..4eff4fce355
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+# Generated by mksrcinfo v8
+# Thu Jan 21 16:36:59 UTC 2016
+pkgbase = asus-nb-wmi-reload-git
+ pkgdesc = A systemd service for reload ASUS NB WMI Driver after resume
+ pkgver = 20160121
+ pkgrel = 1
+ url = https://github.com/FadeMind/asus-nb-wmi-reload
+ install = asus-nb-wmi-reload.install
+ arch = any
+ license = GPL2
+ makedepends = git
+ depends = bash
+ depends = kmod
+ depends = sudo
+ depends = systemd
+ source = asus-nb-wmi-reload::git+https://github.com/FadeMind/asus-nb-wmi-reload.git
+ sha256sums = SKIP
+
+pkgname = asus-nb-wmi-reload-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..55542df23eb
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*
+!asus-nb-wmi-reload.install
+!PKGBUILD
+!.gitignore
+!.SRCINFO
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..07e851c128c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,25 @@
+# Maintainer: FadeMind <fademind@gmail.com>
+
+_pkgname=asus-nb-wmi-reload
+pkgname=asus-nb-wmi-reload-git
+pkgver=20160121
+pkgrel=1
+pkgdesc="A systemd service for reload ASUS NB WMI Driver after resume"
+arch=('any')
+url="https://github.com/FadeMind/${_pkgname}"
+license=('GPL2')
+depends=('bash' 'kmod' 'sudo' 'systemd')
+makedepends=('git')
+source=("${_pkgname}::git+${url}.git")
+sha256sums=('SKIP')
+install=("${_pkgname}.install")
+
+pkgver() {
+ cd ${srcdir}/${_pkgname}
+ git log -1 --format="%cd" --date=short | tr -d '-'
+}
+
+package() {
+ install -Dm644 "${srcdir}/${_pkgname}/${_pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${_pkgname}.service"
+ install -Dm755 "${srcdir}/${_pkgname}/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
+}
diff --git a/asus-nb-wmi-reload.install b/asus-nb-wmi-reload.install
new file mode 100644
index 00000000000..0aa894c0def
--- /dev/null
+++ b/asus-nb-wmi-reload.install
@@ -0,0 +1,27 @@
+post_install() {
+ systemctl is-enabled asus-nb-wmi-reload.service &> /dev/null
+ if [ $? -eq 0 ]; then
+ echo 'Service is enabled already'
+ else
+ echo 'Enabling service'
+ systemctl enable asus-nb-wmi-reload.service &> /dev/null
+ fi
+}
+
+post_upgrade() {
+ systemctl is-enabled asus-nb-wmi-reload.service &> /dev/null
+ if [ $? -eq 0 ]; then
+ echo 'Service is enabled already'
+ else
+ echo 'Enabling service'
+ systemctl enable asus-nb-wmi-reload.service &> /dev/null
+ fi
+ systemctl daemon-reload
+}
+
+pre_remove() {
+ systemctl is-enabled asus-nb-wmi-reload.service &> /dev/null
+ if [ $? -eq 0 ]; then
+ systemctl disable asus-nb-wmi-reload.service &> /dev/null
+ fi
+}