File xone-dongle-firmware.spec of Package xone-dongle-firmware
#
# spec file for package xone-dongle-firmware
#
# Copyright (c) 2025 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-dongle-firmware
Version: 0.1
Release: 0
Summary: Xbox Wireless Controller Adapter firmware downloader
# "Limited Installation License"
License: SUSE-Freeware
URL: https://github.com/medusalix/xone
Source0: xone-dl-firmware
Requires(post): cabextract
Requires(post): wget
BuildArch: noarch
%description
This package provides a script to downlod the Xbox Wireless
Controller Adapter firmware. By installing this package, you
accept Microsoft's terms of use:
https://www.microsoft.com/en-us/legal/terms-of-use
%prep
%build
%install
install -Dm 755 %{SOURCE0} %{buildroot}%{_libexecdir}/xone-dl-firmware
%post
%{_libexecdir}/xone-dl-firmware --skip-disclaimer --no-fail
%postun
if [ "$1" -eq 0 ] && [ -e "/usr/lib/firmware/xow_dongle.bin" ]; then
rm -f /usr/lib/firmware/xow_dongle.bin
fi
%files
%{_libexecdir}/xone-dl-firmware
%changelog