# # spec file for package perl-Net-Ping-External # # Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define cpan_name Net-Ping-External Name: perl-Net-Ping-External Version: 0.150.0 Release: 0 # 0.15 -> normalize -> 0.150.0 %define cpan_version 0.15 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Cross-platform Perl interface to "ping" utilities URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/C/CH/CHORNY/%{cpan_name}-%{cpan_version}.tar.gz Source1: cpanspec.yml Source100: README.md BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros Provides: perl(Net::Ping::External) = %{version} %undefine __perllib_provides %{perl_requires} %description Net::Ping::External is a module which interfaces with the "ping" command on many systems. It presently provides a single function, 'ping()', that takes in a hostname and (optionally) a timeout and returns true if the host is alive, and false otherwise. Unless you have the ability (and willingness) to run your scripts as the superuser on your system, this module will probably provide more accurate results than Net::Ping will. Why? * ICMP ping is the most reliable way to tell whether a remote host is alive. * However, Net::Ping cannot use an ICMP ping unless you are running your script with privileged (AKA "root") access. * The system's "ping" command uses ICMP and does not usually require privileged access. * While it is relatively trivial to write a Perl script that parses the output of the "ping" command on a given system, the aim of this module is to encapsulate this functionality and provide a single interface for it that works on many systems. %prep %autosetup -n %{cpan_name}-%{cpan_version} %build perl Makefile.PL INSTALLDIRS=vendor %make_build %check # don't run tests, they require a network connection # make test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %doc Changes README ToDo %changelog