- Resolves: rhbz#2451595 Upstream tag: v3.9.2 Upstream commit: 47d4421b Commit authored by Packit automation (https://packit.dev/)
73 lines
1.8 KiB
RPMSpec
73 lines
1.8 KiB
RPMSpec
# Generated by go2rpm 1.17.1
|
|
%bcond check 1
|
|
|
|
# https://github.com/vultr/vultr-cli
|
|
%global goipath github.com/vultr/vultr-cli/v3
|
|
Version: 3.9.2
|
|
|
|
%gometa -L -f
|
|
|
|
|
|
Name: vultr-cli
|
|
Release: %autorelease
|
|
Summary: Official command line tool for Vultr services
|
|
|
|
# Generated by go-vendor-tools
|
|
License: Apache-2.0 AND BSD-3-Clause AND MIT AND MPL-2.0
|
|
URL: %{gourl}
|
|
Source0: %{gosource}
|
|
# Generated by go-vendor-tools
|
|
Source1: %{archivename}-vendor.tar.bz2
|
|
Source2: go-vendor-tools.toml
|
|
|
|
BuildRequires: go-vendor-tools
|
|
|
|
ExcludeArch: ppc64le s390x
|
|
|
|
%description
|
|
Official command line tool for Vultr services.
|
|
|
|
%prep
|
|
%goprep -A
|
|
%setup -q -T -D -a1 %{forgesetupargs}
|
|
%autopatch -p1
|
|
|
|
%generate_buildrequires
|
|
%go_vendor_license_buildrequires -c %{S:2}
|
|
|
|
%build
|
|
%global gomodulesmode GO111MODULE=on
|
|
%gobuild -o %{gobuilddir}/bin/vultr-cli %{goipath}
|
|
|
|
# Build shell completions.
|
|
for SHELL in bash fish zsh; do
|
|
VULTR_API_KEY=null %{gobuilddir}/bin/%{name} completion $SHELL > %{name}.${SHELL}
|
|
done
|
|
|
|
%install
|
|
%go_vendor_license_install -c %{S:2}
|
|
install -m 0755 -vd %{buildroot}%{_bindir}
|
|
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
|
|
|
|
# Install shell completions.
|
|
install -Dp %{name}.bash %{buildroot}%{bash_completions_dir}/%{name}
|
|
install -Dp %{name}.fish %{buildroot}%{fish_completions_dir}/%{name}.fish
|
|
install -Dp %{name}.zsh %{buildroot}%{zsh_completions_dir}/_%{name}
|
|
|
|
%check
|
|
%go_vendor_license_check -c %{S:2}
|
|
%if %{with check}
|
|
%gotest ./...
|
|
%endif
|
|
|
|
%files -f %{go_vendor_license_filelist}
|
|
%license vendor/modules.txt
|
|
%doc CHANGELOG.md CONTRIBUTING.md README.md
|
|
%{_bindir}/vultr-cli
|
|
%{bash_completions_dir}/%{name}
|
|
%{fish_completions_dir}/%{name}.fish
|
|
%{zsh_completions_dir}/_%{name}
|
|
|
|
|
|
%changelog
|
|
%autochangelog
|