%define srcname mtkclient Name: python-mtkclient Version: 2.0.1 Release: 1%{?dist} Summary: Unofficial MTK reverse engineering and flash tool Group: Development/Python License: GPL-3.0 URL: https://github.com/bkerler/mtkclient Source0: %{url}/archive/refs/tags/%{name}-%{version}.tar.gz#/%{srcname}-%{version}.tar.gz Requires: libusb1.0_0 Requires: libfuse3_3 Requires: python3dist(pyusb) Requires: python3dist(pyserial) Requires: python3dist(fusepy) Requires: python3dist(pycryptodome) Requires: python3dist(pycryptodomex) Requires: python3dist(colorama) Requires: python3dist(mock) Requires: python BuildRequires: python3dist(build) BuildRequires: python3dist(installer) BuildRequires: python3dist(wheel) BuildRequires: python3dist(setuptools) BuildArch: noarch %description Unofficial MTK reverse engineering and flash tool %package -n python3-mtkclient Summary: %{summary} %description -n python3-mtkclient Unofficial MTK reverse engineering and flash tool %prep %autosetup -n %{srcname}-%{version} # Remove bundled egg-info rm -rf %{name}.egg-info %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %pyproject_save_files mtkclient %install %pyproject_install install -Dm644 mtkclient/Setup/Linux/51-edl.rules "%{buildroot}%{_libdir}/udev/rules.d/52-mtk-edl.rules" %if %{with check} %check %pyproject_check_import %pytest %endif %files -n python3-mtkclient -f %{pyproject_files} %license LICENSE %doc README.md %{_bindir}/mtkclient %{_libdir}/udev/rules.d/52-mtk-edl.rules %{python3_sitelib}/%{name} %{python3_sitelib}/%{name}-*.egg-info