summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCole Deck2020-08-23 15:47:50 -0500
committerCole Deck2020-08-23 15:47:50 -0500
commit75bc10925145e7a6345858d08f29f0381daf521b (patch)
tree60ca6b66aeb64436b099b402853be733de0b00dd
downloadaur-75bc10925145e7a6345858d08f29f0381daf521b.tar.gz
Initial commit
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD42
-rw-r--r--dkms.conf13
3 files changed, 70 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..2beefef4dfe
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = asus-rog-nb-wmi-dkms-git
+ pkgdesc = Kernel module to patch asus-nb-wmi to support more ROG laptops
+ pkgver = 0.1.0.r0.g1fd6b5c
+ pkgrel = 1
+ url = https://gitlab.com/asus-linux/asus-rog-nb-wmi
+ arch = x86_64
+ depends = dkms
+ depends = linux-headers
+ source = git+https://gitlab.com/asus-linux/asus-rog-nb-wmi.git
+ source = dkms.conf
+ sha256sums = SKIP
+ sha256sums = b952938712ccb756b7e263cb401d9a81d6e97e5ba14a329c4b541982e8f342ad
+
+pkgname = asus-rog-nb-wmi-dkms-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..3dad9f9cb07
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer : Cole Deck <cole at deck dot sh>
+
+pkgname=asus-rog-nb-wmi-dkms-git
+_pkgname=asus-rog-nb-wmi
+pkgver=0.1.0.r0.g1fd6b5c
+pkgrel=1
+pkgdesc="Kernel module to patch asus-nb-wmi to support more ROG laptops"
+arch=('x86_64')
+url="https://gitlab.com/asus-linux/asus-rog-nb-wmi"
+license=()
+provides=()
+conflicts=()
+depends=('dkms' 'linux-headers')
+makedepends=()
+source=("git+https://gitlab.com/asus-linux/asus-rog-nb-wmi.git"
+ "dkms.conf")
+sha256sums=("SKIP"
+ "b952938712ccb756b7e263cb401d9a81d6e97e5ba14a329c4b541982e8f342ad")
+
+pkgver() {
+ cd "$srcdir/${_pkgname}"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "${srcdir}"
+ sed -e "s/REPLACE_ME/${pkgver}/" -i "dkms.conf"
+}
+
+package() {
+ cd "${srcdir}/${_pkgname}"
+ install -d -m 755 ${pkgdir}/usr/src/${_pkgname}-${pkgver}/src
+ install -m 644 Makefile ${pkgdir}/usr/src/${_pkgname}-${pkgver}/Makefile
+ install -m 644 src/asus-rog-nb-wmi.c ${pkgdir}/usr/src/${_pkgname}-${pkgver}/src/asus-rog-nb-wmi.c
+ install -m 644 src/asus-wmi.h ${pkgdir}/usr/src/${_pkgname}-${pkgver}/src/asus-wmi.h
+
+ cd "${srcdir}"
+ install -m 644 dkms.conf ${pkgdir}/usr/src/${_pkgname}-${pkgver}/dkms.conf
+
+ install -d -m 755 ${pkgdir}/etc/modprobe.d
+ echo "blacklist asus-nb-wmi" > ${pkgdir}/etc/modprobe.d/asus-rog-nb-wmi.conf
+}
diff --git a/dkms.conf b/dkms.conf
new file mode 100644
index 00000000000..526804b2b6e
--- /dev/null
+++ b/dkms.conf
@@ -0,0 +1,13 @@
+PACKAGE_VERSION="REPLACE_ME"
+
+PACKAGE_NAME="asus-rog-nb-wmi"
+MAKE[0]="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build modules"
+CLEAN="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build clean"
+
+BUILT_MODULE_NAME[0]="asus-rog-nb-wmi"
+BUILT_MODULE_LOCATION[0]="src/"
+DEST_MODULE_LOCATION[0]="/updates"
+
+NO_WEAK_MODULES="yes"
+REMAKE_INITRD="yes"
+AUTOINSTALL=yes