File qmk.spec of Package qmk

#
# spec file for package qmk
#
# 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/
#


%define force_gcc_version 14
%define pythons python3
%define _qmk_firmware_udev d915ab59ac2d05062f931a36463c1a84b57a2438
Name:           qmk
Version:        1.1.5
Release:        0
Summary:        QMK helper CLI
License:        MIT
URL:            https://qmk.fm/
Source:         https://github.com/qmk/qmk_cli/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1:        https://github.com/qmk/qmk_firmware/blob/%{_qmk_firmware_udev}/util/udev/50-qmk.rules
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
BuildRequires:  python3-build
BuildRequires:  python3-installer
BuildRequires:  python3-pip
BuildRequires:  python3-setuptools
BuildRequires:  python3-wheel

Requires:       arm-none-eabi-gcc >= 14
Requires:       cross-arm-none-gcc%{?force_gcc_version}
Requires:       cross-avr-gcc%{?force_gcc_version}

Requires:       avr-libc
Requires:       avrdude
Requires:       dfu-programmer
Requires:       dfu-util
Requires:       git
Requires:       python3-Pillow
Requires:       python3-appdirs
Requires:       python3-dotty-dict
Requires:       python3-hid
Requires:       python3-hidapi
Requires:       python3-hjson
Requires:       python3-jsonschema >= 4
Requires:       python3-milc >= 1.6.8
Requires:       python3-pygments
Requires:       python3-pyserial
Requires:       python3-pyusb
Recommends:     awk
Recommends:     diffutils
Recommends:     make
Recommends:     unzip
Recommends:     wget
BuildArch:      noarch
ExclusiveArch:  i386 i586 amd64 arm arm64 aarch64 x86_64

%description
A program to help users work with QMK Firmware.

%prep
%autosetup -p1 -n qmk_cli-%{version}

%build
%pyproject_wheel

%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
install -Dm0644 %{SOURCE1} %{buildroot}%{_udevrulesdir}/50-qmk.rules

%files
%license LICENSE
%doc README.md
%{_bindir}/qmk
%{python3_sitelib}/qmk-%{version}.*
%{python3_sitelib}/qmk_cli/
%{_udevrulesdir}/50-qmk.rules

%changelog
openSUSE Build Service is sponsored by