Blob Blame History Raw
Name:           perl-Nagios-Plugin-WWW-Mechanize
Version:        0.13
Release:        4%{?dist}
Summary:        Login to a web page as a user and get data as a Nagios plugin
License:        GPL+ or Artistic
Group:          Development/Libraries
URL:            http://search.cpan.org/dist/Nagios-Plugin-WWW-Mechanize/
Source0:        http://search.cpan.org/CPAN/authors/id/T/TO/TONVOON/Nagios-Plugin-WWW-Mechanize-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch
BuildRequires:  perl >= 1:5.6.0
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(Nagios::Plugin)
BuildRequires:  perl(WWW::Mechanize)
BuildRequires:  perl(Test::More)
%{?el6:BuildRequires:  perl(Time::HiRes)}
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

%description
This module ties Nagios::Plugin with WWW::Mechanize so that there's less
code in your perl script and the most common work is done for you.

%prep
%setup -q -n Nagios-Plugin-WWW-Mechanize-%{version}

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

%install
rm -rf $RPM_BUILD_ROOT

make pure_install DESTDIR=$RPM_BUILD_ROOT

find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;

%{_fixperms} $RPM_BUILD_ROOT/*

%check
make test

%clean
rm -rf $RPM_BUILD_ROOT

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

%changelog
* Wed Jul 20 2011 Petr Sabata <contyk@redhat.com> - 0.13-4
- Perl mass rebuild

* Fri Mar 04 2011 ktdreyer@ktdreyer.com 0.13-2
- use DESTDIR in place of PERL_INSTALL_ROOT
- rm explicit Requires (Nagios::Plugin and WWW::Mechanize are auto-determined)
- Wrap BuildRequires for EL6 in a conditional DistTag

* Wed Mar 02 2011 ktdreyer@ktdreyer.com 0.13-2
- Add Time::HiRes as BuildRequires, to support EL6

* Tue Mar 01 2011 ktdreyer@ktdreyer.com 0.13-1
- Specfile autogenerated by cpanspec 1.78.