## START: Set by rpmautospec
## (rpmautospec version 0.3.0)
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 3;
    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 1.5.0
# Disable tests by default as they require a multicast network interface
%bcond_with check

# https://github.com/schollz/peerdiscovery
%global goipath         github.com/schollz/peerdiscovery
Version:                1.6.9

%gometa

%global common_description %{expand:
Pure-Go library for cross-platform local peer discovery using UDP multicast.}

%global golicenses      LICENSE
%global godocs          examples README.md

Name:           %{goname}
Release:        %autorelease
Summary:        Pure-Go library for cross-platform local peer discovery using UDP multicast

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

BuildRequires:  golang(github.com/schollz/progressbar/v2)
BuildRequires:  golang(github.com/schollz/progressbar/v3)
BuildRequires:  golang(golang.org/x/net/ipv4)
BuildRequires:  golang(golang.org/x/net/ipv6)

%if %{with check}
# Tests
BuildRequires:  golang(github.com/stretchr/testify/assert)
%endif

%description
%{common_description}

%gopkg

%prep
%goprep

%install
%gopkginstall

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

%gopkgfiles

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

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

* Tue Nov 16 2021 Davide Cavalca <dcavalca@fedoraproject.org> 1.6.9-1
- Initial import; Fixes: RHBZ#1979793