summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCole Deck2020-08-23 15:40:56 -0500
committerCole Deck2020-08-23 15:40:56 -0500
commit68641a9126d0782a8fd3f6c150c81d3ca7b9c50f (patch)
treed9e99c71f97ce9b6a554ff59bb126330d8deaf80
downloadaur-68641a9126d0782a8fd3f6c150c81d3ca7b9c50f.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..3684e075455
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = hid-asus-rog-dkms-git
+ pkgdesc = kernel module allowing to switch dedicated graphics card on the Zephyrus G14, dkms version
+ pkgver = 0.2.0.r0.gdad662c
+ pkgrel = 1
+ url = https://gitlab.com/asus-linux/hid-asus-rog
+ arch = x86_64
+ depends = dkms
+ provides = hid-asus-rog
+ source = git+https://gitlab.com/asus-linux/hid-asus-rog.git
+ source = dkms.conf
+ sha256sums = SKIP
+ sha256sums = a9d78677756306c7687bef847f81425b5d04a53bb16cee8c586a6fce1e93777d
+
+pkgname = hid-asus-rog-dkms-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..5b920b60e68
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer : Cole Deck <cole at deck dot sh>
+
+pkgname=hid-asus-rog-dkms-git
+_pkgname=hid-asus-rog
+pkgver=0.2.0.r0.gdad662c
+pkgrel=1
+pkgdesc="Kernel module to patch hid-asus to support more ROG laptops"
+arch=('x86_64')
+url="https://gitlab.com/asus-linux/hid-asus-rog"
+license=()
+provides=()
+conflicts=()
+depends=('dkms' 'linux-headers')
+makedepends=()
+source=("git+https://gitlab.com/asus-linux/hid-asus-rog.git"
+ "dkms.conf")
+sha256sums=("SKIP"
+ "a9d78677756306c7687bef847f81425b5d04a53bb16cee8c586a6fce1e93777d")
+
+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/hid-asus-rog.c ${pkgdir}/usr/src/${_pkgname}-${pkgver}/src/hid-asus-rog.c
+ install -m 644 src/hid-ids.h ${pkgdir}/usr/src/${_pkgname}-${pkgver}/src/hid-ids.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 hid-asus" > ${pkgdir}/etc/modprobe.d/asus-rog.conf
+}
diff --git a/dkms.conf b/dkms.conf
new file mode 100644
index 00000000000..002b3c130d5
--- /dev/null
+++ b/dkms.conf
@@ -0,0 +1,13 @@
+PACKAGE_VERSION="REPLACE_ME"
+
+PACKAGE_NAME="hid-asus-rog"
+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]="hid-asus-rog"
+BUILT_MODULE_LOCATION[0]="src/"
+DEST_MODULE_LOCATION[0]="/updates"
+
+NO_WEAK_MODULES="yes"
+REMAKE_INITRD="yes"
+AUTOINSTALL=yes