# Maintainer: Jelle van der Waa <jelle@vdwaa.nl>
# Contributor: Marcin (CTRL) Wieczorek <marcin@marcin.co>
# Contributor: Marcin Kornat <rarvolt+aur@gmail.com>
# Contributor: MatejSpindler <spindler.matej@gmail.com>

pkgname=esptool
pkgver=3.1
pkgrel=1
pkgdesc="A cute Python utility to communicate with the ROM bootloader in Espressif ESP8266"
arch=('any')
url="https://github.com/espressif/esptool"
license=('GPL2')
makedepends=('git' 'python-setuptools' 'python-pip')
depends=('python-pyserial' 'python-ecdsa' 'python-pyaes' 'python-bitstring' 'python-reedsolo')
source=("https://github.com/espressif/esptool/archive/v${pkgver}.tar.gz")
sha512sums=('5edaaa376932acc9e7ba717fe931ec1e14b80d1eee415fcef4c69b30b375cd61887ac52a20dd1001d215b8d739019d6b9f624d294d8d76ff112e630d52f7f15b')

build() {
  cd "${pkgname}-${pkgver}"
  python3 setup.py build
}

package() {
  cd "${pkgname}-${pkgver}"
  python3 setup.py install --root="$pkgdir/" --optimize=1 --skip-build
}
