diff --git a/perl-Net-Ping.spec b/perl-Net-Ping.spec index 851589b293752a6c5a519220f290e60868bff296..8079edf4a9e1b1d5d8ecce19ad12eab1e1970d4f 100644 --- a/perl-Net-Ping.spec +++ b/perl-Net-Ping.spec @@ -1,73 +1,55 @@ -%define anolis_release 1 +%define anolis_release 2 + %bcond_with perl_Net_Ping_enables_optional_test Name: perl-Net-Ping Version: 2.75 Release: %{anolis_release}%{?dist} -Summary: Check a remote host for reachability License: GPL+ or Artistic +Summary: Check a remote host for reachability 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) + +BuildRequires: make coreutils +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 perl(:VERSION) >= 5.2 +BuildRequires: perl(warnings) perl(strict) perl-interpreter perl-generators # 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 +BuildRequires: perl(IO::Socket::INET) perl(Fcntl) perl(FileHandle) +BuildRequires: perl(vars) perl(Exporter) perl(constant) perl(Carp) +BuildRequires: perl(Time::HiRes) perl(Socket) >= 2.007 perl(POSIX) # Tests: -BuildRequires: perl(Config) -BuildRequires: perl(Cwd) -BuildRequires: perl(File::Spec) -BuildRequires: perl(Test::More) -# sudo not used +BuildRequires: perl(Test::More) perl(Cwd) perl(File::Spec) perl(Config) + %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 +BuildRequires: perl(IO::Socket) perl(:VERSION) >= 5.6 perl(Test::Pod) >= 1.22 %endif + 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. +This module contains methods to test the reachability of remote hosts on a network. +A ping object is first created with optional parameters, a variable number of hosts +may be pinged multiple times and then the connection is closed. + +You may choose one of six different protocols to use for the ping. The "tcp" protocol +is the default. Note that a live remote host may still fail to be pingable by one or +more of these protocols. For example, www.microsoft.com is generally alive but +not "icmp" pingable. %package doc Summary: Documentation files for %{name} -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{EVR} BuildArch: noarch %description doc The %{name}-doc package contains documentation files for %{name}. %prep -%setup -q -n Net-Ping-%{version} +%autosetup -p1 -n Net-Ping-%{version} %build unset PERL_CORE @@ -76,7 +58,7 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 %install %{make_install} -%{_fixperms} $RPM_BUILD_ROOT/* +%{_fixperms} %{buildroot}/* %check unset AUTHOR_TESTING IS_MAINTAINER NET_PING_FAIL_IP PERL_TEST_Net_Ping \ @@ -89,9 +71,12 @@ make test %{_mandir}/man3/* %files doc -%doc Changes README TODO +%doc TODO Changes README %changelog +* Sat Apr 15 2023 yuanhui - 2.75-2 +- Optimize the spec file + * Mon Feb 06 2023 mgb01105731 - 2.75-1 - remove versioned MODULE_COMPAT_ requires - update to version 2.75