# Generated by go2rpm %bcond_without check # https://github.com/dominikh/go-tools %global goipath honnef.co/go/tools %global forgeurl https://github.com/dominikh/go-tools Version: 2021.1 %global tag 2021.1 %gometa %global common_description %{expand: honnef.co/go/tools/... is a collection of tools and libraries for working with Go code, including linters and static analysis, most prominently staticcheck.} %global golicenses LICENSE %global godocs README.md Name: %{goname} Release: %autorelease Summary: Collection of static analysis tools for working with Go code # Upstream license specification: BSD-3-Clause and MIT License: BSD and MIT URL: %{gourl} Source0: %{gosource} BuildRequires: golang(github.com/BurntSushi/toml) BuildRequires: golang(golang.org/x/tools/go/analysis) BuildRequires: golang(golang.org/x/tools/go/analysis/analysistest) BuildRequires: golang(golang.org/x/tools/go/analysis/passes/inspect) BuildRequires: golang(golang.org/x/tools/go/ast/astutil) BuildRequires: golang(golang.org/x/tools/go/ast/inspector) BuildRequires: golang(golang.org/x/tools/go/buildutil) BuildRequires: golang(golang.org/x/tools/go/loader) BuildRequires: golang(golang.org/x/tools/go/packages) BuildRequires: golang(golang.org/x/tools/go/types/objectpath) BuildRequires: golang(golang.org/x/tools/go/types/typeutil) %description %{common_description} %gopkg %prep %goprep %build for cmd in cmd/*; do %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done %install %gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %if %{with check} %check # https://github.com/dominikh/go-tools/issues/687 %gocheck -d unused -d staticcheck %endif %files %license LICENSE %doc README.md %{_bindir}/* %gopkgfiles %changelog %autochangelog