# Contributor: mio <miyopan@e.email>
# Maintainer: mio <miyopan@e.email>
pkgname=madonctl
pkgver=3.0.2
pkgrel=1
pkgdesc="CLI client for the Mastodon social network API"
url="https://github.com/McKael/madonctl"
license="MIT"
arch="all"
makedepends="go"
subpackages="$pkgname-doc"
source="madonctl-$pkgver.tar.gz::https://github.com/McKael/madonctl/archive/v$pkgver.tar.gz"
options="net !check" # No tests

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build
}

package() {
	install -Dm0755 madonctl -t "$pkgdir"/usr/bin

	install -Dm0644 configuration.md -t "$pkgdir"/usr/share/doc/"$pkgname"
	install -Dm0644 LICENSE -t "$pkgdir"/usr/share/licenses/"$pkgname"
}

sha512sums="
e0a5c93697388e3ed49d5a781c109d5906c56d51a5da3250da2143bf5b7563f5b6b215931d38e379fee1ed212b72e4b7c54d6210946fcc16e040c91a7a904baf  madonctl-3.0.2.tar.gz
"
