From 3a98227acd87f1458a1ac7e08c535fd7a8ee7a96 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Tue, 30 Jul 2013 14:56:01 +0200 Subject: [PATCH 01/23] Rebuild for boost 1.54.0 --- xboxdrv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xboxdrv.spec b/xboxdrv.spec index 1d16ab9..e12c4c8 100644 --- a/xboxdrv.spec +++ b/xboxdrv.spec @@ -1,6 +1,6 @@ Name: xboxdrv Version: 0.8.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Userspace Xbox/Xbox360 Gamepad Driver for Linux License: GPLv3 @@ -76,6 +76,9 @@ fi %changelog +* Tue Jul 30 2013 Petr Machata - 0.8.5-3 +- Rebuild for boost 1.54.0 + * Tue Jun 04 2013 Marcel Wysocki - 0.8.5-2 - spec cleanups - fix man page permission From 72c010b6993c2683a327f8bc7fd342c1f17f49ce Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 4 Aug 2013 02:37:37 -0500 Subject: [PATCH 02/23] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- xboxdrv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xboxdrv.spec b/xboxdrv.spec index e12c4c8..bf080b6 100644 --- a/xboxdrv.spec +++ b/xboxdrv.spec @@ -1,6 +1,6 @@ Name: xboxdrv Version: 0.8.5 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Userspace Xbox/Xbox360 Gamepad Driver for Linux License: GPLv3 @@ -76,6 +76,9 @@ fi %changelog +* Sun Aug 04 2013 Fedora Release Engineering - 0.8.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Tue Jul 30 2013 Petr Machata - 0.8.5-3 - Rebuild for boost 1.54.0 From f83fa08fc4a67c7d778efe860b9ad5072f43b6c3 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Fri, 23 May 2014 15:40:51 +0200 Subject: [PATCH 03/23] Rebuild for boost 1.55.0 --- xboxdrv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xboxdrv.spec b/xboxdrv.spec index bf080b6..860a7bf 100644 --- a/xboxdrv.spec +++ b/xboxdrv.spec @@ -1,6 +1,6 @@ Name: xboxdrv Version: 0.8.5 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Userspace Xbox/Xbox360 Gamepad Driver for Linux License: GPLv3 @@ -76,6 +76,9 @@ fi %changelog +* Fri May 23 2014 Petr Machata - 0.8.5-5 +- Rebuild for boost 1.55.0 + * Sun Aug 04 2013 Fedora Release Engineering - 0.8.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From b8016e6d6be6deec31dfdb6a87c26062d52273b6 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 8 Jun 2014 00:16:01 -0500 Subject: [PATCH 04/23] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- xboxdrv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xboxdrv.spec b/xboxdrv.spec index 860a7bf..e796232 100644 --- a/xboxdrv.spec +++ b/xboxdrv.spec @@ -1,6 +1,6 @@ Name: xboxdrv Version: 0.8.5 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Userspace Xbox/Xbox360 Gamepad Driver for Linux License: GPLv3 @@ -76,6 +76,9 @@ fi %changelog +* Sun Jun 08 2014 Fedora Release Engineering - 0.8.5-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Fri May 23 2014 Petr Machata - 0.8.5-5 - Rebuild for boost 1.55.0 From ed42da49ec4eccaca77ba5380eff4a40c7e6d242 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 18 Aug 2014 09:18:08 +0000 Subject: [PATCH 05/23] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- xboxdrv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xboxdrv.spec b/xboxdrv.spec index e796232..5d9579e 100644 --- a/xboxdrv.spec +++ b/xboxdrv.spec @@ -1,6 +1,6 @@ Name: xboxdrv Version: 0.8.5 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Userspace Xbox/Xbox360 Gamepad Driver for Linux License: GPLv3 @@ -76,6 +76,9 @@ fi %changelog +* Mon Aug 18 2014 Fedora Release Engineering - 0.8.5-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Sun Jun 08 2014 Fedora Release Engineering - 0.8.5-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 1834a963e39d572cf0ce2a2e9cae02a87a7cedd8 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Mon, 26 Jan 2015 23:47:12 +0100 Subject: [PATCH 06/23] Rebuild for boost 1.57.0 --- xboxdrv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xboxdrv.spec b/xboxdrv.spec index 5d9579e..4fa76be 100644 --- a/xboxdrv.spec +++ b/xboxdrv.spec @@ -1,6 +1,6 @@ Name: xboxdrv Version: 0.8.5 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Userspace Xbox/Xbox360 Gamepad Driver for Linux License: GPLv3 @@ -76,6 +76,9 @@ fi %changelog +* Mon Jan 26 2015 Petr Machata - 0.8.5-8 +- Rebuild for boost 1.57.0 + * Mon Aug 18 2014 Fedora Release Engineering - 0.8.5-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From c99b821bef630df57dda8951ea95ec33700b51a2 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Sat, 2 May 2015 18:41:02 +0200 Subject: [PATCH 07/23] Rebuilt for GCC 5 C++11 ABI change --- xboxdrv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xboxdrv.spec b/xboxdrv.spec index 4fa76be..3a5c652 100644 --- a/xboxdrv.spec +++ b/xboxdrv.spec @@ -1,6 +1,6 @@ Name: xboxdrv Version: 0.8.5 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Userspace Xbox/Xbox360 Gamepad Driver for Linux License: GPLv3 @@ -76,6 +76,9 @@ fi %changelog +* Sat May 02 2015 Kalev Lember - 0.8.5-9 +- Rebuilt for GCC 5 C++11 ABI change + * Mon Jan 26 2015 Petr Machata - 0.8.5-8 - Rebuild for boost 1.57.0 From 874012e098d6d3866c1d74cc8d11c06daac45ce0 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 19 Jun 2015 03:45:19 +0000 Subject: [PATCH 08/23] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- xboxdrv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xboxdrv.spec b/xboxdrv.spec index 3a5c652..190d90c 100644 --- a/xboxdrv.spec +++ b/xboxdrv.spec @@ -1,6 +1,6 @@ Name: xboxdrv Version: 0.8.5 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Userspace Xbox/Xbox360 Gamepad Driver for Linux License: GPLv3 @@ -76,6 +76,9 @@ fi %changelog +* Fri Jun 19 2015 Fedora Release Engineering - 0.8.5-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Sat May 02 2015 Kalev Lember - 0.8.5-9 - Rebuilt for GCC 5 C++11 ABI change From 32b902e06e0a0a638c4604f41ed724bbacbc3c30 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Wed, 22 Jul 2015 22:38:05 +0200 Subject: [PATCH 09/23] rebuild for Boost 1.58 --- xboxdrv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xboxdrv.spec b/xboxdrv.spec index 190d90c..46ab628 100644 --- a/xboxdrv.spec +++ b/xboxdrv.spec @@ -1,6 +1,6 @@ Name: xboxdrv Version: 0.8.5 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Userspace Xbox/Xbox360 Gamepad Driver for Linux License: GPLv3 @@ -76,6 +76,9 @@ fi %changelog +* Wed Jul 22 2015 David Tardon - 0.8.5-11 +- rebuild for Boost 1.58 + * Fri Jun 19 2015 Fedora Release Engineering - 0.8.5-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From 8eb8cb0312ca0cb4ab3feee9a8ba549ab84e3615 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 29 Jul 2015 13:36:18 -0500 Subject: [PATCH 10/23] - Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159 --- xboxdrv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xboxdrv.spec b/xboxdrv.spec index 46ab628..5ef165f 100644 --- a/xboxdrv.spec +++ b/xboxdrv.spec @@ -1,6 +1,6 @@ Name: xboxdrv Version: 0.8.5 -Release: 11%{?dist} +Release: 12%{?dist} Summary: Userspace Xbox/Xbox360 Gamepad Driver for Linux License: GPLv3 @@ -76,6 +76,9 @@ fi %changelog +* Wed Jul 29 2015 Fedora Release Engineering - 0.8.5-12 +- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159 + * Wed Jul 22 2015 David Tardon - 0.8.5-11 - rebuild for Boost 1.58 From e2f5a6ef0edda9f260ece952ad85216667ec3bb5 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 27 Aug 2015 17:36:12 +0100 Subject: [PATCH 11/23] Rebuilt for Boost 1.59 --- xboxdrv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xboxdrv.spec b/xboxdrv.spec index 5ef165f..bb576ab 100644 --- a/xboxdrv.spec +++ b/xboxdrv.spec @@ -1,6 +1,6 @@ Name: xboxdrv Version: 0.8.5 -Release: 12%{?dist} +Release: 13%{?dist} Summary: Userspace Xbox/Xbox360 Gamepad Driver for Linux License: GPLv3 @@ -76,6 +76,9 @@ fi %changelog +* Thu Aug 27 2015 Jonathan Wakely - 0.8.5-13 +- Rebuilt for Boost 1.59 + * Wed Jul 29 2015 Fedora Release Engineering - 0.8.5-12 - Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159 From b4b56b703fca087d16c6d758b97bfc981317fb72 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Sat, 16 Jan 2016 04:10:16 +0000 Subject: [PATCH 12/23] Rebuilt for Boost 1.60 --- xboxdrv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xboxdrv.spec b/xboxdrv.spec index bb576ab..e8db0cc 100644 --- a/xboxdrv.spec +++ b/xboxdrv.spec @@ -1,6 +1,6 @@ Name: xboxdrv Version: 0.8.5 -Release: 13%{?dist} +Release: 14%{?dist} Summary: Userspace Xbox/Xbox360 Gamepad Driver for Linux License: GPLv3 @@ -76,6 +76,9 @@ fi %changelog +* Sat Jan 16 2016 Jonathan Wakely - 0.8.5-14 +- Rebuilt for Boost 1.60 + * Thu Aug 27 2015 Jonathan Wakely - 0.8.5-13 - Rebuilt for Boost 1.59 From 75785b6dc2144b158255041d1a2dca5d8cdc200e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 5 Feb 2016 03:17:30 +0000 Subject: [PATCH 13/23] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- xboxdrv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xboxdrv.spec b/xboxdrv.spec index e8db0cc..04ca481 100644 --- a/xboxdrv.spec +++ b/xboxdrv.spec @@ -1,6 +1,6 @@ Name: xboxdrv Version: 0.8.5 -Release: 14%{?dist} +Release: 15%{?dist} Summary: Userspace Xbox/Xbox360 Gamepad Driver for Linux License: GPLv3 @@ -76,6 +76,9 @@ fi %changelog +* Fri Feb 05 2016 Fedora Release Engineering - 0.8.5-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Sat Jan 16 2016 Jonathan Wakely - 0.8.5-14 - Rebuilt for Boost 1.60 From 821396b7922595cdfa57b9429ea90237e151ccf5 Mon Sep 17 00:00:00 2001 From: sagitter Date: Sat, 5 Mar 2016 22:52:57 +0100 Subject: [PATCH 14/23] Update to release 0.8.8 --- .gitignore | 1 + sources | 2 +- xboxdrv-config.txt | 126 +++++++++++++++++++++ xboxdrv-daemon | 123 ++++++++++++++++++++ xboxdrv-fix_defines_old_kernel.patch | 17 +++ xboxdrv.service | 2 +- xboxdrv.spec | 160 ++++++++++++++++++++------- 7 files changed, 388 insertions(+), 43 deletions(-) create mode 100644 xboxdrv-config.txt create mode 100644 xboxdrv-daemon create mode 100644 xboxdrv-fix_defines_old_kernel.patch diff --git a/.gitignore b/.gitignore index ca254d9..5803d05 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /xboxdrv-linux-0.8.5.tar.bz2 +/xboxdrv-0.8.8.tar.gz diff --git a/sources b/sources index 48f133b..daf02d6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7f20b12361770bbff9414a7c6d522c25 xboxdrv-linux-0.8.5.tar.bz2 +f138582ef182ab8c3acb3e6016b950af xboxdrv-0.8.8.tar.gz diff --git a/xboxdrv-config.txt b/xboxdrv-config.txt new file mode 100644 index 0000000..2757d19 --- /dev/null +++ b/xboxdrv-config.txt @@ -0,0 +1,126 @@ +# Default Configuration +# =============== +# +# This is simply the default xboxdrv configuration, replicated as INI +# file with a few comments + +[xboxdrv] +# Debugging output and verbosity +silent=true +# verbose = false +# usb-debug = false + +# timeout = 25 + +config=/etc/sysconfig/xboxdrvd +# alt-config = otherconfig.xboxdrv + +# busid = +# devid = + +# Chatpad +# chatpad = false +# chatpad-debug = false +# chatpad-no-init = false + +# controller-id = 0 +detach-kernel-driver=true +# device-name = +# evdev = +# evdev-debug = true +# evdev-grab = true +# extra-devices = true +# extra-events = true +# force-feedback = + +# Headset +# headset = false +# headset-debug = false +# headset-dump = /tmp/out.raw +# headset-play = /tmp/in.raw + +# instant-exit = false +led=1 +# next = true +# next-controller = true +# no-uinput = true +# product-id = -1 +# quiet = false +# rumble = false +# rumble-gain = 255 +# rumble-l = -1 +# rumble-r = -1 + +deadzone=4000 +deadzone-trigger=10 +mimic-xpad = true +# mouse = true +# square-axis = true +# trigger-as-button = true +# trigger-as-zaxis = true +# dpad-as-button = true +# dpad-only = true +# dpad-rotation = 45 +# four-way-restrictor = +# guitar = true + +# vendor-id = -1 +# wireless-id = 0 + +[xboxdrv-daemon] +detach=true +# on-connect = /home/juser/bin/on-connect.sh +# on-disconnect = /home/juser/bin/on-connect.sh +pid-file=/var/run/xboxdrv.pid + +[autofire] + +[axis-sensitivity] + +[axismap] + +[buttonmap] + +[calibration] + +[evdev-absmap] + +[evdev-keymap] + +[modifier] + +[relative-axis] + +[xboxdrv] +ui-clear=true + +[ui-axismap] +X1=ABS_X +Y1=ABS_Y + +X2=ABS_RX +Y2=ABS_RY + +LT=ABS_BRAKE +RT=ABS_GAS + +DPAD_X=ABS_HAT0X +DPAD_Y=ABS_HAT0Y + +[ui-buttonmap] +start=BTN_START +guide=BTN_MODE +back=BTN_SELECT + +A=BTN_A +B=BTN_B +X=BTN_X +Y=BTN_Y + +LB=BTN_TL +RB=BTN_TR + +TL=BTN_THUMBL +TR=BTN_THUMBR + +# EOF # diff --git a/xboxdrv-daemon b/xboxdrv-daemon new file mode 100644 index 0000000..85a9a6b --- /dev/null +++ b/xboxdrv-daemon @@ -0,0 +1,123 @@ +#! /bin/sh + +# For RedHat and cousins: +# chkconfig: 2345 20 80 +# description: Userspace Xbox/Xbox360 Gamepad Driver Daemon +# processname: xboxdrvd + +### BEGIN INIT INFO +# Provides: xboxdrvd +# Should-Start: +# Default-Start: +# Default-Stop: 0 1 2 3 4 5 6 +# Short-Description: Userspace Xbox/Xbox360 Gamepad Driver Daemon +# Description: This is a Xbox/Xbox360 gamepad driver for Linux that works in userspace. +# It is an alternative to the xpad kernel driver and has support for +# Xbox1 gamepads, Xbox360 USB gamepads and Xbox360 wireless gamepads, +# both first and third party. +### END INIT INFO + +## Xbox360 USB Gamepad Userspace Driver +## Copyright (C) 2011 Ingo Ruhnke +## +## This program is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program. If not, see . + +XBOXDRVD_BIN=/usr/bin/xboxdrv + +# Source function library +. /etc/rc.d/init.d/functions + +RETVAL=0 +prog=xboxdrvd +pidfile=/var/run/xboxdrv.pid +config=/etc/sysconfig/default.xboxdrv +lockfile=/var/lock/subsys/$prog + + [ -c /etc/sysconfig/default.xboxdrv ] && . /etc/sysconfig/default.xboxdrv + +start() { + [ -x $XBOXDRVD_BIN ] || exit 5 + [ -f $config ] || exit 6 + echo -n $"Starting $prog: " + # if not running, start it up here, usually something like "daemon $exec" + retval=$? + echo + [ $retval -eq 0 ] && touch $lockfile + return $retval +} + +stop() { + echo -n $"Stopping $prog: " + # stop it here, often "killproc $prog" + retval=$? + echo + [ $retval -eq 0 ] && rm -f $lockfile + return $retval +} + +restart() { + stop + start +} + +reload() { + restart +} + +force_reload() { + restart +} + +rh_status() { + # run checks to determine if the service is running or use generic status + status $prog +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + + +case "$1" in + start) + rh_status_q && exit 0 + $1 + ;; + stop) + rh_status_q || exit 0 + $1 + ;; + restart) + $1 + ;; + reload) + rh_status_q || exit 7 + $1 + ;; + force-reload) + force_reload + ;; + status) + rh_status + ;; + condrestart|try-restart) + rh_status_q || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac +exit $? + diff --git a/xboxdrv-fix_defines_old_kernel.patch b/xboxdrv-fix_defines_old_kernel.patch new file mode 100644 index 0000000..faf6349 --- /dev/null +++ b/xboxdrv-fix_defines_old_kernel.patch @@ -0,0 +1,17 @@ +--- src/uinput_options.orig.cpp 2015-11-09 11:19:35.000000000 +0100 ++++ src/uinput_options.cpp 2016-03-05 18:33:32.308813779 +0100 +@@ -92,10 +92,10 @@ + get_axis_map().clear(); + get_btn_map().clear(); + +- get_btn_map().bind(XBOX_DPAD_UP, ButtonEvent::create_key(DEVICEID_JOYSTICK, BTN_TRIGGER_HAPPY3)); +- get_btn_map().bind(XBOX_DPAD_DOWN, ButtonEvent::create_key(DEVICEID_JOYSTICK, BTN_TRIGGER_HAPPY4)); +- get_btn_map().bind(XBOX_DPAD_LEFT, ButtonEvent::create_key(DEVICEID_JOYSTICK, BTN_TRIGGER_HAPPY1)); +- get_btn_map().bind(XBOX_DPAD_RIGHT, ButtonEvent::create_key(DEVICEID_JOYSTICK, BTN_TRIGGER_HAPPY2)); ++ get_btn_map().bind(XBOX_DPAD_UP, ButtonEvent::create_key(DEVICEID_JOYSTICK, 0x2c2)); ++ get_btn_map().bind(XBOX_DPAD_DOWN, ButtonEvent::create_key(DEVICEID_JOYSTICK, 0x2c3)); ++ get_btn_map().bind(XBOX_DPAD_LEFT, ButtonEvent::create_key(DEVICEID_JOYSTICK, 0x2c0)); ++ get_btn_map().bind(XBOX_DPAD_RIGHT, ButtonEvent::create_key(DEVICEID_JOYSTICK, 0x2c1)); + + get_btn_map().bind(XBOX_BTN_START, ButtonEvent::create_key(DEVICEID_JOYSTICK, BTN_START)); + get_btn_map().bind(XBOX_BTN_GUIDE, ButtonEvent::create_key(DEVICEID_JOYSTICK, BTN_MODE)); diff --git a/xboxdrv.service b/xboxdrv.service index 81f4f0d..17358f0 100644 --- a/xboxdrv.service +++ b/xboxdrv.service @@ -6,7 +6,7 @@ Documentation=man:xboxdrv(1) Type=forking User=root PIDFile=/var/run/xboxdrv.pid -ExecStart=/bin/xboxdrv --daemon --detach --pid-file /var/run/xboxdrv.pid --dbus disabled --silent --deadzone 4000 --deadzone-trigger 10% +ExecStart=/bin/xboxdrv --daemon --detach --pid-file /var/run/xboxdrv.pid --dbus system -d --silent --deadzone 4000 --deadzone-trigger 10% --mimic-xpad --mimic-xpad-wireless [Install] WantedBy=multi-user.target diff --git a/xboxdrv.spec b/xboxdrv.spec index 04ca481..38e063c 100644 --- a/xboxdrv.spec +++ b/xboxdrv.spec @@ -1,81 +1,159 @@ +%if 0%{?epel} < 7 +%{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro} +%{!?__python2: %global __python2 /usr/bin/python2} +%endif + Name: xboxdrv -Version: 0.8.5 -Release: 15%{?dist} +Version: 0.8.8 +Release: 1%{?dist} Summary: Userspace Xbox/Xbox360 Gamepad Driver for Linux -License: GPLv3 +License: GPLv3+ URL: http://pingus.seul.org/~grumbel/xboxdrv/ -Source0: http://pingus.seul.org/~grumbel/xboxdrv/%name-linux-%version.tar.bz2 -Source1: xboxdrv.service +Source0: https://github.com/xboxdrv/xboxdrv/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source1: %{name}.service +Source2: %{name}-config.txt +Source3: %{name}-daemon -BuildRequires: SDL-devel -BuildRequires: zlib-devel -BuildRequires: mesa-libGL-devel -BuildRequires: scons -BuildRequires: libusbx-devel -BuildRequires: boost-devel -BuildRequires: systemd-devel -BuildRequires: glib2-devel -BuildRequires: dbus-glib-devel +Patch0: %{name}-fix_defines_old_kernel.patch + +BuildRequires: pkgconfig(sdl) +BuildRequires: pkgconfig(zlib) +BuildRequires: pkgconfig(gl) +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(x11) +BuildRequires: scons +%if 0%{?fedora} +BuildRequires: libusbx-devel +BuildRequires: boost-devel +%else +BuildRequires: libusb1-devel +BuildRequires: boost148-devel +%endif +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(dbus-glib-1) BuildRequires: pkgconfig - +BuildRequires: python2-devel Requires: dbus-python +%if 0%{?fedora} || 0%{?rhel} > 6 +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +BuildRequires: systemd +%endif + +%if 0%{?rhel} < 7 +Requires(post): chkconfig +Requires(preun): chkconfig +# This is for /sbin/service +Requires(preun): initscripts +Requires(postun): initscripts +%endif + %description This is a Xbox/Xbox360 gamepad driver for Linux that works in userspace. It is an alternative to the xpad kernel driver and has support for Xbox1 gamepads, Xbox360 USB gamepads and Xbox360 wireless gamepads, both first and third party. - %prep -%setup -q -n %{name}-linux-%{version} +%setup -q -n %{name}-%{version} +%if 0%{?rhel} && 0%{?rhel} < 7 +%patch0 -p0 +%endif + +sed -i '1s|/usr/bin/env python|%{__python2}|' examples/responsecurve-generator.py %build -make PREFIX=/usr %{?_smp_mflags} +scons \ + CC=gcc \ + CXX=g++ \ + BUILD=custom \ + CCFLAGS="%{optflags} -Wl,-z,relro -fPIC -pie -Wl,-z,now" \ + CXXFLAGS="%{optflags} -Wl,-z,relro -fPIC -pie -Wl,-z,now" \ +%if 0%{?rhel} + CPPFLAGS=" -ansi -pedantic -I%{_includedir}/boost148 -I%{_includedir}/X11" \ +%else + CPPFLAGS=" -ansi -pedantic" \ +%endif + LINKFLAGS="%{__global_ldflags} -fPIC -pie -Wl,-z,now" %install -make install PREFIX=/usr DESTDIR=%{buildroot} -install -D -m644 %SOURCE1 %{buildroot}%{_unitdir}/%{name}.service -#TODO fix dbus/hal stuff to make xboxdrvctrl usable again -rm -f %{buildroot}/%{_bindir}/xboxdrvctl +make install PREFIX=%{_prefix} DESTDIR=%{buildroot} + +rm -f %{buildroot}%{_bindir}/xboxdrvctl + chmod 644 %{buildroot}%{_mandir}/man1/xboxdrv* +install -pm 644 doc/xboxdrv-daemon.1 %{buildroot}%{_mandir}/man1 +# Install default configuration file +%if 0%{?rhel} && 0%{?rhel} < 7 +mkdir -p %{buildroot}%{_sysconfdir}/sysconfig +mkdir -p %{buildroot}%{_sysconfdir}/init.d +install -pm 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/default.%{name} +install -pm 755 %{SOURCE3} %{buildroot}%{_sysconfdir}/init.d/%{name}d +%endif +# Install dbus rule +%if 0%{?fedora} || 0%{?rhel} > 6 +mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d +install -pm 644 data/org.seul.Xboxdrv.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d +install -D -m 644 %SOURCE1 %{buildroot}%{_unitdir}/%{name}.service +%endif + +%if 0%{?fedora} || 0%{?rhel} > 6 %preun -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || : - /bin/systemctl stop %{name}.service > /dev/null 2>&1 || : -fi - +%systemd_preun %{name}.service %post -/sbin/ldconfig -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi - +%systemd_post %{name}.service %postun -/sbin/ldconfig -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : +%systemd_postun %{name}.service +%endif + +%if 0%{?rhel} && 0%{?rhel} < 7 +%preun +if [ $1 -eq 0 ] ; then + /sbin/service %{name}d stop >/dev/null 2>&1 + /sbin/chkconfig --del %{name}d fi +%post +# This adds the proper /etc/rc*.d links for the script +/sbin/chkconfig --add %{name}d + +%postun +if [ "$1" -ge "1" ] ; then + /sbin/service %{name}d condrestart >/dev/null 2>&1 || : +fi +%endif %files +%{!?_licensedir:%global license %doc} +%doc PROTOCOL NEWS AUTHORS README.md examples +%license COPYING %{_bindir}/xboxdrv %{_mandir}/man1/xboxdrv* +%if 0%{?fedora} || 0%{?rhel} > 6 %{_unitdir}/%{name}.service -%doc PROTOCOL NEWS AUTHORS COPYING README examples - +%{_sysconfdir}/dbus-1/system.d/org.seul.Xboxdrv.conf +%endif +%if 0%{?rhel} && 0%{?rhel} < 7 +%config(noreplace) %{_sysconfdir}/sysconfig/default.%{name} +%{_sysconfdir}/init.d/%{name}d +%endif %changelog +* Sat Mar 05 2016 Antonio Trande - 0.8.8-1 +- Update to release 0.8.8 +- Patched for old kernels (EPEL6) +- Fixed systemd service file +- Added init script +- Added custom dbus rule + * Fri Feb 05 2016 Fedora Release Engineering - 0.8.5-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From d8e89f9c3c4a50f0e4881783457017d312384097 Mon Sep 17 00:00:00 2001 From: sagitter Date: Wed, 16 Mar 2016 15:30:46 +0100 Subject: [PATCH 15/23] Made xboxdrv.conf file and moved into /etc --- xboxdrv-config.txt | 2 +- xboxdrv-daemon | 9 +++++++-- xboxdrv.service | 2 +- xboxdrv.spec | 10 ++++++++-- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/xboxdrv-config.txt b/xboxdrv-config.txt index 2757d19..52796bc 100644 --- a/xboxdrv-config.txt +++ b/xboxdrv-config.txt @@ -12,7 +12,7 @@ silent=true # timeout = 25 -config=/etc/sysconfig/xboxdrvd +# config=/etc/sysconfig/xboxdrvd # alt-config = otherconfig.xboxdrv # busid = diff --git a/xboxdrv-daemon b/xboxdrv-daemon index 85a9a6b..9a74710 100644 --- a/xboxdrv-daemon +++ b/xboxdrv-daemon @@ -50,7 +50,7 @@ start() { [ -x $XBOXDRVD_BIN ] || exit 5 [ -f $config ] || exit 6 echo -n $"Starting $prog: " - # if not running, start it up here, usually something like "daemon $exec" + daemon $XBOXDRVD_BIN retval=$? echo [ $retval -eq 0 ] && touch $lockfile @@ -59,7 +59,12 @@ start() { stop() { echo -n $"Stopping $prog: " - # stop it here, often "killproc $prog" + if [ -n "`pidfileofproc $XBOXDRVD_BIN`" ] ; then + killproc $XBOXDRVD_BIN + RETVAL=3 + else + failure $"Stopping $prog" + fi retval=$? echo [ $retval -eq 0 ] && rm -f $lockfile diff --git a/xboxdrv.service b/xboxdrv.service index 17358f0..3e19784 100644 --- a/xboxdrv.service +++ b/xboxdrv.service @@ -6,7 +6,7 @@ Documentation=man:xboxdrv(1) Type=forking User=root PIDFile=/var/run/xboxdrv.pid -ExecStart=/bin/xboxdrv --daemon --detach --pid-file /var/run/xboxdrv.pid --dbus system -d --silent --deadzone 4000 --deadzone-trigger 10% --mimic-xpad --mimic-xpad-wireless +ExecStart=/bin/xboxdrv -c /etc/xboxdrv.conf --daemon --detach --pid-file /var/run/xboxdrv.pid --dbus system [Install] WantedBy=multi-user.target diff --git a/xboxdrv.spec b/xboxdrv.spec index 38e063c..51dce7a 100644 --- a/xboxdrv.spec +++ b/xboxdrv.spec @@ -5,7 +5,7 @@ Name: xboxdrv Version: 0.8.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Userspace Xbox/Xbox360 Gamepad Driver for Linux License: GPLv3+ @@ -100,7 +100,8 @@ install -pm 755 %{SOURCE3} %{buildroot}%{_sysconfdir}/init.d/%{name}d %if 0%{?fedora} || 0%{?rhel} > 6 mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d install -pm 644 data/org.seul.Xboxdrv.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d -install -D -m 644 %SOURCE1 %{buildroot}%{_unitdir}/%{name}.service +install -pm 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/%{name}.conf +install -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service %endif %if 0%{?fedora} || 0%{?rhel} > 6 @@ -139,6 +140,7 @@ fi %{_mandir}/man1/xboxdrv* %if 0%{?fedora} || 0%{?rhel} > 6 %{_unitdir}/%{name}.service +%config(noreplace) %{_sysconfdir}/%{name}.conf %{_sysconfdir}/dbus-1/system.d/org.seul.Xboxdrv.conf %endif %if 0%{?rhel} && 0%{?rhel} < 7 @@ -147,6 +149,10 @@ fi %endif %changelog +* Wed Mar 16 2016 Antonio Trande - 0.8.8-2 +- Made xboxdrv.conf file and moved into /etc +- Fix init script for EPEL6 + * Sat Mar 05 2016 Antonio Trande - 0.8.8-1 - Update to release 0.8.8 - Patched for old kernels (EPEL6) From 61d250ff86d263558649561b7f14dfe774255f99 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 27 Jan 2017 09:22:47 +0000 Subject: [PATCH 16/23] Rebuilt for Boost 1.63 --- xboxdrv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xboxdrv.spec b/xboxdrv.spec index 51dce7a..13dcda4 100644 --- a/xboxdrv.spec +++ b/xboxdrv.spec @@ -5,7 +5,7 @@ Name: xboxdrv Version: 0.8.8 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Userspace Xbox/Xbox360 Gamepad Driver for Linux License: GPLv3+ @@ -149,6 +149,9 @@ fi %endif %changelog +* Fri Jan 27 2017 Jonathan Wakely - 0.8.8-3 +- Rebuilt for Boost 1.63 + * Wed Mar 16 2016 Antonio Trande - 0.8.8-2 - Made xboxdrv.conf file and moved into /etc - Fix init script for EPEL6 From b5dc7e97f275dc5fbe27e056300a0078beab1b5e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 17:40:08 +0000 Subject: [PATCH 17/23] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- xboxdrv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xboxdrv.spec b/xboxdrv.spec index 13dcda4..db824d3 100644 --- a/xboxdrv.spec +++ b/xboxdrv.spec @@ -5,7 +5,7 @@ Name: xboxdrv Version: 0.8.8 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Userspace Xbox/Xbox360 Gamepad Driver for Linux License: GPLv3+ @@ -149,6 +149,9 @@ fi %endif %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 0.8.8-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Fri Jan 27 2017 Jonathan Wakely - 0.8.8-3 - Rebuilt for Boost 1.63 From 168a54b1b7450edd3e10cb02b53c183482c578e7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 21:54:17 +0000 Subject: [PATCH 18/23] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- xboxdrv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xboxdrv.spec b/xboxdrv.spec index db824d3..8bfa8fc 100644 --- a/xboxdrv.spec +++ b/xboxdrv.spec @@ -5,7 +5,7 @@ Name: xboxdrv Version: 0.8.8 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Userspace Xbox/Xbox360 Gamepad Driver for Linux License: GPLv3+ @@ -149,6 +149,9 @@ fi %endif %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 0.8.8-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Sat Feb 11 2017 Fedora Release Engineering - 0.8.8-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 80489c06b0a12336245dd7500da9038f8565f7b3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 10:29:21 +0000 Subject: [PATCH 19/23] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- xboxdrv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xboxdrv.spec b/xboxdrv.spec index 8bfa8fc..35aa6a1 100644 --- a/xboxdrv.spec +++ b/xboxdrv.spec @@ -5,7 +5,7 @@ Name: xboxdrv Version: 0.8.8 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Userspace Xbox/Xbox360 Gamepad Driver for Linux License: GPLv3+ @@ -149,6 +149,9 @@ fi %endif %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 0.8.8-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Thu Jul 27 2017 Fedora Release Engineering - 0.8.8-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 670d9ba4192901eb5d6cc7272cb2316864067544 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 21:21:24 +0000 Subject: [PATCH 20/23] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xboxdrv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xboxdrv.spec b/xboxdrv.spec index 35aa6a1..1600ba4 100644 --- a/xboxdrv.spec +++ b/xboxdrv.spec @@ -5,7 +5,7 @@ Name: xboxdrv Version: 0.8.8 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Userspace Xbox/Xbox360 Gamepad Driver for Linux License: GPLv3+ @@ -149,6 +149,9 @@ fi %endif %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 0.8.8-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Thu Aug 03 2017 Fedora Release Engineering - 0.8.8-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From 4c98bf60be0b55fcc58024aa644851b325b3763c Mon Sep 17 00:00:00 2001 From: Iryna Shcherbina Date: Fri, 9 Feb 2018 23:47:47 +0100 Subject: [PATCH 21/23] Update Python 2 dependency declarations to new packaging standards --- xboxdrv.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/xboxdrv.spec b/xboxdrv.spec index 1600ba4..d4734b9 100644 --- a/xboxdrv.spec +++ b/xboxdrv.spec @@ -5,7 +5,7 @@ Name: xboxdrv Version: 0.8.8 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Userspace Xbox/Xbox360 Gamepad Driver for Linux License: GPLv3+ @@ -22,7 +22,7 @@ BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(x11) -BuildRequires: scons +BuildRequires: python2-scons %if 0%{?fedora} BuildRequires: libusbx-devel BuildRequires: boost-devel @@ -34,7 +34,7 @@ BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(dbus-glib-1) BuildRequires: pkgconfig BuildRequires: python2-devel -Requires: dbus-python +Requires: python2-dbus %if 0%{?fedora} || 0%{?rhel} > 6 Requires(post): systemd @@ -149,6 +149,10 @@ fi %endif %changelog +* Fri Feb 09 2018 Iryna Shcherbina - 0.8.8-8 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + * Fri Feb 09 2018 Fedora Release Engineering - 0.8.8-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 9d5f710c625ce252167ca841541fc5a4d866d7a0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 09:07:07 +0000 Subject: [PATCH 22/23] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xboxdrv.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xboxdrv.spec b/xboxdrv.spec index d4734b9..d5cd0fb 100644 --- a/xboxdrv.spec +++ b/xboxdrv.spec @@ -5,7 +5,7 @@ Name: xboxdrv Version: 0.8.8 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Userspace Xbox/Xbox360 Gamepad Driver for Linux License: GPLv3+ @@ -149,6 +149,9 @@ fi %endif %changelog +* Sat Jul 14 2018 Fedora Release Engineering - 0.8.8-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Fri Feb 09 2018 Iryna Shcherbina - 0.8.8-8 - Update Python 2 dependency declarations to new packaging standards (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) From 63e4255f362c55cbe905a6c77a1a3c60dd5e8658 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 24 Dec 2018 13:52:09 +0100 Subject: [PATCH 23/23] Orphaned for 6+ weeks --- .gitignore | 2 - dead.package | 1 + sources | 1 - xboxdrv-config.txt | 126 --------------- xboxdrv-daemon | 128 --------------- xboxdrv-fix_defines_old_kernel.patch | 17 -- xboxdrv.service | 12 -- xboxdrv.spec | 229 --------------------------- 8 files changed, 1 insertion(+), 515 deletions(-) delete mode 100644 .gitignore create mode 100644 dead.package delete mode 100644 sources delete mode 100644 xboxdrv-config.txt delete mode 100644 xboxdrv-daemon delete mode 100644 xboxdrv-fix_defines_old_kernel.patch delete mode 100644 xboxdrv.service delete mode 100644 xboxdrv.spec diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 5803d05..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/xboxdrv-linux-0.8.5.tar.bz2 -/xboxdrv-0.8.8.tar.gz diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..5204a84 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Orphaned for 6+ weeks diff --git a/sources b/sources deleted file mode 100644 index daf02d6..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -f138582ef182ab8c3acb3e6016b950af xboxdrv-0.8.8.tar.gz diff --git a/xboxdrv-config.txt b/xboxdrv-config.txt deleted file mode 100644 index 52796bc..0000000 --- a/xboxdrv-config.txt +++ /dev/null @@ -1,126 +0,0 @@ -# Default Configuration -# =============== -# -# This is simply the default xboxdrv configuration, replicated as INI -# file with a few comments - -[xboxdrv] -# Debugging output and verbosity -silent=true -# verbose = false -# usb-debug = false - -# timeout = 25 - -# config=/etc/sysconfig/xboxdrvd -# alt-config = otherconfig.xboxdrv - -# busid = -# devid = - -# Chatpad -# chatpad = false -# chatpad-debug = false -# chatpad-no-init = false - -# controller-id = 0 -detach-kernel-driver=true -# device-name = -# evdev = -# evdev-debug = true -# evdev-grab = true -# extra-devices = true -# extra-events = true -# force-feedback = - -# Headset -# headset = false -# headset-debug = false -# headset-dump = /tmp/out.raw -# headset-play = /tmp/in.raw - -# instant-exit = false -led=1 -# next = true -# next-controller = true -# no-uinput = true -# product-id = -1 -# quiet = false -# rumble = false -# rumble-gain = 255 -# rumble-l = -1 -# rumble-r = -1 - -deadzone=4000 -deadzone-trigger=10 -mimic-xpad = true -# mouse = true -# square-axis = true -# trigger-as-button = true -# trigger-as-zaxis = true -# dpad-as-button = true -# dpad-only = true -# dpad-rotation = 45 -# four-way-restrictor = -# guitar = true - -# vendor-id = -1 -# wireless-id = 0 - -[xboxdrv-daemon] -detach=true -# on-connect = /home/juser/bin/on-connect.sh -# on-disconnect = /home/juser/bin/on-connect.sh -pid-file=/var/run/xboxdrv.pid - -[autofire] - -[axis-sensitivity] - -[axismap] - -[buttonmap] - -[calibration] - -[evdev-absmap] - -[evdev-keymap] - -[modifier] - -[relative-axis] - -[xboxdrv] -ui-clear=true - -[ui-axismap] -X1=ABS_X -Y1=ABS_Y - -X2=ABS_RX -Y2=ABS_RY - -LT=ABS_BRAKE -RT=ABS_GAS - -DPAD_X=ABS_HAT0X -DPAD_Y=ABS_HAT0Y - -[ui-buttonmap] -start=BTN_START -guide=BTN_MODE -back=BTN_SELECT - -A=BTN_A -B=BTN_B -X=BTN_X -Y=BTN_Y - -LB=BTN_TL -RB=BTN_TR - -TL=BTN_THUMBL -TR=BTN_THUMBR - -# EOF # diff --git a/xboxdrv-daemon b/xboxdrv-daemon deleted file mode 100644 index 9a74710..0000000 --- a/xboxdrv-daemon +++ /dev/null @@ -1,128 +0,0 @@ -#! /bin/sh - -# For RedHat and cousins: -# chkconfig: 2345 20 80 -# description: Userspace Xbox/Xbox360 Gamepad Driver Daemon -# processname: xboxdrvd - -### BEGIN INIT INFO -# Provides: xboxdrvd -# Should-Start: -# Default-Start: -# Default-Stop: 0 1 2 3 4 5 6 -# Short-Description: Userspace Xbox/Xbox360 Gamepad Driver Daemon -# Description: This is a Xbox/Xbox360 gamepad driver for Linux that works in userspace. -# It is an alternative to the xpad kernel driver and has support for -# Xbox1 gamepads, Xbox360 USB gamepads and Xbox360 wireless gamepads, -# both first and third party. -### END INIT INFO - -## Xbox360 USB Gamepad Userspace Driver -## Copyright (C) 2011 Ingo Ruhnke -## -## This program is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program. If not, see . - -XBOXDRVD_BIN=/usr/bin/xboxdrv - -# Source function library -. /etc/rc.d/init.d/functions - -RETVAL=0 -prog=xboxdrvd -pidfile=/var/run/xboxdrv.pid -config=/etc/sysconfig/default.xboxdrv -lockfile=/var/lock/subsys/$prog - - [ -c /etc/sysconfig/default.xboxdrv ] && . /etc/sysconfig/default.xboxdrv - -start() { - [ -x $XBOXDRVD_BIN ] || exit 5 - [ -f $config ] || exit 6 - echo -n $"Starting $prog: " - daemon $XBOXDRVD_BIN - retval=$? - echo - [ $retval -eq 0 ] && touch $lockfile - return $retval -} - -stop() { - echo -n $"Stopping $prog: " - if [ -n "`pidfileofproc $XBOXDRVD_BIN`" ] ; then - killproc $XBOXDRVD_BIN - RETVAL=3 - else - failure $"Stopping $prog" - fi - retval=$? - echo - [ $retval -eq 0 ] && rm -f $lockfile - return $retval -} - -restart() { - stop - start -} - -reload() { - restart -} - -force_reload() { - restart -} - -rh_status() { - # run checks to determine if the service is running or use generic status - status $prog -} - -rh_status_q() { - rh_status >/dev/null 2>&1 -} - - -case "$1" in - start) - rh_status_q && exit 0 - $1 - ;; - stop) - rh_status_q || exit 0 - $1 - ;; - restart) - $1 - ;; - reload) - rh_status_q || exit 7 - $1 - ;; - force-reload) - force_reload - ;; - status) - rh_status - ;; - condrestart|try-restart) - rh_status_q || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" - exit 2 -esac -exit $? - diff --git a/xboxdrv-fix_defines_old_kernel.patch b/xboxdrv-fix_defines_old_kernel.patch deleted file mode 100644 index faf6349..0000000 --- a/xboxdrv-fix_defines_old_kernel.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- src/uinput_options.orig.cpp 2015-11-09 11:19:35.000000000 +0100 -+++ src/uinput_options.cpp 2016-03-05 18:33:32.308813779 +0100 -@@ -92,10 +92,10 @@ - get_axis_map().clear(); - get_btn_map().clear(); - -- get_btn_map().bind(XBOX_DPAD_UP, ButtonEvent::create_key(DEVICEID_JOYSTICK, BTN_TRIGGER_HAPPY3)); -- get_btn_map().bind(XBOX_DPAD_DOWN, ButtonEvent::create_key(DEVICEID_JOYSTICK, BTN_TRIGGER_HAPPY4)); -- get_btn_map().bind(XBOX_DPAD_LEFT, ButtonEvent::create_key(DEVICEID_JOYSTICK, BTN_TRIGGER_HAPPY1)); -- get_btn_map().bind(XBOX_DPAD_RIGHT, ButtonEvent::create_key(DEVICEID_JOYSTICK, BTN_TRIGGER_HAPPY2)); -+ get_btn_map().bind(XBOX_DPAD_UP, ButtonEvent::create_key(DEVICEID_JOYSTICK, 0x2c2)); -+ get_btn_map().bind(XBOX_DPAD_DOWN, ButtonEvent::create_key(DEVICEID_JOYSTICK, 0x2c3)); -+ get_btn_map().bind(XBOX_DPAD_LEFT, ButtonEvent::create_key(DEVICEID_JOYSTICK, 0x2c0)); -+ get_btn_map().bind(XBOX_DPAD_RIGHT, ButtonEvent::create_key(DEVICEID_JOYSTICK, 0x2c1)); - - get_btn_map().bind(XBOX_BTN_START, ButtonEvent::create_key(DEVICEID_JOYSTICK, BTN_START)); - get_btn_map().bind(XBOX_BTN_GUIDE, ButtonEvent::create_key(DEVICEID_JOYSTICK, BTN_MODE)); diff --git a/xboxdrv.service b/xboxdrv.service deleted file mode 100644 index 3e19784..0000000 --- a/xboxdrv.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Xbox controller driver daemon -Documentation=man:xboxdrv(1) - -[Service] -Type=forking -User=root -PIDFile=/var/run/xboxdrv.pid -ExecStart=/bin/xboxdrv -c /etc/xboxdrv.conf --daemon --detach --pid-file /var/run/xboxdrv.pid --dbus system - -[Install] -WantedBy=multi-user.target diff --git a/xboxdrv.spec b/xboxdrv.spec deleted file mode 100644 index d5cd0fb..0000000 --- a/xboxdrv.spec +++ /dev/null @@ -1,229 +0,0 @@ -%if 0%{?epel} < 7 -%{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro} -%{!?__python2: %global __python2 /usr/bin/python2} -%endif - -Name: xboxdrv -Version: 0.8.8 -Release: 9%{?dist} -Summary: Userspace Xbox/Xbox360 Gamepad Driver for Linux - -License: GPLv3+ -URL: http://pingus.seul.org/~grumbel/xboxdrv/ -Source0: https://github.com/xboxdrv/xboxdrv/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz -Source1: %{name}.service -Source2: %{name}-config.txt -Source3: %{name}-daemon - -Patch0: %{name}-fix_defines_old_kernel.patch - -BuildRequires: pkgconfig(sdl) -BuildRequires: pkgconfig(zlib) -BuildRequires: pkgconfig(gl) -BuildRequires: pkgconfig(libudev) -BuildRequires: pkgconfig(x11) -BuildRequires: python2-scons -%if 0%{?fedora} -BuildRequires: libusbx-devel -BuildRequires: boost-devel -%else -BuildRequires: libusb1-devel -BuildRequires: boost148-devel -%endif -BuildRequires: pkgconfig(glib-2.0) -BuildRequires: pkgconfig(dbus-glib-1) -BuildRequires: pkgconfig -BuildRequires: python2-devel -Requires: python2-dbus - -%if 0%{?fedora} || 0%{?rhel} > 6 -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd -BuildRequires: systemd -%endif - -%if 0%{?rhel} < 7 -Requires(post): chkconfig -Requires(preun): chkconfig -# This is for /sbin/service -Requires(preun): initscripts -Requires(postun): initscripts -%endif - -%description -This is a Xbox/Xbox360 gamepad driver for Linux that works in userspace. -It is an alternative to the xpad kernel driver and has support for -Xbox1 gamepads, Xbox360 USB gamepads and Xbox360 wireless gamepads, -both first and third party. - -%prep -%setup -q -n %{name}-%{version} - -%if 0%{?rhel} && 0%{?rhel} < 7 -%patch0 -p0 -%endif - -sed -i '1s|/usr/bin/env python|%{__python2}|' examples/responsecurve-generator.py - -%build -scons \ - CC=gcc \ - CXX=g++ \ - BUILD=custom \ - CCFLAGS="%{optflags} -Wl,-z,relro -fPIC -pie -Wl,-z,now" \ - CXXFLAGS="%{optflags} -Wl,-z,relro -fPIC -pie -Wl,-z,now" \ -%if 0%{?rhel} - CPPFLAGS=" -ansi -pedantic -I%{_includedir}/boost148 -I%{_includedir}/X11" \ -%else - CPPFLAGS=" -ansi -pedantic" \ -%endif - LINKFLAGS="%{__global_ldflags} -fPIC -pie -Wl,-z,now" - -%install -make install PREFIX=%{_prefix} DESTDIR=%{buildroot} - -rm -f %{buildroot}%{_bindir}/xboxdrvctl - -chmod 644 %{buildroot}%{_mandir}/man1/xboxdrv* -install -pm 644 doc/xboxdrv-daemon.1 %{buildroot}%{_mandir}/man1 - -# Install default configuration file -%if 0%{?rhel} && 0%{?rhel} < 7 -mkdir -p %{buildroot}%{_sysconfdir}/sysconfig -mkdir -p %{buildroot}%{_sysconfdir}/init.d -install -pm 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/default.%{name} -install -pm 755 %{SOURCE3} %{buildroot}%{_sysconfdir}/init.d/%{name}d -%endif - -# Install dbus rule -%if 0%{?fedora} || 0%{?rhel} > 6 -mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d -install -pm 644 data/org.seul.Xboxdrv.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d -install -pm 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/%{name}.conf -install -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service -%endif - -%if 0%{?fedora} || 0%{?rhel} > 6 -%preun -%systemd_preun %{name}.service - -%post -%systemd_post %{name}.service - -%postun -%systemd_postun %{name}.service -%endif - -%if 0%{?rhel} && 0%{?rhel} < 7 -%preun -if [ $1 -eq 0 ] ; then - /sbin/service %{name}d stop >/dev/null 2>&1 - /sbin/chkconfig --del %{name}d -fi - -%post -# This adds the proper /etc/rc*.d links for the script -/sbin/chkconfig --add %{name}d - -%postun -if [ "$1" -ge "1" ] ; then - /sbin/service %{name}d condrestart >/dev/null 2>&1 || : -fi -%endif - -%files -%{!?_licensedir:%global license %doc} -%doc PROTOCOL NEWS AUTHORS README.md examples -%license COPYING -%{_bindir}/xboxdrv -%{_mandir}/man1/xboxdrv* -%if 0%{?fedora} || 0%{?rhel} > 6 -%{_unitdir}/%{name}.service -%config(noreplace) %{_sysconfdir}/%{name}.conf -%{_sysconfdir}/dbus-1/system.d/org.seul.Xboxdrv.conf -%endif -%if 0%{?rhel} && 0%{?rhel} < 7 -%config(noreplace) %{_sysconfdir}/sysconfig/default.%{name} -%{_sysconfdir}/init.d/%{name}d -%endif - -%changelog -* Sat Jul 14 2018 Fedora Release Engineering - 0.8.8-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Fri Feb 09 2018 Iryna Shcherbina - 0.8.8-8 -- Update Python 2 dependency declarations to new packaging standards - (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) - -* Fri Feb 09 2018 Fedora Release Engineering - 0.8.8-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Thu Aug 03 2017 Fedora Release Engineering - 0.8.8-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Thu Jul 27 2017 Fedora Release Engineering - 0.8.8-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Sat Feb 11 2017 Fedora Release Engineering - 0.8.8-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Fri Jan 27 2017 Jonathan Wakely - 0.8.8-3 -- Rebuilt for Boost 1.63 - -* Wed Mar 16 2016 Antonio Trande - 0.8.8-2 -- Made xboxdrv.conf file and moved into /etc -- Fix init script for EPEL6 - -* Sat Mar 05 2016 Antonio Trande - 0.8.8-1 -- Update to release 0.8.8 -- Patched for old kernels (EPEL6) -- Fixed systemd service file -- Added init script -- Added custom dbus rule - -* Fri Feb 05 2016 Fedora Release Engineering - 0.8.5-15 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Sat Jan 16 2016 Jonathan Wakely - 0.8.5-14 -- Rebuilt for Boost 1.60 - -* Thu Aug 27 2015 Jonathan Wakely - 0.8.5-13 -- Rebuilt for Boost 1.59 - -* Wed Jul 29 2015 Fedora Release Engineering - 0.8.5-12 -- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159 - -* Wed Jul 22 2015 David Tardon - 0.8.5-11 -- rebuild for Boost 1.58 - -* Fri Jun 19 2015 Fedora Release Engineering - 0.8.5-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Sat May 02 2015 Kalev Lember - 0.8.5-9 -- Rebuilt for GCC 5 C++11 ABI change - -* Mon Jan 26 2015 Petr Machata - 0.8.5-8 -- Rebuild for boost 1.57.0 - -* Mon Aug 18 2014 Fedora Release Engineering - 0.8.5-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Sun Jun 08 2014 Fedora Release Engineering - 0.8.5-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Fri May 23 2014 Petr Machata - 0.8.5-5 -- Rebuild for boost 1.55.0 - -* Sun Aug 04 2013 Fedora Release Engineering - 0.8.5-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Tue Jul 30 2013 Petr Machata - 0.8.5-3 -- Rebuild for boost 1.54.0 - -* Tue Jun 04 2013 Marcel Wysocki - 0.8.5-2 -- spec cleanups -- fix man page permission - -* Sun May 26 2013 Marcel Wysocki - 0.8.5-1 -- initial fedora port