# Contributor: Jonas <spameier+alpine@proton.me>
# Maintainer: Jonas <spameier+alpine@proton.me>
pkgname=goshs
pkgver=1.0.9
pkgrel=1
pkgdesc="A SimpleHTTPServer written in Go, enhanced with features and with a nice design."
url="https://goshs.de"
arch="all"
license="MIT"
makedepends="go"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/patrickhener/goshs/archive/refs/tags/v$pkgver.tar.gz"
options="net !check" # no tests provided

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

build() {
	go build -ldflags="-s -w"
}

package() {
	install -Dm755 "$builddir/goshs" -t "$pkgdir/usr/bin/"
	install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}

sha512sums="
671229ca8d64827e34439ab2a03df67dc5aa80a6afbe56f3496ab21a8bc3117e6d81ebea41e3eff11ce2af87b12b258477373d89041f3283d591ba5970bcbeef  goshs-1.0.9.tar.gz
"
