golang-honnef-tools/golang-honnef-tools.spec

73 lines
1.9 KiB
RPMSpec
Raw Normal View History

# Generated by go2rpm
2018-04-21 19:55:42 +00:00
%bcond_without check
# 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
%gometa
2018-04-21 19:55:42 +00:00
%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.}
2018-04-21 19:55:42 +00:00
%global golicenses LICENSE
%global godocs README.md
2018-04-21 19:55:42 +00:00
Name: %{goname}
2021-08-05 15:03:39 +00:00
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
2018-04-21 19:55:42 +00:00
URL: %{gourl}
Source0: %{gosource}
2018-04-21 19:55:42 +00:00
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)
2018-04-21 19:55:42 +00:00
%description
%{common_description}
%gopkg
2018-04-21 19:55:42 +00:00
%prep
%goprep
%build
for cmd in cmd/*; do
%gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
2018-04-21 19:55:42 +00:00
done
%install
%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
# https://github.com/dominikh/go-tools/issues/687
%gocheck -d unused -d staticcheck
2018-04-21 19:55:42 +00:00
%endif
%files
%license LICENSE
2018-04-21 19:55:42 +00:00
%doc README.md
%{_bindir}/*
2018-04-21 19:55:42 +00:00
%gopkgfiles
2018-04-21 19:55:42 +00:00
%changelog
2021-08-05 15:03:39 +00:00
%autochangelog