## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %bcond_without check # https://github.com/vultr/vultr-cli %global goipath github.com/vultr/vultr-cli Version: 2.19.0 %gometa %global common_description %{expand: Official command line tool for Vultr services.} %global golicenses LICENSE %global godocs CHANGELOG.md CONTRIBUTING.md README.md Name: vultr-cli Release: %autorelease Summary: Official command line tool for Vultr services # Upstream license specification: Apache-2.0 License: Apache-2.0 URL: %{gourl} Source0: %{gosource} BuildRequires: go-rpm-macros %description %{common_description} %gopkg %prep %goprep %generate_buildrequires %go_generate_buildrequires %build %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 %gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ # Install shell completions. install -Dp %{name}.bash %{buildroot}%{_datadir}/bash-completion/completions/%{name} install -Dp %{name}.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/%{name}.fish install -Dp %{name}.zsh %{buildroot}%{_datadir}/zsh/site-functions/_%{name} %if %{with check} %check %gocheck %endif %files %license %{golicenses} %doc %{godocs} %{_bindir}/* %{_datadir}/bash-completion/completions/%{name} %dir %{_datadir}/bash-completion %dir %{_datadir}/bash-completion/completions %{_datadir}/fish/vendor_completions.d/%{name}.fish %dir %{_datadir}/fish %dir %{_datadir}/fish/vendor_completions.d %{_datadir}/zsh/site-functions/_%{name} %dir %{_datadir}/zsh %dir %{_datadir}/zsh/site-functions %gopkgfiles %changelog * Thu Oct 19 2023 Major Hayden - 2.19.0-2 - RPMAUTOSPEC: unresolvable merge