summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Sarawinski2019-10-18 23:32:06 +0200
committerTimo Sarawinski2019-10-18 23:32:06 +0200
commit631570bc276ec79815adc330eaa030dd09ae6c0e (patch)
treeae603cf6eb7f907b91eabe11aea987c77ede2943
parent37306a59fb7145c41b0a1a3b8463718777c61c73 (diff)
downloadaur-631570bc276ec79815adc330eaa030dd09ae6c0e.tar.gz
initial
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD18
-rw-r--r--tp.patch22
3 files changed, 44 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ad918f6e2eb2..39ab11bdc706 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,18 @@
-pkgbase = thinkpad_wmi-dkms
- pkgdesc = DKMS controlled modules for ThinkPad's WMI Bios Settings functionality
- pkgver = r12.aa470c9
+pkgbase = thinkpad_wmi-dkms-git
+ pkgdesc = Updated DKMS controlled modules for ThinkPad's WMI Bios Settings functionality
+ pkgver = r35.dbe8b91
pkgrel = 1
- url = https://github.com/c0d3z3r0/thinkpad-wmi
+ url = https://github.com/iksaif/thinkpad-wmi
arch = x86_64
license = GPL
makedepends = git
depends = dkms
- provides = thinkpad_wmi-dkms
- conflicts = thinkpad_wmi-dkms
- source = git+https://github.com/c0d3z3r0/thinkpad-wmi.git
+ provides = thinkpad_wmi-dkms-git
+ conflicts = thinkpad_wmi-dkms-git
+ source = git+https://github.com/iksaif/thinkpad-wmi.git
+ source = tp.patch
md5sums = SKIP
+ md5sums = 38fc92d73e10b31f146dd4056c261b2d
-pkgname = thinkpad_wmi-dkms
+pkgname = thinkpad_wmi-dkms-git
diff --git a/PKGBUILD b/PKGBUILD
index 5e217261ef21..a87797361c5c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,31 @@
# Maintainer: Michael Niewöhner <foss@mniewoehner.de>
basename=thinkpad-wmi
-pkgname=thinkpad_wmi-dkms
-pkgver=r12.aa470c9
+pkgname=thinkpad_wmi-dkms-git
+pkgver=r35.dbe8b91
pkgrel=1
-pkgdesc="DKMS controlled modules for ThinkPad's WMI Bios Settings functionality"
+pkgdesc="Updated DKMS controlled modules for ThinkPad's WMI Bios Settings functionality"
arch=('x86_64')
-url="https://github.com/c0d3z3r0/thinkpad-wmi"
+url="https://github.com/iksaif/thinkpad-wmi"
license=('GPL')
makedepends=('git')
depends=('dkms')
provides=("${pkgname}")
conflicts=("${pkgname}")
-source=("git+https://github.com/c0d3z3r0/thinkpad-wmi.git")
-md5sums=('SKIP')
+source=("git+https://github.com/iksaif/thinkpad-wmi.git" tp.patch)
+md5sums=('SKIP'
+ '38fc92d73e10b31f146dd4056c261b2d')
pkgver() {
cd "${srcdir}/${basename}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
+prepare() {
+ cd "${srcdir}/${basename}"/drivers/platform/x86
+ patch -Np0 -i "${srcdir}/"tp.patch
+}
+
package() {
dkmsdir="${pkgdir}/usr/src/${basename}-${pkgver}"
install -d "${dkmsdir}"
diff --git a/tp.patch b/tp.patch
new file mode 100644
index 000000000000..b09d3eed3975
--- /dev/null
+++ b/tp.patch
@@ -0,0 +1,22 @@
+--- thinkpad-wmi.c
++++ thinkpad-wmi.c
+@@ -31,6 +31,7 @@
+ #include <linux/device.h>
+ #include <linux/init.h>
+ #include <linux/kernel.h>
++#include <linux/version.h>
+ #include <linux/module.h>
+ #include <linux/platform_device.h>
+ #include <linux/seq_file.h>
+@@ -1297,7 +1298,11 @@
+ return 0;
+ }
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0))
++static int thinkpad_wmi_probe(struct wmi_device *wdev, const void *context)
++#else
+ static int thinkpad_wmi_probe(struct wmi_device *wdev)
++#endif
+ {
+ return thinkpad_wmi_add(wdev);
+ }