diff --git a/golang-honnef-tools.spec b/golang-honnef-tools.spec index c13ba2a..1beadc6 100644 --- a/golang-honnef-tools.spec +++ b/golang-honnef-tools.spec @@ -1,81 +1,76 @@ -# Run tests in check section -# disable for bootstrapping +# 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: 2019.1.1 +%global tag 2019.1.1 + +%gometa %global common_description %{expand: -Tools and libraries for working with Go, including linters and static analysis.} +honnef.co/go/tools/... is a collection of tools and libraries for working with +Go code, including linters and static analysis, most prominently staticcheck.} -%gometa +%global golicenses LICENSE LICENSE-gcsizes LICENSE-lint LICENSE-ssa +%global godocs README.md Name: %{goname} -Release: 1%{?dist} -Summary: Tools and libraries for working with Go, including linters and static analysis -License: MIT and BSD +Release: 2%{?dist} +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: %{gourl}/archive/%{version}/go-tools-%{version}.tar.gz +Source0: %{gosource} -BuildRequires: golang(github.com/BurntSushi/toml) -BuildRequires: golang(golang.org/x/tools/go/ast/astutil) -BuildRequires: golang(golang.org/x/tools/go/loader) -BuildRequires: golang(golang.org/x/tools/go/packages) -BuildRequires: golang(golang.org/x/tools/go/types/typeutil) -BuildRequires: golang(github.com/kisielk/gotool) +BuildRequires: golang(github.com/BurntSushi/toml) +BuildRequires: golang(github.com/kisielk/gotool) +BuildRequires: golang(golang.org/x/tools/go/ast/astutil) +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/typeutil) +BuildRequires: golang(golang.org/x/tools/refactor/importgraph) %description %{common_description} - -%package devel -Summary: %{summary} -BuildArch: noarch - -%description devel -%{common_description} - -This package contains library source intended for -building other packages which use import path with -%{goipath} prefix. - +%gopkg %prep -%forgeautosetup - - -%build -%gobuildroot -for cmd in $(ls -1 cmd) ; do - %gobuild -o _bin/$cmd %{goipath}/cmd/$cmd +%goprep +mv gcsizes/LICENSE LICENSE-gcsizes +mv lint/LICENSE LICENSE-lint +mv ssa/LICENSE LICENSE-ssa + +%build +for cmd in cmd/gosimple cmd/keyify cmd/megacheck cmd/rdeps cmd/staticcheck cmd/structlayout-optimize cmd/structlayout-pretty cmd/structlayout; do + %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done - %install -%goinstall -for cmd in $(ls -1 _bin) ; do - install -Dpm 0755 _bin/$cmd %{buildroot}%{_bindir}/$cmd -done - +%gopkginstall +install -m 0755 -vd %{buildroot}%{_bindir} +install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %if %{with check} %check -%gochecks +%gocheck %endif - %files -%license LICENSE -%{_bindir}/* - - -%files devel -f devel.file-list -%license LICENSE +%license LICENSE LICENSE-gcsizes LICENSE-lint LICENSE-ssa %doc README.md +%{_bindir}/* +%gopkgfiles %changelog +* Thu May 16 22:58:09 CEST 2019 Robert-André Mauchin - 2019.1.1-2 +- Update to new macros + * Sun Mar 17 2019 Robert-André Mauchin - 2019.1.1-1 - Release 2019.1.1 (#1689449) @@ -91,4 +86,3 @@ done * Fri Mar 23 2018 Robert-André Mauchin - 2017.2.2-1 - First package for Fedora -