summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD56
-rw-r--r--fix-60-sec-delay.patch27
-rw-r--r--xboxdrv.conf5
-rw-r--r--xboxdrv.service12
5 files changed, 80 insertions, 37 deletions
diff --git a/.SRCINFO b/.SRCINFO
index bee4ddf2473b..e03cc2e0aec9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
-pkgbase = xboxdrv-git
- pkgdesc = An XBox/XBox 360 gamepad driver - as alternative to the xpad-kernel module - with more configurability, runs in userspace and supports a multitude of controllers
- pkgver = 0.8.4.r410.g1aebab2
+pkgbase = xboxdrv-cebtenzzre-git
+ pkgdesc = An XBox/XBox 360 gamepad driver - as alternative to the xpad-kernel module - with more configurability, runs in userspace and supports a multitude of controllers (Centenzzre's fork)
+ pkgver = 0.8.8.r40.gc887ab9
pkgrel = 1
url = https://xboxdrv.gitlab.io/
arch = x86_64
@@ -16,14 +16,15 @@ pkgbase = xboxdrv-git
depends = libx11
depends = dbus-glib
depends = libusb
+ depends = python2
provides = xboxdrv
conflicts = xboxdrv
- source = xboxdrv-git::git+https://gitlab.com/xboxdrv/xboxdrv.git
+ source = xboxdrv-cebtenzzre-git::git+https://gitlab.com/cebtenzzre/xboxdrv.git#branch=stable
source = xboxdrv.service
source = xboxdrv.conf
- md5sums = SKIP
- md5sums = c44dc13f6d34cd7fc61c87ecd8c3a547
- md5sums = c73bb9cf8ff763e7c477366472d19813
+ sha256sums = SKIP
+ sha256sums = d631a8c3af7e2b4ef22f1494ded5d7a8029a8dd9756ef8907f909ef6aa0afc2b
+ sha256sums = 68a286300d28bbfc97eb694c6cc413776f0bc16e35de6d1969f13ef1e7d1cac5
-pkgname = xboxdrv-git
+pkgname = xboxdrv-cebtenzzre-git
diff --git a/PKGBUILD b/PKGBUILD
index dad125cbe906..7a6b48f2942e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,24 +1,28 @@
-# Maintainer: Fabio 'Lolix' Loli <lolix@disroot.org>
+# Maintainer: Cebtenzzre <cebtenzzre (at) gmail (dot) com>
+# Contributor: Fabio 'Lolix' Loli <lolix@disroot.org>
# Contributor: Lubosz Sarnecki <lubosz@gmail.com>
# Contributor: VĂ­tor Ferreira <vitor.dominor@gmail.com>
-pkgname=xboxdrv-git
-pkgver=0.8.4.r410.g1aebab2
+_pkgname=xboxdrv
+pkgname=${_pkgname}-cebtenzzre-git
+pkgver=0.8.8.r40.gc887ab9
pkgrel=1
-pkgdesc="An XBox/XBox 360 gamepad driver - as alternative to the xpad-kernel module - with more configurability, runs in userspace and supports a multitude of controllers"
+pkgdesc="An XBox/XBox 360 gamepad driver - as alternative to the xpad-kernel module - with more configurability, runs in userspace and supports a multitude of controllers (Centenzzre's fork)"
arch=(x86_64 i686 arm armv6h armv7h aarch64)
url="https://xboxdrv.gitlab.io/"
license=(GPL3)
-depends=(libx11 dbus-glib libusb)
-makedepends=(git cmake boost)
-provides=(xboxdrv)
-conflicts=(xboxdrv)
-source=("${pkgname}::git+https://gitlab.com/xboxdrv/xboxdrv.git"
- "xboxdrv.service"
- "xboxdrv.conf")
-md5sums=('SKIP'
- 'c44dc13f6d34cd7fc61c87ecd8c3a547'
- 'c73bb9cf8ff763e7c477366472d19813')
+depends=(libx11 dbus-glib libusb python2)
+makedepends=(git cmake boost)
+provides=("${_pkgname}")
+conflicts=("${_pkgname}")
+source=("${pkgname}::git+https://gitlab.com/cebtenzzre/xboxdrv.git#branch=stable"
+ 'xboxdrv.service'
+ 'xboxdrv.conf')
+sha256sums=('SKIP'
+ 'd631a8c3af7e2b4ef22f1494ded5d7a8029a8dd9756ef8907f909ef6aa0afc2b'
+ '68a286300d28bbfc97eb694c6cc413776f0bc16e35de6d1969f13ef1e7d1cac5')
+
+NoUpgrade=etc/conf.d/xboxdrv
pkgver() {
cd "$pkgname"
@@ -27,19 +31,25 @@ pkgver() {
prepare() {
cd "$pkgname"
- mkdir build
+ sed 's|python|python2|g' -i examples/*.py
}
build() {
- cd "$pkgname/build"
- cmake .. -DCMAKE_INSTALL_PREFIX:PATH=/usr
- make
+ cd "$pkgname"
+ scons \
+ LINKFLAGS="${LDFLAGS}" \
+ CXXFLAGS="${CPPFLAGS} ${CXXFLAGS}" \
+ "${MAKEFLAGS}"
}
package() {
- cd "$pkgname/build"
- make install DESTDIR="$pkgdir"
-
- install -D -m755 "$srcdir/xboxdrv.service" "$pkgdir/usr/lib/systemd/system/xboxdrv.service"
- install -D -m644 "$srcdir/xboxdrv.conf" "$pkgdir/etc/conf.d/xboxdrv"
+ cd "$pkgname"
+ make PREFIX=/usr DESTDIR="$pkgdir" install
+
+ cd "${srcdir}/${pkgname}"
+ install -Dm644 "${srcdir}/${_pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${_pkgname}.service"
+ install -Dm644 "${srcdir}/${_pkgname}.conf" "${pkgdir}/etc/conf.d/${_pkgname}"
+ install -Dm644 README.md NEWS PROTOCOL -t "${pkgdir}/usr/share/doc/${_pkgname}"
+ install -Dm644 examples/* -t "${pkgdir}/usr/share/doc/${_pkgname}/examples"
+ install -Dm644 data/org.seul.Xboxdrv.conf -t "${pkgdir}/etc/dbus-1/system.d"
}
diff --git a/fix-60-sec-delay.patch b/fix-60-sec-delay.patch
new file mode 100644
index 000000000000..da543d2cfa01
--- /dev/null
+++ b/fix-60-sec-delay.patch
@@ -0,0 +1,27 @@
+From 7326421eeaadbc2aeb3828628c2e65bb7be323a9 Mon Sep 17 00:00:00 2001
+From: buxit <buti@bux.at>
+Date: Wed, 2 Nov 2016 16:25:14 +0100
+Subject: [PATCH] fix 60 seconds delay
+
+use `libusb_handle_events_timeout_completed()` instead of `libusb_handle_events()`
+should fix #144
+---
+ src/usb_gsource.cpp | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/usb_gsource.cpp b/src/usb_gsource.cpp
+index 00bf1315..afb38f65 100644
+--- a/src/usb_gsource.cpp
++++ b/src/usb_gsource.cpp
+@@ -174,7 +174,10 @@ USBGSource::on_source_dispatch(GSource* source, GSourceFunc callback, gpointer u
+ gboolean
+ USBGSource::on_source()
+ {
+- libusb_handle_events(NULL);
++ struct timeval to;
++ to.tv_sec = 0;
++ to.tv_usec = 0;
++ libusb_handle_events_timeout_completed(NULL, &to, NULL);
+ return TRUE;
+ }
+
diff --git a/xboxdrv.conf b/xboxdrv.conf
index c7e90346c660..ced6554b70eb 100644
--- a/xboxdrv.conf
+++ b/xboxdrv.conf
@@ -1,2 +1,5 @@
[xboxdrv]
-silent=true
+silent = true
+next-controller = true
+[xboxdrv-daemon]
+dbus = disabled
diff --git a/xboxdrv.service b/xboxdrv.service
index 2e9bdd91e8ed..538fe94579c7 100644
--- a/xboxdrv.service
+++ b/xboxdrv.service
@@ -1,10 +1,12 @@
[Unit]
-Description = xboxdrv
+Description=Xbox controller driver daemon
+Documentation=man:xboxdrv(1)
[Service]
-User = root
-Type = simple
-ExecStart = /usr/bin/xboxdrv -c /etc/conf.d/xboxdrv
+Type=forking
+User=root
+PIDFile=/var/run/xboxdrv.pid
+ExecStart=/usr/bin/xboxdrv --daemon --detach --pid-file /var/run/xboxdrv.pid -c /etc/default/xboxdrv --detach-kernel-driver --deadzone 4000 --deadzone-trigger 10%
[Install]
-WantedBy = multi-user.target
+WantedBy=multi-user.target