# Contributor: omni <omni+alpine@hack.org>
# Maintainer: omni <omni+alpine@hack.org>
pkgname=wego
pkgver=2.3
pkgrel=5
pkgdesc="A weather app for the terminal"
url="https://github.com/schachmat/wego"
license="ISC"
arch="all"
makedepends="go"
options="!check" # no test files
source="$pkgname-$pkgver.tar.gz::https://github.com/schachmat/wego/archive/refs/tags/$pkgver.tar.gz"

export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build \
		-ldflags="-linkmode=external -extldflags \"$LDFLAGS\"" \
		-v .
}

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

sha512sums="
1e1944ac2f3e64622e419541c741e743a53bb5e321bb9fe5781f0fed635b5474f2fd2df5010222dfc0cff601f1aa3f194326b1f688aebf3f3c41f6d419e491e4  wego-2.3.tar.gz
"
