From ebe5fbc78946fe9d19b413c45da115edbfa251fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= Date: Sat, 21 Apr 2018 21:55:42 +0200 Subject: [PATCH] Initial import (#1561674) --- .gitignore | 1 + README.md | 3 -- golang-honnef-tools.spec | 79 ++++++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 81 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 README.md create mode 100644 golang-honnef-tools.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8566c2d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/go-tools-2017.2.2.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 640d892..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# golang-honnef-tools - -The golang-honnef-tools package \ No newline at end of file diff --git a/golang-honnef-tools.spec b/golang-honnef-tools.spec new file mode 100644 index 0000000..a3f525c --- /dev/null +++ b/golang-honnef-tools.spec @@ -0,0 +1,79 @@ +# Run tests in check section +# disable for bootstrapping +%bcond_without check + +%global goipath honnef.co/go/tools +%global forgeurl https://github.com/dominikh/go-tools +Version: 2017.2.2 + +%global common_description %{expand: +Tools and libraries for working with Go, including linters and static analysis.} + +%gometa + +Name: %{goname} +Release: 1%{?dist} +Summary: Tools and libraries for working with Go, including linters and static analysis +License: MIT and BSD +URL: %{gourl} +Source0: %{gourl}/archive/%{version}/go-tools-%{version}.tar.gz + +BuildRequires: golang(github.com/kisielk/gotool) +BuildRequires: golang(golang.org/x/tools/go/ast/astutil) +BuildRequires: golang(golang.org/x/tools/go/loader) +BuildRequires: golang(golang.org/x/tools/go/types/typeutil) + +%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. + + +%prep +%forgeautosetup + + +%build +%gobuildroot +for cmd in $(ls -1 cmd) ; do + %gobuild -o _bin/$cmd %{goipath}/cmd/$cmd +done + + +%install +%goinstall +for cmd in $(ls -1 _bin) ; do + install -Dpm 0755 _bin/$cmd %{buildroot}%{_bindir}/$cmd +done + + +%if %{with check} +%check +%gochecks +%endif + + +%files +%license LICENSE +%{_bindir}/* + + +%files devel -f devel.file-list +%license LICENSE +%doc README.md + + +%changelog +* Fri Mar 23 2018 Robert-André Mauchin - 2017.2.2-1 +- First package for Fedora + diff --git a/sources b/sources new file mode 100644 index 0000000..8838c69 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (go-tools-2017.2.2.tar.gz) = 8235d3b39aeb6e482404e5b75001980590ef575ec140db28f8b217e51b9c3538c94f5789f5135dbb5fbf4174fb34a3fdd045252c340bb8586c76faed89ee5a12