## START: Set by rpmautospec
## (rpmautospec version 0.3.0)
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 4;
    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

# Generated by go2rpm 1.3
%bcond_without check

# https://github.com/schollz/mnemonicode
%global goipath         github.com/schollz/mnemonicode
Version:                1.0.1

%gometa

%global common_description %{expand:
Mnemonicode is a method for encoding binary data into a sequence of words which
can be spoken over the phone, for example, and converted back to data on the
other side.}

%global golicenses      LICENCE
%global godocs          README.md

Name:           %{goname}
Release:        %autorelease
Summary:        Method for encoding binary data into a sequence of words

License:        MIT
URL:            %{gourl}
Source0:        %{gosource}

BuildRequires:  golang(golang.org/x/text/transform)

%description
%{common_description}

%package -n     mnemonicode
Summary:        %{summary}
License:        MIT and BSD

%description -n mnemonicode
%{common_description}

%gopkg

%prep
%goprep

%build
for cmd in cmd/* ; do
  %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
done

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

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

%files -n mnemonicode
%license LICENCE
%doc README.md
%{_bindir}/*

%gopkgfiles

%changelog
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> 1.0.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Tue Jul 19 2022 Maxwell G <gotmax@e.email> 1.0.1-3
- Rebuild for
  CVE-2022-{1705,32148,30631,30633,28131,30635,30632,30630,1962} in golang

* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> 1.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Mon Nov 15 2021 Davide Cavalca <davide@cavalca.name> 1.0.1-1
- Initial import; Fixes: RHBZ#1979792