diff --git a/.gitignore b/.gitignore index e69de29..9293408 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/esptool-1.1.tar.gz diff --git a/esptool.spec b/esptool.spec new file mode 100644 index 0000000..b236f1d --- /dev/null +++ b/esptool.spec @@ -0,0 +1,49 @@ +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. diff --git a/sources b/sources index e69de29..bf195ec 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +3e0489b32f525082fa1a6c16d94b94b1 esptool-1.1.tar.gz