summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMagnus Boman2020-07-13 18:03:23 +0200
committerMagnus Boman2020-07-13 18:03:23 +0200
commitd2f641bc41ea674ba79ca6a5fd6ace15bdc80068 (patch)
tree201de51819c5fe05176abea7e2a7859d9c8bc451 /PKGBUILD
downloadaur-d2f641bc41ea674ba79ca6a5fd6ace15bdc80068.tar.gz
xpadneo-dkms: add package
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD24
1 files changed, 24 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..293c85f1141f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,24 @@
+# Maintainer: katt <magunasu.b97@gmail.com>
+# Contributor: Yangtse Su <i@yangtse.me>
+
+pkgname=xpadneo-dkms
+pkgver=0.8.1
+pkgrel=1
+pkgdesc='Advanced Linux Driver for Xbox One Wireless Gamepad'
+arch=(any)
+url='https://github.com/atar-axis/xpadneo'
+license=(GPL)
+depends=(dkms bluez bluez-utils)
+makedepends=(git)
+source=(git+"${url}"#tag=v"${pkgver}")
+sha256sums=(SKIP)
+
+package() {
+ cd "${pkgname%-*}"
+ sed -i 's/PACKAGE_VERSION="@DO_NOT_CHANGE@"/PACKAGE_VERSION="'"${pkgver}"'"/g' hid-xpadneo/dkms.conf
+ sed -i 's/#define DRV_VER "@DO_NOT_CHANGE@"/#define DRV_VER "'"${pkgver}"'"/g' hid-xpadneo/src/hid-xpadneo.c
+ sed -i 's@/etc/udev/rules.d/@/usr/lib/udev/rules.d/@g' hid-xpadneo/dkms.post_install hid-xpadneo/dkms.post_remove
+
+ install -dm755 "${pkgdir}"/usr/src/hid-xpadneo-"${pkgver}"
+ cp -r hid-xpadneo/* "${pkgdir}"/usr/src/hid-xpadneo-"${pkgver}"
+}