## 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

%bcond_without check

# https://github.com/d5/tengo
%global goipath         github.com/d5/tengo/v2
Version:                2.10.1

%gometa

%global common_description %{expand:
A fast script language for Go.}

%global golicenses      LICENSE
%global godocs          docs examples README.md

Name:           %{goname}
Release:        %autorelease
Summary:        Fast script language for Go

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

%description
%{common_description}

%gopkg

%prep
%goprep

%build
%gobuild -o %{gobuilddir}/bin/tengo %{goipath}/cmd/tengo

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

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

%files
%license LICENSE
%doc docs examples README.md
%{_bindir}/*

%gopkgfiles

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

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

* Sat Jun 18 2022 Robert-André Mauchin <zebob.m@gmail.com> 2.10.1-2
- Rebuilt for CVE-2022-1996, CVE-2022-24675, CVE-2022-28327,
  CVE-2022-27191, CVE-2022-29526, CVE-2022-30629

* Mon Mar 07 2022 Fabian Affolter <mail@fabian-affolter.ch> 2.10.1-1
- Update to latest upstream release 2.10.1 (closes rhbz#2020967)

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

* Thu Aug 26 2021 Fabian Affolter <mail@fabian-affolter.ch> 2.8.0-1
- * Thu Aug 26 2021 Fabian Affolter <mail@fabian-affolter.ch> - 2.8.0-1 -
  Update to latest upstream release 2.8.0 (closes rhbz#1963617)

* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> 2.6.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> 2.6.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Fri Jan 15 2021 Robert-André Mauchin <zebob.m@gmail.com> 2.6.2-1
- Update to 2.6.2

* Mon Nov 16 2020 Fabian Affolter <mail@fabian-affolter.ch> 2.6.1-1
- * Tue Sep 15 2020 Fabian Affolter <mail@fabian-affolter.ch> - 2.6.1-1 -
  Update to latest upstream release 2.6.1