# Generated by go2rpm
%bcond_without check

# https://github.com/git-time-metric/gtm
%global goipath         github.com/git-time-metric/gtm
Version:                1.3.5

%gometa

%global common_description %{expand:
Simple, seamless, lightweight time tracking for Git.}

%global golicenses      LICENSE
%global godocs          AUTHORS README.md

Name:           git-time-metric
Release:        13%{?dist}
Summary:        Simple, seamless, lightweight time tracking for Git

License:        MIT
URL:            %{gourl}
Source0:        %{gosource}
# Upstream is quite dead at this point. It is not possible to simply send
# them a patch because it requires update of bundled git2go and such…
Patch0:         0001-Patch-for-git2go-v32.patch

BuildRequires:  git-core
BuildRequires:  golang(github.com/briandowns/spinner)
BuildRequires:  golang(github.com/hako/durafmt)
BuildRequires:  golang(github.com/hashicorp/go-version)
BuildRequires:  golang(github.com/jinzhu/now)
BuildRequires:  golang(github.com/libgit2/git2go)
BuildRequires:  golang(github.com/mattn/go-isatty)
BuildRequires:  golang(github.com/mitchellh/cli)

%description
%{common_description}


%gopkg


%prep
%goprep
%autopatch -p1


%build
%gobuild -o %{gobuilddir}/bin/gtm %{goipath}


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


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


%files
%doc README.md AUTHORS
%license LICENSE
%{_bindir}/gtm

%gopkgfiles


%changelog
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.5-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Sun Nov 28 2021 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.3.5-12
- Rebuild for libgit2 1.3.x

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

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

* Sat Jan  2 18:10:45 CET 2021 Robert-André Mauchin <zebob.m@gmail.com> - 1.3.5-9
- Rebuild for libgit2 soname bump
- Close: rhbz#1911973

* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.5-8
- Second attempt - Rebuilt for
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

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

* Tue Mar 03 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.3.5-6
- Rebuild for libgit2 0.99

* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.5-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

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

* Wed Jul 10 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.3.5-3
- Update to new Go macros
- Enable 32-bit builds again

* Thu Mar 21 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.3.5-2
- Add git-core BR for testing
- Remove vendored code before build

* Wed Feb 20 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.3.5-1
- First package for Fedora