%global pypi_name mtkclient %define dl_ver 1.9 %global pypi_version 1.55 %define debug_package %{nil} Name: python-%{pypi_name} Version: %{pypi_version} Release: %mkrel 1 Summary: Mediatek reverse engineering and flashing tools Group: Development/Python License: GPLv3 URL: https://github.com/bkerler/mtkclient Source0: https://github.com/bkerler/mtkclient/archive/refs/tags/%{dl_ver}/%{pypi_name}-%{pypi_version}.tar.gz ExclusiveArch: i586 x86_64 aarch64 Patch0: usb.patch BuildRequires: python3-devel BuildRequires: python3dist(setuptools) %description An MediaTek tool for exploitation, reading/writing flash and doing crazy stuff. For linux, a patched kernel is only needed when using old kamakiri (see Setup folder) (except for read/write flash). Once the MTK script is running, boot into brom mode by powering off device, press and hold either vol up + power or vol down + power and connect the phone. Once detected by the tool, release the buttons. %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} Requires: python3dist(colorama) Requires: python3dist(pycryptodome) Requires: python3dist(pyusb) Requires: python3dist(usb) Requires: python3dist(pyside2) %description -n python3-%{pypi_name} An MediaTek tool for exploitation, reading/writing flash and doing crazy stuff. Once the MTK script is running, boot into brom mode by powering off device, press and hold either vol up + power or vol down + power and connect the phone. Once detected by the tool, release the buttons. %prep %autosetup -n %{pypi_name}-%{dl_ver} %build %py3_build %install %py3_install %__rm %{buildroot}%{_prefix}/README.md %__rm %{buildroot}%{_prefix}/LICENSE %files -n python3-%{pypi_name} %license LICENSE %doc README.md %{_bindir}/mtk %{_bindir}/stage2 %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info