-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ defold | |
liblcf | ||
easyrpg-player | ||
ani-cli | ||
xone-dkms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Maintainer: Michał Kopeć <[email protected]> | ||
# Contributor: Michał Kopeć <[email protected]> | ||
|
||
_pkgname=xone | ||
pkgname=xone-dkms | ||
pkgver=0.3 | ||
pkgrel=4 | ||
pkgdesc='Modern Linux driver for Xbox One and Xbox Series X|S controllers' | ||
arch=('x86_64' 'aarch64') | ||
url='https://github.com/medusalix/xone' | ||
license=('GPL2') | ||
depends=( | ||
'dkms' | ||
'xone-dongle-firmware' | ||
) | ||
makedepends=('git') | ||
conflicts=( | ||
'xone-dkms' | ||
'xow' | ||
) | ||
provides=('xone-dkms') | ||
source=( | ||
https://github.com/medusalix/xone/archive/refs/tags/v${pkgver}.tar.gz | ||
'fix_6.3_compilation.patch' | ||
) | ||
sha256sums=( | ||
'993f6b2b07c3236ce283d5de4da47dbfc16a86e056af504a4958d87f718ece20' | ||
'6ce597ef7a916216584c99bd8fdf382b6a720d8550315c87142aeff2b226d70b' | ||
) | ||
|
||
package() { | ||
cd "${srcdir}/${_pkgname}-${pkgver}" | ||
|
||
local src | ||
for src in "${source[@]}"; do | ||
src="${src%%::*}" | ||
src="${src##*/}" | ||
src="${src%.zst}" | ||
[[ $src = *.patch ]] || continue | ||
echo "* Applying patch $src..." | ||
patch -Np1 < "../$src" | ||
done | ||
|
||
find . -type f \( -name 'dkms.conf' -o -name '*.c' \) -exec sed -i "s/#VERSION#/$pkgver/" {} + | ||
|
||
echo "* Copying module into /usr/src..." | ||
install -dm755 "${pkgdir}/usr/src/${_pkgname}-${pkgver}" | ||
cp -r ${srcdir}/${_pkgname}-${pkgver}/* "${pkgdir}/usr/src/${_pkgname}-${pkgver}" | ||
|
||
echo "* Blacklisting xpad module..." | ||
install -D -m 644 install/modprobe.conf "${pkgdir}/usr/lib/modprobe.d/xone-blacklist.conf" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
commit bbf0dcc484c3f5611f4e375da43e0e0ef08f3d18 | ||
Author: Vicki Pfau <[email protected]> | ||
Date: Tue May 16 15:06:07 2023 -0700 | ||
|
||
Fix build on kernel 6.3 | ||
|
||
diff --git a/bus/bus.c b/bus/bus.c | ||
index 7fde92244cb9..b129d6fb519a 100644 | ||
--- a/bus/bus.c | ||
+++ b/bus/bus.c | ||
@@ -67,7 +67,11 @@ static void gip_client_state_changed(struct work_struct *work) | ||
} | ||
} | ||
|
||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0) | ||
static int gip_client_uevent(struct device *dev, struct kobj_uevent_env *env) | ||
+#else | ||
+static int gip_client_uevent(const struct device *dev, struct kobj_uevent_env *env) | ||
+#endif | ||
{ | ||
struct gip_client *client = to_gip_client(dev); | ||
struct gip_classes *classes = client->classes; |