1
0
Files
perl-SNMP-Info/perl-SNMP-Info.spec

100 lines
3.2 KiB
RPMSpec
Raw Normal View History

#
# spec file for package perl-SNMP-Info
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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/
#
Name: perl-SNMP-Info
Version: 3.63
Release: 0
%define cpan_name SNMP-Info
Summary: OO Interface to Network devices and MIBs through SNMP
License: BSD-3-Clause
Group: Development/Libraries/Perl
Url: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/O/OL/OLIVER/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Class::Inspector)
BuildRequires: perl(File::Slurper)
BuildRequires: perl(Module::Build) >= 0.420000
BuildRequires: perl(NetAddr::IP) >= 4.068
BuildRequires: perl(Path::Class)
BuildRequires: perl(SNMP)
BuildRequires: perl(Test::Class::Most)
BuildRequires: perl(Test::Distribution)
BuildRequires: perl(Test::Exception) >= 0.430000
BuildRequires: perl(Test::MockObject::Extends)
BuildRequires: perl(Test::More) >= 0.88
Requires: perl(NetAddr::IP) >= 4.068
Requires: perl(SNMP)
Recommends: perl(Class::ISA)
Recommends: perl(File::Slurp)
Recommends: perl(Module::Info)
Recommends: perl(Module::Load)
Recommends: perl(PPI)
%{perl_requires}
%description
SNMP::Info gives an object oriented interface to information obtained
through SNMP.
This module is geared towards network devices. Subclasses exist for a
number of network devices and common MIBs.
The idea behind this module is to give a common interface to data from
network devices, leaving the device-specific hacks behind the scenes in
subclasses.
In the SYNOPSIS example we fetch the name of all the ports on the device
and the duplex setting for that port with two methods -- interfaces() and
i_duplex().
The information may be coming from any number of MIB files and is very
vendor specific. SNMP::Info provides you a common method for all supported
devices.
Adding support for your own device is easy, and takes little SNMP
knowledge.
The module is not limited to network devices. Any MIB or device can be
given an objected oriented front-end by making a module that consists of a
couple hashes. See EXTENDING SNMP::INFO.
%prep
%setup -q -n %{cpan_name}-%{version}
find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
%build
perl Build.PL installdirs=vendor
./Build build flags=%{?_smp_mflags}
%check
./Build test
%install
./Build install destdir=%{buildroot} create_packlist=0
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes contrib README
%license LICENSE
%changelog