File perl-AIX-Perfstat.spec of Package perl-AIX-Perfstat
#
# spec file for package perl-AIX-Perfstat
#
# Copyright (c) 2016 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 http://bugs.opensuse.org/
#
Name: perl-AIX-Perfstat
Version: 0.04.1
Release: 0
%define cpan_name AIX-Perfstat
Summary: Perl wrapper for C<perfstat()> functions
License: GPL-1.0+ or Artistic-1.0
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/AIX-Perfstat/
Source0: http://www.cpan.org/authors/id/A/AC/ACIDDEATH/%{cpan_name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
%{perl_requires}
%description
This Perl module lets you call all of the perfstat functions defined on AIX
5.1 and returns system data in Perl data structures.
The 'AIX::Perfstat::cpu_total', 'AIX::Perfstat::disk_total',
'AIX::Perfstat::netinterface_total', and 'AIX::Perfstat::memory_total'
functions each return a hashref containing all of the respective C
structures.
The 'AIX::Perfstat::cpu_count', 'AIX::Perfstat::disk_count', and
'AIX::Perfstat::netinterface_count' functions each return a count of how
many structures are available from the 'AIX::Perfstat::cpu',
'AIX::Perfstat::disk', and 'AIX::Perfstat::netinterface' functions
respectively.
The 'AIX::Perfstat::cpu', 'AIX::Perfstat::disk', and
'AIX::Perfstat::netinterface' functions each take up to two arguments and
return a reference to an array of hashes. The arguments specify the number
of records to return, and the name of the record to start with. These
arguments are equivalent to the 'desired_number' and 'name' parameters to
the 'perfstat' functions. Only valid data is returned (Example: If you call
'AIX::Perfstat::netinterface(5)' on a machine with only 2 network
interfaces, the returned array will only contain two entries.) When these
functions are called with a variable for the name parameter the variable
will be modified in place to contain the name of the next available record,
or "" if no more records are available.
%prep
%setup -q -n %{cpan_name}-%{version}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
%{__make} %{?_smp_mflags}
%check
%{__make} test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes README
%changelog