Blob Blame History Raw
# Perform optional tests
%bcond_without perl_Net_Ping_enables_optional_test

Name:           perl-Net-Ping
Version:        2.75
Release:        1%{?dist}
Summary:        Check a remote host for reachability
License:        GPL+ or Artistic
URL:            https://metacpan.org/release/Net-Ping/
Source0:        https://cpan.metacpan.org/authors/id/R/RU/RURBAN/Net-Ping-%{version}.tar.gz
BuildArch:      noarch
BuildRequires:  coreutils
BuildRequires:  make
BuildRequires:  perl-generators
BuildRequires:  perl-interpreter
BuildRequires:  perl(:VERSION) >= 5.2
BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires:  perl(strict)
BuildRequires:  perl(warnings)
# Run-time:
BuildRequires:  perl(Carp)
BuildRequires:  perl(constant)
BuildRequires:  perl(Exporter)
BuildRequires:  perl(Fcntl)
BuildRequires:  perl(FileHandle)
BuildRequires:  perl(IO::Socket::INET)
# Net::Ping::External not used at tests
BuildRequires:  perl(POSIX)
BuildRequires:  perl(Socket) >= 2.007
BuildRequires:  perl(Time::HiRes)
BuildRequires:  perl(vars)
# Win32 not used on Linux
# Tests:
BuildRequires:  perl(Config)
BuildRequires:  perl(Cwd)
BuildRequires:  perl(File::Spec)
BuildRequires:  perl(Test::More)
# sudo not used
%if %{with perl_Net_Ping_enables_optional_test}
# Optional tests:
BuildRequires:  perl(:VERSION) >= 5.6
# Class::XSAccessor not used
BuildRequires:  perl(IO::Socket)
# List::MoreUtils not used
# Module::CPANTS::Kwalitee::Uses not used
# Text::CSV_XS not used
# Test::CPAN::Meta not used
# Test::Kwalitee not used
BuildRequires:  perl(Test::Pod) >= 1.22
# Test::Pod::Coverage not used
%endif
Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires:       perl(IO::Socket::INET)
# Keep Net::Ping::External optional
Suggests:       perl(Net::Ping::External)
Conflicts:      perl < 4:5.22.0-350

%description
Net::Ping module contains methods to test the reachability of remote hosts on
a network.

%prep
%setup -q -n Net-Ping-%{version}

%build
unset PERL_CORE
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
%{make_build}

%install
%{make_install}
%{_fixperms} $RPM_BUILD_ROOT/*

%check
unset AUTHOR_TESTING IS_MAINTAINER NET_PING_FAIL_IP PERL_TEST_Net_Ping \
    TEST_PING_HOST TEST_PING6_HOST
export NO_NETWORK_TESTING=1
make test

%files
%doc Changes README TODO
%{perl_vendorlib}/*
%{_mandir}/man3/*

%changelog
* Tue Sep 06 2022 Michal Josef Špaček <mspacek@redhat.com> - 2.75-1
- Bump 2.75

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

* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 2.74-477
- Increase release to favour standalone package

* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.74-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Thu Dec 03 2020 Jitka Plesnikova <jplesnik@redhat.com> - 2.74-2
- Disable network tests in 200_tcp_ping

* Mon Nov 16 2020 Petr Pisar <ppisar@redhat.com> 2.74-1
- Specfile autogenerated by cpanspec 1.78.