name=headscale version=0.29.0 release=1 source="https://github.com/juanfont/headscale/archive/refs/tags/v$version/$name-$version.tar.gz run" sv="run" build() { export CGO_ENABLED=0 export GOPATH="$SRC/.gopath" mkdir -p "$GOPATH" go build \ -trimpath \ -buildmode=pie \ -ldflags="-X main.version=$version" \ -o headscale ./cmd/headscale install -Dm755 headscale "$PKG/usr/bin/headscale" install -Dm644 config-example.yaml "$PKG/etc/headscale/config.yaml" install -dm755 "$PKG/var/lib/headscale" }