Name: esptool Version: 1.1 Release: 1%{?dist} Summary: A utility to communicate with the ROM bootloader in Espressif ESP8266 License: GPLv2+ URL: https://github.com/themadinventor/%{name} Source0: https://files.pythonhosted.org/packages/source/e/%{name}/%{name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: python-flake8 Requires: pyserial Provides: %{name}.py = %{version}-%{release} %description %{name}.py A command line utility to communicate with the ROM bootloader in Espressif ESP8266 WiFi microcontroller. Allows flashing firmware, reading back firmware, querying chip parameters, etc. Developed by the community, not by Espressif Systems. %prep %autosetup sed -i 's|#!/usr/bin/env python|#!%{__python2}|' %{name}.py sed -i 2d %{name}.py %build %py2_build %install %py2_install ln -s ./%{name}.py %{buildroot}%{_bindir}/%{name} # Shebang in site-packages sed -i 1d %{buildroot}%{python2_sitelib}/%{name}.py %files %license LICENSE %doc README.md %{_bindir}/%{name} %{_bindir}/%{name}.py %{python2_sitelib}/%{name}.py* %{python2_sitelib}/%{name}-%{version}-py?.?.egg-info %changelog * Tue Sep 06 2016 Miro HronĨok - 1.1-1 - Initial package.