# Contributor: Andrej Kolchin <KAAtheWise@protonmail.com>
# Maintainer: Andrej Kolchin <KAAtheWise@protonmail.com>
pkgname=scc
pkgver=3.4.0
pkgrel=5
pkgdesc="Very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go"
url="https://github.com/boyter/scc"
arch="all"
license="MIT"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/boyter/scc/archive/v$pkgver.tar.gz"

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

build() {
	go build -v -o bin/scc
}

check() {
	go test ./...
}

package() {
	install -Dm755 bin/scc -t "$pkgdir"/usr/bin
}

sha512sums="
d6c2395eb87e21f14362910cbc18be54f517df65844a3534b6b9f3cdf1a28fcf710253e64b6b013937ff51d0e6d8641c70d05cdaf1ad6fbd4740f707313be2dc  scc-3.4.0.tar.gz
"
