# Generated by go2rpm 1.18.0
%bcond check 0
%bcond bootstrap 0

%if %{with bootstrap}
%global debug_package %{nil}
%endif

%if %{with bootstrap}
%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$
%endif

# https://github.com/asdf-vm/asdf
%global goipath         github.com/asdf-vm/asdf
Version:                0.19.0

%gometa -f

%global common_description %{expand:
Extendable version manager with support for Ruby, Node.js, Elixir, Erlang &
more.}

%global golicenses      LICENSE
%global godocs          docs CHANGELOG.md CONTRIBUTING.md README.md\\\
                        SECURITY.md ballad-of-asdf.md help.txt version.txt

Name:           asdf
Release:        1%{?dist}
Summary:        Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more

License:        MIT
%dnl URL:            %{gourl}
URL:			https://asdf-vm.com
Source:         %{gosource}
Packager:       madonuko <mado@fyralabs.com>
Provides:       golang-github-asdf-vm = %evr

%description %{common_description}

%gopkg

%prep
%goprep -A
%autopatch -p1

%if %{without bootstrap}
#generate_buildrequires
#go_generate_buildrequires
%endif

%if %{without bootstrap}
%build
%define gomodulesmode GO111MODULE=on
for cmd in cmd/* ; do
  %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
done
%endif

%install
%gopkginstall
%if %{without bootstrap}
install -m 0755 -vd                     %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
%endif

%if %{without bootstrap}
%if %{with check}
%check
%gocheck
%endif
%endif

%if %{without bootstrap}
%files
%license LICENSE
%doc docs CHANGELOG.md CONTRIBUTING.md README.md SECURITY.md ballad-of-asdf.md
%doc help.txt version.txt
%{_bindir}/asdf
%endif

%gopkgfiles
