%define real_name    Parse-Nessus-NBE

Summary:	Extract information from Nessus NBE files
Name:		perl-%{real_name}
Version:	1.1
Release:	2%{?_dist_release}
License:	Artistic or GPL+
Group:		Development/Libraries
Url:		http://search.cpan.org/dist/%{real_name}
Source0:	http://search.cpan.org/CPAN/authors/id/D/DK/DKYGER/%{real_name}-%{version}.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch:	noarch
BuildRequires:	perl
BuildRequires:	perl(ExtUtils::MakeMaker)
Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires:	perl(Exporter)

%description
This module is designed to extract information from Nessus NBE
files. Functions have been designed to return certain sets of data,
such as service banners and OS versions. Other functions have been
provided that will return more specific information, such as all IPs
listening on a given port or all IPs associated with a specified plugin id.

%prep
%setup -q -n %{real_name}-%{version}

%build
perl Makefile.PL INSTALLDIRS="vendor"
make %{?_smp_mflags}

%check
make test

%install
rm -rf %{buildroot}
make pure_install PERL_INSTALL_ROOT=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
find %{buildroot} -type d -depth -exec rmdir {} 2>/dev/null ';'

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc Changes README MANIFEST
%{_mandir}/man3/*
%{perl_vendorlib}/*


%changelog
* Wed Dec 10 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 1.1-2
- rebuilt with perl 5.16.3

* Wed Mar 14 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.1-1
- initial build for Vine Linux
