diff --git a/vultr.spec b/vultr.spec index 161fdd4..f56f607 100644 --- a/vultr.spec +++ b/vultr.spec @@ -1,23 +1,34 @@ -%global goipath github.com/JamesClonk/vultr -Version: 1.15.0 -%global tag %{version} +# Generated by go2rpm +%bcond_without check + +# https://github.com/JamesClonk/vultr +%global goipath github.com/JamesClonk/vultr +Version: 1.15.0 +%global tag %{version} + %gometa +%global common_description %{expand: +Vultr CLI and API client library.} + +%global golicenses LICENSE +%global godocs README.md Name: vultr -Release: 2%{?dist} +Release: 3%{?dist} Summary: Vultr CLI + License: MIT URL: %{gourl} Source0: %{gosource} BuildRequires: golang(github.com/jawher/mow.cli) BuildRequires: golang(github.com/juju/ratelimit) -BuildRequires: golang(github.com/stretchr/testify/assert) -BuildRequires: golang(golang.org/x/crypto/ssh) -BuildRequires: golang(golang.org/x/crypto/ssh/agent) -BuildRequires: golang(golang.org/x/crypto/ssh/terminal) +%if %{with check} +# Tests +BuildRequires: golang(github.com/stretchr/testify/assert) +%endif %description Vultr CLI is a command line tool for using the Vultr API. It allows you to @@ -25,50 +36,35 @@ create and manage your virtual machines, SSH public keys, snapshots, and startup scripts on your Vultr account. You can also use it to directly SSH into a Vultr virtual machine through the vultr ssh command. - -%package -n %{goname}-devel -Summary: Vultr API client library -BuildArch: noarch - - -%description -n %{goname}-devel -%{summary}. - -This package contains the source code needed for building packages that import -the %{goipath} Go namespace. - +%gopkg %prep -%autosetup -rm -rf vendor - +%goprep %build -%gobuildroot -%gobuild -o _bin/vultr %{goipath} - +%gobuild -o %{gobuilddir}/bin/vultr %{goipath} %install -install -D -p -m 0755 _bin/vultr %{buildroot}%{_bindir}/vultr -%goinstall -t cmd - +%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 %doc README.md %{_bindir}/vultr - -%files -n %{goname}-devel -f devel.file-list -%license LICENSE -%doc README.md - +%gopkgfiles %changelog +* Fri Jul 12 2019 Elliott Sales de Andrade - 1.15.0-3 +- Update to latest Go macros + * Tue Jan 22 2019 Carl George - 1.15.0-2 - Expand description