#
# Rebuild switch:
# --with livetests enable live tests
#
Name: perl-WWW-Mechanize
Version: 1.12
Release: 3%{?dist}
Summary: Automates web page form & link interaction
Group: Development/Libraries
License: GPL or Artistic
URL: http://search.cpan.org/dist/WWW-Mechanize/
Source0: http://www.cpan.org/authors/id/P/PE/PETDANCE/WWW-Mechanize-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: perl >= 1:5.6.1
BuildRequires: perl(Test::Pod), perl(Test::Exception)
BuildRequires: perl(Test::Memory::Cycle), perl(Test::Taint), perl(Test::Warn)
BuildRequires: perl(HTML::TokeParser), perl(LWP::UserAgent), perl(URI::URL)
%{?_with_livetests:BuildRequires: perl(IO::Socket::SSL)}
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description
"WWW::Mechanize", or Mech for short, helps you automate interaction
with a website. It supports performing a sequence of page fetches
including following links and submitting forms. Each fetched page is
parsed and its links and forms are extracted. A link or a form can be
selected, form fields can be filled and the next page can be fetched.
Mech also stores a history of the URLs you've visited, which can be
queried and revisited.
%prep
%setup -q -n WWW-Mechanize-%{version}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor %{!?_with_livetests: --nolive} < /dev/null
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*
%check
make test
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc Changes etc/www-mechanize-logo.png
%{_bindir}/mech-dump
%{perl_vendorlib}/WWW/
%{_mandir}/man1/*.1*
%{_mandir}/man3/*.3*
%changelog
* Thu Aug 25 2005 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.12-3
- Conditional rebuild switch to enable live tests (RFE in #165650).
* Fri Jul 1 2005 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.12-2
- Dist tag.
* Sat Feb 26 2005 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0:1.12-0.fdr.1
- Update to 1.12.
* Mon Feb 14 2005 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0:1.10-0.fdr.1
- Update to 1.10.
* Sat Dec 25 2004 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0:1.08-0.fdr.1
- Update to 1.08.
* Sun Jul 04 2004 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0:1.02-0.fdr.1
- First build.