diff --git a/anda/system/xone/akmod/update.rhai b/anda/system/xone/akmod/update.rhai deleted file mode 100644 index 1e2fcbcc56..0000000000 --- a/anda/system/xone/akmod/update.rhai +++ /dev/null @@ -1,13 +0,0 @@ -let c = sh("cat anda/system/xone/kmod-common/xone.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout; -c.pop(); -rpm.global("commit", c); -if rpm.changed() { - rpm.release(); - let d = sh("cat anda/system/xone/kmod-common/xone.spec | grep '%global commitdate' | sed -E 's/.+commitdate //'", #{"stdout": "piped"}).ctx.stdout; - d.pop(); - rpm.global("commitdate", d); - let v = sh("cat anda/system/xone/kmod-common/xone.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout; - v.pop(); - rpm.global("ver", v); -} - diff --git a/anda/system/xone/dkms/update.rhai b/anda/system/xone/dkms/update.rhai deleted file mode 100644 index 1e2fcbcc56..0000000000 --- a/anda/system/xone/dkms/update.rhai +++ /dev/null @@ -1,13 +0,0 @@ -let c = sh("cat anda/system/xone/kmod-common/xone.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout; -c.pop(); -rpm.global("commit", c); -if rpm.changed() { - rpm.release(); - let d = sh("cat anda/system/xone/kmod-common/xone.spec | grep '%global commitdate' | sed -E 's/.+commitdate //'", #{"stdout": "piped"}).ctx.stdout; - d.pop(); - rpm.global("commitdate", d); - let v = sh("cat anda/system/xone/kmod-common/xone.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout; - v.pop(); - rpm.global("ver", v); -} - diff --git a/anda/system/xone/nightly/akmod/anda.hcl b/anda/system/xone/nightly/akmod/anda.hcl new file mode 100644 index 0000000000..517378389d --- /dev/null +++ b/anda/system/xone/nightly/akmod/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + rpm { + spec = "xone-nightly-kmod.spec" + } + labels { + mock = 1 + updbranch = 1 + } +} diff --git a/anda/system/xone/nightly/akmod/update.rhai b/anda/system/xone/nightly/akmod/update.rhai new file mode 100644 index 0000000000..54654a25b3 --- /dev/null +++ b/anda/system/xone/nightly/akmod/update.rhai @@ -0,0 +1,13 @@ +let c = sh("cat anda/system/xone/nightly/kmod-common/xone-nightly.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout; +c.pop(); +rpm.global("commit", c); +if rpm.changed() { + rpm.release(); + let d = sh("cat anda/system/xone/nightly/kmod-common/xone-nightly.spec | grep '%global commitdate' | sed -E 's/.+commitdate //'", #{"stdout": "piped"}).ctx.stdout; + d.pop(); + rpm.global("commitdate", d); + let v = sh("cat anda/system/xone/nightly/kmod-common/xone-nightly.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout; + v.pop(); + rpm.global("ver", v); +} + diff --git a/anda/system/xone/nightly/akmod/xone-nightly-kmod.spec b/anda/system/xone/nightly/akmod/xone-nightly-kmod.spec new file mode 100644 index 0000000000..04be4f8b0b --- /dev/null +++ b/anda/system/xone/nightly/akmod/xone-nightly-kmod.spec @@ -0,0 +1,66 @@ +%global commit 778dbc953b1987d259ea6d802fd6967b6a0d2097 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commitdate 20250718 +%global ver 0.3.4 +%define buildforkernels akmod +%global debug_package %{nil} +%global modulename xone + +Name: %{modulename}-nightly-kmod +Version: %{ver}^%{commitdate}git.%{shortcommit} +Release: 1%?dist +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Epoch: 1 +%endif +Summary: Linux kernel driver for Xbox One and Xbox Series X|S accessories +License: GPL-2.0-or-later +URL: https://github.com/dlundqvist/xone +Source0: %{url}/archive/%{commit}.tar.gz#/%{modulename}-%{shortcommit}.tar.gz +BuildRequires: kmodtool +BuildRequires: systemd-rpm-macros +Requires: %{modulename}-nightly = %{?epoch:%{epoch}:}%{version} +Requires: %{modulename}-nightly-akmod-modules = %{?epoch:%{epoch}:}%{version} +Requires: akmods +Conflicts: dkms-%{modulename}-nightly +Conflicts: %{modulename}-kmod +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Obsoletes: %{name} < %{?epoch:%{epoch}:}3.0^20250419git.c682b0c +%endif +Packager: Gilver E. + +%{expand:%(kmodtool --target %{_target_cpu} --repo terra --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } + +%description +Linux kernel driver for Xbox One and Xbox Series X|S accessories. + +%prep +%{?kmodtool_check} +kmodtool --target %{_target_cpu} --repo terra --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null + +%autosetup -p1 -n %{modulename}-%{commit} + +find . -type f -name '*.c' -exec sed -i "s/#VERSION#/%{version}/" {} \; + +for kernel_version in %{?kernel_versions}; do + mkdir _kmod_build_${kernel_version%%___*} + cp -fr auth bus driver transport Kbuild _kmod_build_${kernel_version%%___*} +done + +%build +for kernel_version in %{?kernel_versions}; do + pushd _kmod_build_${kernel_version%%___*}/ + %make_build -C "${kernel_version##*___}" M=$(pwd) VERSION="v%{version}" modules + popd +done + +%install +for kernel_version in %{?kernel_versions}; do + mkdir -p %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ + install -p -m 0755 _kmod_build_${kernel_version%%___*}/*.ko \ + %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ +done +%{?akmod_install} + +%changelog +* Thu Feb 27 2025 Gilver E. +- Initial package diff --git a/anda/system/xone/nightly/dkms/anda.hcl b/anda/system/xone/nightly/dkms/anda.hcl new file mode 100644 index 0000000000..a3dd636172 --- /dev/null +++ b/anda/system/xone/nightly/dkms/anda.hcl @@ -0,0 +1,10 @@ +project pkg { + arches=["x86_64"] + rpm { + spec = "dkms-xone-nightly.spec" + } + labels { + mock = 1 + updbranch = 1 + } +} diff --git a/anda/system/xone/nightly/dkms/dkms-xone-nightly.spec b/anda/system/xone/nightly/dkms/dkms-xone-nightly.spec new file mode 100644 index 0000000000..504d073fb8 --- /dev/null +++ b/anda/system/xone/nightly/dkms/dkms-xone-nightly.spec @@ -0,0 +1,73 @@ +%global commit 778dbc953b1987d259ea6d802fd6967b6a0d2097 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commitdate 20250718 +%global ver 0.3.4 +%global debug_package %{nil} +%global modulename xone + +Name: dkms-%{modulename}-nightly +Version: %{ver}^%{commitdate}git.%{shortcommit} +Release: 1%?dist +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Epoch: 1 +%endif +Summary: Linux kernel driver for Xbox One and Xbox Series X|S accessories +License: GPL-2.0-or-later +URL: https://github.com/dlundqvist/xone +Source0: %{url}/archive/%{commit}.tar.gz#/%{modulename}-%{shortcommit}.tar.gz +Source1: no-weak-modules.conf +BuildRequires: sed +BuildRequires: systemd-rpm-macros +Requires: %{modulename}-nightly = %{?epoch:%{epoch}:}%{version} +Requires: dkms +Conflicts: akmod-%{modulename}-nightly +Conflicts: %{modulename}-kmod +Provides: %{modulename}-nightly-kmod = %{?epoch:%{epoch}:}%{version} +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Obsoletes: dkms-%{modulename} < %{?epoch:%{epoch}:}3.0^20250419git.c682b0c +%endif +BuildArch: noarch +Packager: Gilver E. + +%description +Linux kernel driver for Xbox One and Xbox Series X|S accessories. + +%prep +%autosetup -p1 -n %{modulename}-%{commit} + +sed -i \ + -e 's|#VERSION#|%{version}|g' \ + -e 's|kernel/drivers/input/joystick|extra|g' \ + dkms.conf + +find . -type f -name '*.c' -exec sed -i "s/#VERSION#/%{version}/" {} \; + +%install +# Create empty tree: +mkdir -p %{buildroot}%{_usrsrc}/%{modulename}-%{version}/ +cp -fr auth bus driver transport Kbuild dkms.conf %{buildroot}%{_usrsrc}/%{modulename}-%{version}/ + +%if 0%{?fedora} +# Do not enable weak modules support in Fedora (no kABI): +install -Dpm644 %{SOURCE1} %{buildroot}%{_sysconfdir}/dkms/%{modulename}.conf +%endif + +%post +dkms add -m %{modulename} -v %{version} -q --rpm_safe_upgrade || : +# Rebuild and make available for the currently running kernel: +dkms build -m %{modulename} -v %{version} -q || : +dkms install -m %{modulename} -v %{version} -q --force || : + +%preun +# Remove all versions from DKMS registry: +dkms remove -m %{modulename} -v %{version} -q --all --rpm_safe_upgrade || : + +%files +%{_usrsrc}/%{modulename}-%{version} +%if 0%{?fedora} +%{_sysconfdir}/dkms/%{modulename}.conf +%endif + +%changelog +* Thu Feb 27 2025 Gilver E. +- Initial package diff --git a/anda/system/xone/dkms/no-weak-modules.conf b/anda/system/xone/nightly/dkms/no-weak-modules.conf similarity index 100% rename from anda/system/xone/dkms/no-weak-modules.conf rename to anda/system/xone/nightly/dkms/no-weak-modules.conf diff --git a/anda/system/xone/nightly/dkms/update.rhai b/anda/system/xone/nightly/dkms/update.rhai new file mode 100644 index 0000000000..54654a25b3 --- /dev/null +++ b/anda/system/xone/nightly/dkms/update.rhai @@ -0,0 +1,13 @@ +let c = sh("cat anda/system/xone/nightly/kmod-common/xone-nightly.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout; +c.pop(); +rpm.global("commit", c); +if rpm.changed() { + rpm.release(); + let d = sh("cat anda/system/xone/nightly/kmod-common/xone-nightly.spec | grep '%global commitdate' | sed -E 's/.+commitdate //'", #{"stdout": "piped"}).ctx.stdout; + d.pop(); + rpm.global("commitdate", d); + let v = sh("cat anda/system/xone/nightly/kmod-common/xone-nightly.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout; + v.pop(); + rpm.global("ver", v); +} + diff --git a/anda/system/xone/kmod-common/anda.hcl b/anda/system/xone/nightly/kmod-common/anda.hcl similarity index 77% rename from anda/system/xone/kmod-common/anda.hcl rename to anda/system/xone/nightly/kmod-common/anda.hcl index bda7b47c56..1e901fb5d0 100644 --- a/anda/system/xone/kmod-common/anda.hcl +++ b/anda/system/xone/nightly/kmod-common/anda.hcl @@ -1,7 +1,7 @@ project pkg { arches = ["x86_64"] rpm { - spec = "xone.spec" + spec = "xone-nightly.spec" } labels { nightly = 1 diff --git a/anda/system/xone/kmod-common/modules.conf b/anda/system/xone/nightly/kmod-common/modules.conf similarity index 100% rename from anda/system/xone/kmod-common/modules.conf rename to anda/system/xone/nightly/kmod-common/modules.conf diff --git a/anda/system/xone/kmod-common/update.rhai b/anda/system/xone/nightly/kmod-common/update.rhai similarity index 63% rename from anda/system/xone/kmod-common/update.rhai rename to anda/system/xone/nightly/kmod-common/update.rhai index 805632e47a..bf0ec4fdfe 100644 --- a/anda/system/xone/kmod-common/update.rhai +++ b/anda/system/xone/nightly/kmod-common/update.rhai @@ -1,8 +1,9 @@ rpm.global("commit", gh_commit("dlundqvist/xone")); if rpm.changed() { + import "andax/bump_extras.rhai" as bump; rpm.release(); rpm.global("commitdate", date()); - let ver = gh_tag("dlundqvist/xone"); + let ver = bump::madoguchi("xone", labels.branch); ver.crop(1); rpm.global("ver", ver); } diff --git a/anda/system/xone/nightly/kmod-common/xone-nightly.spec b/anda/system/xone/nightly/kmod-common/xone-nightly.spec new file mode 100644 index 0000000000..545865cc88 --- /dev/null +++ b/anda/system/xone/nightly/kmod-common/xone-nightly.spec @@ -0,0 +1,122 @@ +%global commit 778dbc953b1987d259ea6d802fd6967b6a0d2097 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commitdate 20250718 +%global ver 0.3.4 +%global modulename xone +%global _dracutconfdir %{_prefix}/lib/dracut/dracut.conf.d +%global firmware_hash0 48084d9fa53b9bb04358f3bb127b7495dc8f7bb0b3ca1437bd24ef2b6eabdf66 +%global firmware_hash1 080ce4091e53a4ef3e5fe29939f51fd91f46d6a88be6d67eb6e99a5723b3a223 + +Name: xone-nightly +Version: %{ver}^%{commitdate}git.%{shortcommit} +Release: 1%?dist +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Epoch: 1 +%endif +Summary: Linux kernel driver for Xbox One and Xbox Series X|S accessories common files +License: GPL-2.0-or-later +URL: https://github.com/dlundqvist/xone +Source0: %{url}/archive/%{commit}.tar.gz#/xone-%{shortcommit}.tar.gz +Source1: modules.conf +### Windows drivers and firmware files: +Source2: http://download.windowsupdate.com/c/msdownload/update/driver/drvs/2017/07/1cd6a87c-623f-4407-a52d-c31be49e925c_e19f60808bdcbfbd3c3df6be3e71ffc52e43261e.cab +Source3: https://catalog.s.download.windowsupdate.com/d/msdownload/update/driver/drvs/2015/12/20810869_8ce2975a7fbaa06bcfb0d8762a6275a1cf7c1dd3.cab +### Microsoft TOU copy: +Source4: https://www.microsoft.com/en-us/legal/terms-of-use +BuildRequires: cabextract +BuildRequires: sed +BuildRequires: systemd-rpm-macros +Requires: wireless-regdb +Requires: %{name}-firmware = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: %{name}-kmod = %{?epoch:%{epoch}:}%{version} +Requires(post): dracut +Provides: %{name}-kmod-common = %{?epoch:%{epoch}:}%{version} +Conflicts: %{modulename} +Conflicts: xow <= 0.5 +Obsoletes: xow <= 0.5 +BuildArch: noarch +Packager: Gilver E. + +%description +Linux kernel driver for Xbox One and Xbox Series X|S accessories common files. + +%package akmod-modules +Summary: Modules for Akmods +Requires: akmod-%{name} +BuildArch: noarch + +%description akmod-modules +Akmods modules for the akmod-%{name} package. + +%package firmware +Summary: Firmware for the XBox One controller dongle +License: Proprietary +Requires: wireless-regdb +BuildArch: noarch + +%description firmware +Proprietary firmware for XBox controller dongles. + +%prep +%autosetup -p1 -n %{modulename}-%{commit} +/usr/bin/cp %{SOURCE4} . +/usr/bin/sed -nE '/^BUILT_MODULE_NAME/{s@^.+"(.+)"@\1@; s|-|_|g; p}' dkms.conf > %{modulename}.conf + +### Firmware: +# The .bin files have the same name so put them in subdirs +mkdir firm{0..1} + +pushd firm0 +cabextract -F FW_ACC_00U.bin %{SOURCE2} +echo %{firmware_hash0} FW_ACC_00U.bin | sha256sum -c +popd + +pushd firm1 +cabextract -F FW_ACC_00U.bin %{SOURCE3} +echo %{firmware_hash1} FW_ACC_00U.bin | sha256sum -c +popd + +%install +# xone-gip-headset module should have the snd-pcm and snd-seq modules be preloaded or it will give errors on boot due to injecting late. +# It still loads afterwards, but this error is easily fixable by just loading the modules in the initramfs. +install -Dpm644 %{SOURCE1} %{buildroot}%{_dracutconfdir}/60-%{modulename}-snd.conf + +# Blacklist: +install -Dpm644 install/modprobe.conf %{buildroot}%{_modprobedir}/60-%{modulename}.conf + +# Firmware: +install -Dpm644 firm0/FW_ACC_00U.bin %{buildroot}%{_prefix}/lib/firmware/xow_dongle.bin +install -Dpm644 firm1/FW_ACC_00U.bin %{buildroot}%{_prefix}/lib/firmware/xow_dongle_045e_02e6.bin + +# Akmods modules +install -Dm644 %{modulename}.conf -t %{buildroot}%{_modulesloaddir} + +%files +%license LICENSE +%doc README.md +%{_modprobedir}/60-%{modulename}.conf +%{_dracutconfdir}/60-%{modulename}-snd.conf + +%files akmod-modules +%{_modulesloaddir}/%{modulename}.conf + +%files firmware +%license terms-of-use +%{_prefix}/lib/firmware/xow_dongle.bin +%{_prefix}/lib/firmware/xow_dongle_045e_02e6.bin + +%post +/usr/bin/dracut -f + +%postun +/usr/bin/dracut -f + +%post firmware +echo "The firmware for the wireless dongle is subject to Microsoft's Terms of Use:" +echo 'https://www.microsoft.com/en-us/legal/terms-of-use' + +%changelog +* Thu Apr 17 2025 Gilver E. - 0.3^20250418git.ecdd59e-2%{?dist} +- Added additional firmware needed for dongle pairing on some controllers +* Thu Feb 27 2025 Gilver E. +- Initial package diff --git a/anda/system/xone/akmod/anda.hcl b/anda/system/xone/stable/akmod/anda.hcl similarity index 100% rename from anda/system/xone/akmod/anda.hcl rename to anda/system/xone/stable/akmod/anda.hcl diff --git a/anda/system/xone/stable/akmod/update.rhai b/anda/system/xone/stable/akmod/update.rhai new file mode 100644 index 0000000000..a6404f6cf3 --- /dev/null +++ b/anda/system/xone/stable/akmod/update.rhai @@ -0,0 +1,4 @@ +import "andax/bump_extras.rhai" as bump; + +rpm.version(bump::madoguchi("xone", labels.branch)); + diff --git a/anda/system/xone/akmod/xone-kmod.spec b/anda/system/xone/stable/akmod/xone-kmod.spec similarity index 80% rename from anda/system/xone/akmod/xone-kmod.spec rename to anda/system/xone/stable/akmod/xone-kmod.spec index abc2a3e58f..75983112a7 100644 --- a/anda/system/xone/akmod/xone-kmod.spec +++ b/anda/system/xone/stable/akmod/xone-kmod.spec @@ -1,30 +1,26 @@ -%global commit 778dbc953b1987d259ea6d802fd6967b6a0d2097 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global commitdate 20250718 -%global ver 0.3.4 %define buildforkernels akmod %global debug_package %{nil} %global modulename xone Name: %{modulename}-kmod -Version: %{ver}^%{commitdate}git.%{shortcommit} +Version: 0.3.4 Release: 1%?dist %if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 -Epoch: 1 +Epoch: 2 %endif Summary: Linux kernel driver for Xbox One and Xbox Series X|S accessories License: GPL-2.0-or-later URL: https://github.com/dlundqvist/xone -Source0: %{url}/archive/%{commit}.tar.gz#/%{modulename}-%{shortcommit}.tar.gz +Source0: %{url}/archive/refs/tags/v%{version}.tar.gz BuildRequires: kmodtool BuildRequires: systemd-rpm-macros Requires: %{modulename} = %{?epoch:%{epoch}:}%{version} Requires: %{modulename}-akmod-modules = %{?epoch:%{epoch}:}%{version} Requires: akmods Conflicts: dkms-%{modulename} +Conflicts: %{modulename}-nightly-kmod %if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 -Conflicts: %{name} < %{?epoch:%{epoch}:}3.0^20250419git.c682b0c -Obsoletes: %{name} < %{?epoch:%{epoch}:}3.0^20250419git.c682b0c +Obsoletes: %{name} < %{?epoch:%{epoch}:}0.3.4 %endif Packager: Gilver E. @@ -37,7 +33,7 @@ Linux kernel driver for Xbox One and Xbox Series X|S accessories. %{?kmodtool_check} kmodtool --target %{_target_cpu} --repo terra --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null -%autosetup -p1 -n %{modulename}-%{commit} +%autosetup -p1 -n %{modulename}-%{version} find . -type f -name '*.c' -exec sed -i "s/#VERSION#/%{version}/" {} \; diff --git a/anda/system/xone/dkms/anda.hcl b/anda/system/xone/stable/dkms/anda.hcl similarity index 100% rename from anda/system/xone/dkms/anda.hcl rename to anda/system/xone/stable/dkms/anda.hcl diff --git a/anda/system/xone/dkms/dkms-xone.spec b/anda/system/xone/stable/dkms/dkms-xone.spec similarity index 78% rename from anda/system/xone/dkms/dkms-xone.spec rename to anda/system/xone/stable/dkms/dkms-xone.spec index 7155585609..54352a63be 100644 --- a/anda/system/xone/dkms/dkms-xone.spec +++ b/anda/system/xone/stable/dkms/dkms-xone.spec @@ -1,29 +1,26 @@ -%global commit 778dbc953b1987d259ea6d802fd6967b6a0d2097 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global commitdate 20250718 -%global ver 0.3.4 %global debug_package %{nil} %global modulename xone Name: dkms-%{modulename} -Version: %{ver}^%{commitdate}git.%{shortcommit} +Version: 0.3.4 Release: 1%?dist %if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 -Epoch: 1 +Epoch: 2 %endif Summary: Linux kernel driver for Xbox One and Xbox Series X|S accessories License: GPL-2.0-or-later URL: https://github.com/dlundqvist/xone -Source0: %{url}/archive/%{commit}.tar.gz#/%{modulename}-%{shortcommit}.tar.gz +Source0: %{url}/archive/refs/tags/v%{version}.tar.gz Source1: no-weak-modules.conf BuildRequires: sed BuildRequires: systemd-rpm-macros Requires: %{modulename} = %{?epoch:%{epoch}:}%{version} Requires: dkms Conflicts: akmod-%{modulename} +Conflicts: %{modulename}-nightly-kmod +Provides: %{modulename}-kmod %if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 -Conflicts: %{name} < %{?epoch:%{epoch}:}3.0^20250419git.c682b0c -Obsoletes: %{name} < %{?epoch:%{epoch}:}3.0^20250419git.c682b0c +Obsoletes: %{name} < %{?epoch:%{epoch}:}0.3.4 %endif BuildArch: noarch Packager: Gilver E. @@ -32,7 +29,7 @@ Packager: Gilver E. Linux kernel driver for Xbox One and Xbox Series X|S accessories. %prep -%autosetup -p1 -n %{modulename}-%{commit} +%autosetup -p1 -n %{modulename}-%{version} sed -i \ -e 's|#VERSION#|%{version}|g' \ diff --git a/anda/system/xone/stable/dkms/no-weak-modules.conf b/anda/system/xone/stable/dkms/no-weak-modules.conf new file mode 100644 index 0000000000..24f6f95c96 --- /dev/null +++ b/anda/system/xone/stable/dkms/no-weak-modules.conf @@ -0,0 +1 @@ +NO_WEAK_MODULES="yes" diff --git a/anda/system/xone/stable/dkms/update.rhai b/anda/system/xone/stable/dkms/update.rhai new file mode 100644 index 0000000000..a6404f6cf3 --- /dev/null +++ b/anda/system/xone/stable/dkms/update.rhai @@ -0,0 +1,4 @@ +import "andax/bump_extras.rhai" as bump; + +rpm.version(bump::madoguchi("xone", labels.branch)); + diff --git a/anda/system/xone/stable/kmod-common/anda.hcl b/anda/system/xone/stable/kmod-common/anda.hcl new file mode 100644 index 0000000000..522c9daf57 --- /dev/null +++ b/anda/system/xone/stable/kmod-common/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "xone.spec" + } +} diff --git a/anda/system/xone/stable/kmod-common/modules.conf b/anda/system/xone/stable/kmod-common/modules.conf new file mode 100644 index 0000000000..776e9eff4f --- /dev/null +++ b/anda/system/xone/stable/kmod-common/modules.conf @@ -0,0 +1 @@ +add_drivers+=" snd-pcm snd-seq " diff --git a/anda/system/xone/stable/kmod-common/update.rhai b/anda/system/xone/stable/kmod-common/update.rhai new file mode 100644 index 0000000000..2866b2646c --- /dev/null +++ b/anda/system/xone/stable/kmod-common/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("dlundqvist/xone")); diff --git a/anda/system/xone/kmod-common/xone.spec b/anda/system/xone/stable/kmod-common/xone.spec similarity index 87% rename from anda/system/xone/kmod-common/xone.spec rename to anda/system/xone/stable/kmod-common/xone.spec index 76345c6819..705952b322 100644 --- a/anda/system/xone/kmod-common/xone.spec +++ b/anda/system/xone/stable/kmod-common/xone.spec @@ -1,21 +1,17 @@ -%global commit 778dbc953b1987d259ea6d802fd6967b6a0d2097 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global commitdate 20250718 -%global ver 0.3.4 %global _dracutconfdir %{_prefix}/lib/dracut/dracut.conf.d %global firmware_hash0 48084d9fa53b9bb04358f3bb127b7495dc8f7bb0b3ca1437bd24ef2b6eabdf66 %global firmware_hash1 080ce4091e53a4ef3e5fe29939f51fd91f46d6a88be6d67eb6e99a5723b3a223 Name: xone -Version: %{ver}^%{commitdate}git.%{shortcommit} +Version: 0.3.4 Release: 1%?dist %if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 -Epoch: 1 +Epoch: 2 %endif Summary: Linux kernel driver for Xbox One and Xbox Series X|S accessories common files License: GPL-2.0-or-later URL: https://github.com/dlundqvist/xone -Source0: %{url}/archive/%{commit}.tar.gz#/xone-%{shortcommit}.tar.gz +Source0: %{url}/archive/refs/tags/v%{version}.tar.gz Source1: modules.conf ### Windows drivers and firmware files: Source2: http://download.windowsupdate.com/c/msdownload/update/driver/drvs/2017/07/1cd6a87c-623f-4407-a52d-c31be49e925c_e19f60808bdcbfbd3c3df6be3e71ffc52e43261e.cab @@ -27,14 +23,14 @@ BuildRequires: sed BuildRequires: systemd-rpm-macros Requires: wireless-regdb Requires: %{name}-firmware = %{?epoch:%{epoch}:}%{version}-%{release} -Requires: (akmod-%{name} = %{?epoch:%{epoch}:}%{version} or dkms-%{name} = %{?epoch:%{epoch}:}%{version}) +Requires: %{name}-kmod = %{?epoch:%{epoch}:}%{version} Requires(post): dracut Provides: %{name}-kmod-common = %{?epoch:%{epoch}:}%{version} +Conflicts: %{name}-nightly Conflicts: xow <= 0.5 Obsoletes: xow <= 0.5 %if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 -Conflicts: %{name} < %{?epoch:%{epoch}:}0.3^20250419git.c682b0c -Obsoletes: %{name} < %{?epoch:%{epoch}:}0.3^20250419git.c682b0c +Obsoletes: %{name} < %{?epoch:%{epoch}:}0.3.4 %endif BuildArch: noarch Packager: Gilver E. @@ -63,7 +59,7 @@ BuildArch: noarch Proprietary firmware for XBox controller dongles. %prep -%autosetup -p1 -n %{name}-%{commit} +%autosetup -p1 -n %{name}-%{version} /usr/bin/cp %{SOURCE4} . /usr/bin/sed -nE '/^BUILT_MODULE_NAME/{s@^.+"(.+)"@\1@; s|-|_|g; p}' dkms.conf > %{name}.conf