# Generated by go2rpm 1.6.0 %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.2 %global commit 852a31a10f5fc943bff9b7857d352b317e1bcc3e %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/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/gcexportdata) 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) BuildRequires: golang(golang.org/x/tools/txtar) %if %{with check} # Tests BuildRequires: golang(golang.org/x/tools/go/analysis/analysistest) %endif %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 %gocheck -d staticcheck -d go/ir -d lintcmd %endif %files %license LICENSE %doc README.md %{_bindir}/* %gopkgfiles %changelog %autochangelog