# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=speedtest-cli
pkgver=2.0.0
pkgrel=0
pkgdesc="Command line interface for testing internet bandwidth using speedtest.net"
url="https://github.com/sivel/speedtest-cli"
arch="noarch"
license="Apache-2.0"
depends="python3"
makedepends="python3-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/sivel/speedtest-cli/archive/v$pkgver.tar.gz"
builddir="$srcdir"/$pkgname-$pkgver

check() {
	cd "$builddir"
	python3 setup.py check
}

build() {
	cd "$builddir"
	python3 setup.py build
}

package() {
	cd "$builddir"
	python3 setup.py install --prefix=/usr --root="$pkgdir"
	install -Dm755 speedtest.py "$pkgdir"/usr/bin/speedtest-cli
}

sha512sums="60bde263a06589c609a10e1a881a1b02f7c7426b95778d7729b1388e545713094501914c24ee08f0857c4f445354539b5508825ab1a51df284215ba681dd7888  speedtest-cli-2.0.0.tar.gz"
