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

# https://github.com/kubernetes/gengo
%global goipath         k8s.io/gengo
%global forgeurl        https://github.com/kubernetes/gengo
%global commit          c02415ce41852193a7b49b79639ec83b8f517515

%gometa

%global common_description %{expand:
A package for generating things based on Go files. This mechanism was first used
in Kubernetes and is split out here for ease of reuse and maintainability.}

%global golicenses      LICENSE
%global godocs          examples CONTRIBUTING.md README.md code-of-conduct.md

%global gosupfiles      ${examples[@]}

Name:           %{goname}
Version:        0
Release:        %autorelease -p
Summary:        Gengo library for code generation

# Upstream license specification: Apache-2.0
License:        ASL 2.0
URL:            %{gourl}
Source0:        %{gosource}

BuildRequires:  golang(github.com/google/gofuzz)
BuildRequires:  golang(github.com/spf13/pflag)
BuildRequires:  golang(golang.org/x/tools/imports)
BuildRequires:  golang(k8s.io/klog/v2)
BuildRequires:  golang(sigs.k8s.io/yaml)

%if %{with check}
# Tests
BuildRequires:  golang(github.com/davecgh/go-spew/spew)
%endif

%description
%{common_description}

%gopkg

%prep
%goprep

%install
mapfile -t examples <<< $(find examples -type f)
%gopkginstall

%if %{with check}
%check
%gocheck -d parser
%endif

%gopkgfiles

%changelog
* Wed Aug 10 2022 Maxwell G <gotmax@e.email> 0-0.15
- Rebuild to fix FTBFS

* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> 0-0.14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Fri Feb 04 2022 Robert-André Mauchin <zebob.m@gmail.com> 0-0.13
- Bump to commit c02415ce41852193a7b49b79639ec83b8f517515

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

* Fri Aug 13 2021 Robert-André Mauchin <zebob.m@gmail.com> 0-0.11
- Bump to commit 485abfe95c7c792c41929dea3578927f90485a9f

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

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

* Wed Jan 13 21:43:54 CET 2021 Robert-André Mauchin <zebob.m@gmail.com> - 0-0.7.20210113gitb6c5ce2
- Bump to commit b6c5ce23f0274839a68889e60dfea0ba05302109

* Wed Sep 30 08:15:07 CEST 2020 Robert-André Mauchin <zebob.m@gmail.com> - 0-0.6.20200930git7794989
- Bump to commit 7794989d00002eae09b50e95c3a221245260a20e

* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Mon Apr 13 23:54:19 CEST 2020 Robert-André Mauchin <zebob.m@gmail.com> - 0-0.4.20200413git3a45101
- Bump to commit 3a45101e95ac3a2015e6bf3e41269d624610c946

* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Thu May 09 23:22:46 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 0-0.1.20190629gite17681d
- Initial package