# Generated by go2rpm 1.14.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/oz/tz
%global goipath         github.com/oz/tz

%global snapdate        20250214
%global date            %{snapdate}
%global commit          7dc9ad0b251e128b85c84ca5ccb96b4e4a4a3bd4

%gometa -f

%global common_description %{expand:
tz helps you schedule things across time zones. It's an interactive
TUI program that displays time across the time zones of your choosing.}

%global golicenses      COPYING
%global godocs          docs README.md

Name:           tz
Version:        0.8.0
Release:        %autorelease
Summary:        A time zone helper

License:        GPL-3.0-only
URL:            https://github.com/oz/tz
Source:         %{gosource}
Patch:          improvements.diff

BuildRequires:  git

%description %{common_description}

%gopkg

%prep
%goprep -A
%autopatch -p1

%if %{without bootstrap}
go mod vendor
%endif

%if %{without bootstrap}
%build
%gobuild -o %{gobuilddir}/bin/tz %{goipath}
%endif

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

chmod -R u+w %{gobuilddir}/pkg
%endif

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

%if %{without bootstrap}
%files
%license COPYING vendor/modules.txt
%doc docs README.md
%{_bindir}/tz
%endif

%gopkgfiles

%changelog
%autochangelog