We've got some updates regarding OBS and GitHub/GitLab integration. Have a look and let us know what you think! 🧐


File xboxdrv.spec of Package xboxdrv-git

# spec file for package 
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/

# norootforbuild

%{!?__python3: %global __python3 /usr/bin/python3}
%{!?python3_sitelib: %global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?py3_build: %global py3_build CFLAGS="%{optflags}" %{__python3} setup.py build}
%{!?py3_install: %global py3_install %{__python3} setup.py install --skip-build --root %{buildroot}}

%define branch develop

Name:           xboxdrv
Version:	0.8.8
Release:	4.1
License:	GPL-3.0+
Summary:	Userspace Xbox/Xbox360 USB Gamepad Driver for Linux
Url:		http://pingus.seul.org/~grumbel/xboxdrv
Group:		Hardware/Joystick
Source:		%{name}-linux-%{version}.tar.bz2
Source1:        50-xpad.conf
Source2:        %{name}.conf
Source3:        %{name}.service
# PATCH-FIX-UPSTREAM xboxdrv-fix-delay.patch -- Fix 60 seconds delay, from https://github.com/xboxdrv/xboxdrv/pull/214
Patch0:         %{name}-fix-delay.patch
# PATCH-FIX-UPSTREAM xboxdrv-scons3.patch -- Fix build with python, from https://github.com/xboxdrv/xboxdrv/pull/240
Patch1:         xboxdrv-scons3.patch
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig
BuildRequires:  scons
BuildRequires:  python-devel
BuildRequires:  pkgconfig(dbus-glib-1)
BuildRequires:  pkgconfig(libudev)
BuildRequires:  pkgconfig(libusb-1.0)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(bluez)
BuildRequires:  gtk2-devel
BuildRequires:  libcwiid-devel
%if 0%{?suse_version} > 1500
# Tumbleweed
BuildRequires:  pkgconfig(pango)
%if 0%{?suse_version} > 1320
BuildRequires:  libboost_headers-devel
Requires:       python2-dbus-python
BuildRequires:  boost-devel
Requires:       dbus-1-python
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

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. The Xbox360 guitar and some Xbox1 dancemats might work too. The Xbox360 racing wheel is not supported, but shouldn't be to hard to add if somebody is interested.

%setup -q -n %{name}-linux-%{version}
%if %{branch} == stable
%patch0 -p1
%patch1 -p1
cp -f %{SOURCE1} 50-xpad.conf
cp -f %{SOURCE2} %{name}.conf
cp -f %{SOURCE3} %{name}.service

tee custom.py << EOF
CCFLAGS = "%{optflags}"

%if %{branch} == stable
scons %{?_smp_mflags}
mkdir build
cd build
cmake ..

%if %{branch} == stable
%make_install PREFIX=%{_prefix}
chmod a-x %{buildroot}%{_mandir}/man1/%{name}.1
cd build
%make_install PREFIX=%{_prefix}
cd ..

install -Dpm 0644 50-xpad.conf \

install -Dpm 0644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf
install -Dpm 0644 %{name}.service %{buildroot}%{_unitdir}/%{name}.service

mkdir -p %{buildroot}%{_sbindir}/
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}

%{?buildroot:%__rm -rf "%{buildroot}"}

%service_add_pre %{name}.service

%service_add_post %{name}.service

%service_del_preun %{name}.service

%service_del_postun %{name}.service

%config(noreplace) %{_sysconfdir}/%{name}.conf
%dir %{_sysconfdir}/modprobe.d/
%config %{_sysconfdir}/modprobe.d/50-xpad.conf
%if %{branch} == stable


%dir %{_prefix}/local/share/man
%dir %{_prefix}/local/share/man/man1

* Mon Nov 09 2015 Ivan <cain1986@gmail.com> 0.8.8
- use session dbus even for user root, except when DISPLAY is not set
- fixed issue in to_float() triggering assert()
- fixed vendor/product not getting set for virtual device in daemon mode
- fixed \r\n newlines causing errors in INIParser, ignore \r like whitespace
- added device support for Rock Candy Gamepad Wired Controller, Mad
  Catz Street Fighter IV SE Fighting Stick, MadCatz GamePad, Hori
  Fighting Edge, Elcom JC-U3613M, Mad Catz Fightpad, Mad Cats Ghost
  Recon FS GamePad, Mad Catz SFxT Fightstick Pro, Razer Sabertooth,
  FUS1ON Tournament Controller, PowerA Pro Ex and others
* Wed Oct 28 2015 Ivan <cain1986@gmail.com> 0.8.7
- fixed USB cleanup issue on exit
* Fri Jun 06 2014 David Lara <dvlara@gmail.com> 0.8.6-1
- fixed segfault due to incorrect shutdown of USB subsystem
* Wed Jan 01 2014 David Lara <dvlara@gmail.com> 0.8.5-3
- Added option to script to make controller compatible with Steam BigPicture
* Sat Sep 28 2013 David Lara <dvlara@gmail.com> 0.8.5-2
- Added script to load xboxdrv driver on boot (use systemctl tool or Yast to enable)
* Sat May 04 2013 David Lara <dvlara@gmail.com> 0.8.5-1
- Updated to version 0.8.5
* Tue Mar 13 2012 David Lara <dvlara@gmail.com> 0.8.4-1
- First release for OpenSUSE
openSUSE Build Service is sponsored by