2019-05-16 21:22:31 +00:00
|
|
|
# Generated by go2rpm
|
2018-04-21 19:55:42 +00:00
|
|
|
%bcond_without check
|
|
|
|
|
2019-05-16 21:22:31 +00:00
|
|
|
# https://github.com/dominikh/go-tools
|
2018-04-21 19:55:42 +00:00
|
|
|
%global goipath honnef.co/go/tools
|
|
|
|
%global forgeurl https://github.com/dominikh/go-tools
|
2021-08-05 15:08:52 +00:00
|
|
|
Version: 2021.1
|
|
|
|
%global tag 2021.1
|
2019-05-16 21:22:31 +00:00
|
|
|
|
|
|
|
%gometa
|
2018-04-21 19:55:42 +00:00
|
|
|
|
|
|
|
%global common_description %{expand:
|
2019-05-16 21:22:31 +00:00
|
|
|
honnef.co/go/tools/... is a collection of tools and libraries for working with
|
|
|
|
Go code, including linters and static analysis, most prominently staticcheck.}
|
2018-04-21 19:55:42 +00:00
|
|
|
|
2020-08-06 13:17:35 +00:00
|
|
|
%global golicenses LICENSE
|
2019-05-16 21:22:31 +00:00
|
|
|
%global godocs README.md
|
2018-04-21 19:55:42 +00:00
|
|
|
|
|
|
|
Name: %{goname}
|
2021-08-05 15:03:39 +00:00
|
|
|
Release: %autorelease
|
2019-05-16 21:22:31 +00:00
|
|
|
Summary: Collection of static analysis tools for working with Go code
|
|
|
|
|
|
|
|
# Upstream license specification: BSD-3-Clause and MIT
|
|
|
|
License: BSD and MIT
|
2018-04-21 19:55:42 +00:00
|
|
|
URL: %{gourl}
|
2019-05-16 21:22:31 +00:00
|
|
|
Source0: %{gosource}
|
2018-04-21 19:55:42 +00:00
|
|
|
|
2019-05-16 21:22:31 +00:00
|
|
|
BuildRequires: golang(github.com/BurntSushi/toml)
|
2019-08-02 22:11:24 +00:00
|
|
|
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)
|
2019-05-16 21:22:31 +00:00
|
|
|
BuildRequires: golang(golang.org/x/tools/go/ast/astutil)
|
2019-08-02 22:11:24 +00:00
|
|
|
BuildRequires: golang(golang.org/x/tools/go/ast/inspector)
|
2019-05-16 21:22:31 +00:00
|
|
|
BuildRequires: golang(golang.org/x/tools/go/buildutil)
|
|
|
|
BuildRequires: golang(golang.org/x/tools/go/loader)
|
|
|
|
BuildRequires: golang(golang.org/x/tools/go/packages)
|
2019-08-02 22:11:24 +00:00
|
|
|
BuildRequires: golang(golang.org/x/tools/go/types/objectpath)
|
2019-05-16 21:22:31 +00:00
|
|
|
BuildRequires: golang(golang.org/x/tools/go/types/typeutil)
|
2018-04-21 19:55:42 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
%{common_description}
|
|
|
|
|
2019-05-16 21:22:31 +00:00
|
|
|
%gopkg
|
2018-04-21 19:55:42 +00:00
|
|
|
|
|
|
|
%prep
|
2019-05-16 21:22:31 +00:00
|
|
|
%goprep
|
|
|
|
|
|
|
|
%build
|
2021-01-22 20:53:35 +00:00
|
|
|
for cmd in cmd/*; do
|
2019-05-16 21:22:31 +00:00
|
|
|
%gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
|
2018-04-21 19:55:42 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
%install
|
2019-05-16 21:22:31 +00:00
|
|
|
%gopkginstall
|
|
|
|
install -m 0755 -vd %{buildroot}%{_bindir}
|
|
|
|
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
|
2018-04-21 19:55:42 +00:00
|
|
|
|
|
|
|
%if %{with check}
|
|
|
|
%check
|
2020-02-05 16:18:51 +00:00
|
|
|
# https://github.com/dominikh/go-tools/issues/687
|
2020-08-06 14:13:07 +00:00
|
|
|
%gocheck -d unused -d staticcheck
|
2018-04-21 19:55:42 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%files
|
2020-08-06 13:17:35 +00:00
|
|
|
%license LICENSE
|
2018-04-21 19:55:42 +00:00
|
|
|
%doc README.md
|
2019-05-16 21:22:31 +00:00
|
|
|
%{_bindir}/*
|
2018-04-21 19:55:42 +00:00
|
|
|
|
2019-05-16 21:22:31 +00:00
|
|
|
%gopkgfiles
|
2018-04-21 19:55:42 +00:00
|
|
|
|
|
|
|
%changelog
|
2021-08-05 15:03:39 +00:00
|
|
|
%autochangelog
|