# Template file for 'go-size-analyzer'
pkgname=go-size-analyzer
version=1.13.0
revision=1
build_style=go
go_import_path="github.com/Zxilly/go-size-analyzer"
go_package="${go_import_path}/cmd/gsa"
go_ldflags="-X ${go_import_path}.version=${version}"
make_check_args="-skip Test(DiffJSONAndBinary|CommonResult|FullOutput)" # require the tui
short_desc="Tool for analyzing the size of compiled Go binaries"
maintainer="Bnyro <bnyro@tutanota.com>"
license="AGPL-3.0-only"
homepage="https://github.com/Zxilly/go-size-analyzer"
distfiles="https://github.com/Zxilly/go-size-analyzer/archive/refs/tags/v${version}.tar.gz"
checksum=160415a10eaa2c1151dda1e8913d5d1ccf912cd7c18e35a673b88ac72667e507
make_check=no # requires binary files to analyze them

pre_build() {
	export GOEXPERIMENT=jsonv2
}

post_install() {
	# avoid name clash with 'gwenhywfar' package
	mv ${DESTDIR}/usr/bin/{gsa,go-size-analyzer}
	vlicense LICENSE
}
