Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lighthomo
xone
xone.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xone.spec of Package xone
# # spec file for package xone # # Copyright (c) 2023 SUSE LLC # # 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 https://bugs.opensuse.org/ # Name: xone Version: 0.0.0 Release: 0 Summary: Linux kernel driver for Xbox One and Xbox Series X|S accessories # FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses License: GPL-2.0-or-later URL: https://github.com/medusalix Source: _service BuildRequires: %{kernel_module_package_buildreqs} BuildRequires: libelf-devel BuildRequires: pkgconfig(libsystemd) Requires: curl Requires: cabextract Requires: coreutils Requires: %{name}-kmp Conflicts: xow <= 0.5 Obsoletes: xow <= 0.5 Provides:kmod(xone_wired.ko) Provides:kmod(xone_dongle.ko) Provides:kmod(xone_gip.ko) Provides:kmod(xone_gip_gamepad.ko) Provides:kmod(xone_gip_headset.ko) Provides:kmod(xone_gip_chatpad.ko) Provides:kmod(xone_gip_madcatz_glam.ko) Provides:kmod(xone_gip_madcatz_strat.ko) Provides:kmod(xone_gip_pdp_jaguar.ko) %kernel_module_package %description xone is a Linux kernel driver for Xbox One and Xbox Series X|S accessories. It serves as a modern replacement for xpad, aiming to be compatible with Microsoft's Game Input Protocol (GIP) ✔️Wired devices (via USB) ✔️Wireless devices (with Xbox Wireless Dongle) ❌Bluetooth devices (check out xpadneo) %prep %setup -q -n %_sourcedir/%name-%version -T -D %__ln -s %_sourcedir/%name-%version %_builddir/%_sourcedir cat dkms.conf|grep BUILT_MODULE_NAME |awk -F '"' '{print $2}' > %{name}.conf set -- * mkdir source mv "$@" source/ mkdir obj %build # Build the driver kernel module for flavor in %flavors_to_build; do rm -rf obj/$flavor cp -r source obj/$flavor make -C %{kernel_source $flavor} modules M=$PWD/obj/$flavor done %install # Install the driver kernel module export INSTALL_MOD_PATH=%{buildroot} export INSTALL_MOD_DIR=drivers/input/joystick for flavor in %{flavors_to_build}; do make -C %{kernel_source $flavor} %{?linux_make_arch} modules_install M=$PWD/obj/$flavor done install -D -m 0644 source/install/modprobe.conf %{buildroot}%{_modprobedir}/60-%{name}.conf install -D -m 0644 source/%{name}.conf %{buildroot}%{_modulesloaddir}/%{name}.conf %post if [ -x "$(command -v curl)" ];then if [ ! -f "/lib/firmware/xow_dongle.bin" ]; then # After installation, download the firmware mkdir -p /tmp/microsoft cd /tmp/microsoft driver_url='http://download.windowsupdate.com/c/msdownload/update/driver/drvs/2017/07/1cd6a87c-623f-4407-a52d-c31be49e925c_e19f60808bdcbfbd3c3df6be3e71ffc52e43261e.cab' firmware_hash='48084d9fa53b9bb04358f3bb127b7495dc8f7bb0b3ca1437bd24ef2b6eabdf66' curl -L -o driver.cab "$driver_url" cabextract -F FW_ACC_00U.bin driver.cab echo "$firmware_hash" FW_ACC_00U.bin | sha256sum -c cp -f FW_ACC_00U.bin /lib/firmware/xow_dongle.bin rm -rf "/tmp/microsoft" fi fi %preun if [ "$1" = 0 ]; then # Remove xone modules=$(lsmod | grep '^xone_' | cut -d ' ' -f 1 | tr '\n' ' ') if [ -n "$modules" ]; then echo "Unloading modules: $modules..." modprobe -r -a $modules fi # Remove system firmware rm -rf "/lib/firmware/xow_dongle.bin" fi %files %license source/LICENSE %doc source/README.md %{_modprobedir}/60-%{name}.conf %{_modulesloaddir}/%{name}.conf %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor