File xone-dongle-firmware.spec of Package xone-dongle-firmware
#
# spec file for package xone-dongle-firmware
#
# Copyright (c) 2024 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
License: Custom
URL: https://github.com/medusalix/xone
Source0: xone-dl-firmware
Requires: cabextract
Requires: wget
BuildArch: noarch
%description
Xbox Wireless Controller Adapter firmware.
%prep
%build
%install
install -Dm 755 %{SOURCE0} %{buildroot}/usr/bin/xone-dl-firmware
%post
/usr/bin/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
/usr/bin/xone-dl-firmware
%changelog