# Generated by go2rpm 1.17.1
%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/knqyf263/pet
%global goipath         github.com/knqyf263/pet
Version:                1.0.1

%gometa -f

%global common_description %{expand:
Simple command-line snippet manager.}

%global golicenses      LICENSE
%global godocs          doc README.md SECURITY.md

Name:           pet
Release:        2%?dist
Summary:        Simple command-line snippet manager

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

Provides:       golang-github-knqyf263-pet = %evr
Packager:       Owen Zimmerman <owen@fyralabs.com>

%description %{common_description}

%gopkg

%prep
%goprep -A
%autopatch -p1

%build
%define gomodulesmode GO111MODULE=on
%gobuild -o %{gobuilddir}/bin/pet %{goipath}

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

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

%if %{without bootstrap}
%files
%license LICENSE
%doc doc README.md SECURITY.md
%{_bindir}/pet
%endif

%gopkgfiles

%changelog
%autochangelog
