# Generated by go2rpm 1.15.0 %bcond check 1 # https://github.com/astarte-platform/astartectl %global goipath github.com/astarte-platform/astartectl Version: 24.5.2 %gometa -L -f %global common_description %{expand: Astarte command line client utility.} Name: golang-astartectl Release: %autorelease Summary: Astarte command line client utility # Generated by go-vendor-tools License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: https://github.com/joshuachp/packages/releases/download/astartectl-v%{version}/%{archivename}-vendor.tar.bz2 Source2: https://github.com/joshuachp/packages/releases/download/astartectl-v%{version}/go-vendor-tools.toml BuildRequires: go-vendor-tools %description %{common_description} %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build %gobuild -o %{gobuilddir}/bin/astartectl %{goipath} %install %{gobuilddir}/bin/astartectl completion bash > astartectl.bash %{gobuilddir}/bin/astartectl completion fish > astartectl.fish %{gobuilddir}/bin/astartectl completion zsh > _astartectl install -Dpm 0644 astartectl.bash -t %{buildroot}%{bash_completions_dir} install -Dpm 0644 astartectl.fish -t %{buildroot}%{fish_completions_dir} install -Dpm 0644 _astartectl -t %{buildroot}%{zsh_completions_dir} %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %check %go_vendor_license_check -c %{S:2} %if %{with check} %gocheck %endif %files -f %{go_vendor_license_filelist} %{bash_completions_dir}/astartectl.bash %{fish_completions_dir}/astartectl.fish %{zsh_completions_dir}/_astartectl %license vendor/modules.txt %doc CHANGELOG.md README.md %{_bindir}/astartectl %changelog %autochangelog