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

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
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)

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 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).

%setup -q -n %{cpan_name}-%{version}

%{__perl} Build.PL installdirs=vendor
./Build build flags=%{?_smp_mflags}

./Build test

./Build install destdir=%{buildroot} create_packlist=0

%files -f %{name}.files
%doc Changes README

openSUSE Build Service is sponsored by