File perl-Unix-Lsof.spec of Package perl-Unix-Lsof
#
# spec file for package perl-Unix-Lsof
#
# Copyright (c) 2015 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-Unix-Lsof
Version: 0.1.0
Release: 0
%define cpan_name Unix-Lsof
Summary: Wrapper to the Unix lsof utility
License: GPL-1.0+ or Artistic-1.0
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Unix-Lsof/
#Source: http://www.cpan.org/authors/id/M/MA/MARCB/%{cpan_name}/Unix-Lsof-%{version}.tar.gz
Source: Unix-Lsof-0.1.0.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(IPC::Run3)
BuildRequires: perl(Module::Build)
BuildRequires: perl(version)
Requires: perl(IPC::Run3)
Requires: perl(version)
%{perl_requires}
%description
This module is a wrapper around the Unix lsof utility (written by Victor
A.Abell, Copyright Purdue University), which lists open files as well as
information about the files and processes opening them. 'Unix::Lsof' uses
the lsof binary, so you need to have that installed in order to use this
module (lsof can be obtained from the
ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof manpage).
By default, this module exports a single function 'lsof', to which you can
pass the same parameters you would the lsof binary. When called in list
context, 'lsof' will return two values, a hash reference containing the
parsed output of the lsof binary and a string containing (unparsed) any
error messages. When called in scalar context, 'lsof' will return a
'Unix::Lsof::Result' object (see the documentation for that module for
further details).
On request, you can also export the subroutine 'parse_lsof_output' which
will do what the name says and return the parsed output. Both of these
support a number of options, passed in as a hash reference as the last
argument (see section "OPTIONS" below).
%prep
%setup -q -n %{cpan_name}-%{version}
%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 README
%changelog