File perl-WWW-Mechanize.spec of Package perl-WWW-Mechanize
#
# spec file for package perl-WWW-Mechanize
#
# Copyright (c) 2011 SUSE LINUX Products 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/
#
# norootforbuild
%bcond_with TestServer
%bcond_with opt
%bcond_with pod
Name: perl-WWW-Mechanize
%define cpan_name WWW-Mechanize
Summary: Handy web browsing in a Perl object
Version: 1.70
Release: 1
License: GPL+ or Artistic
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/WWW-Mechanize/
Source: http://www.cpan.org/modules/by-module/WWW/WWW-Mechanize-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(HTML::TreeBuilder)
%if %{with TestServer}
# needed for t/cookies.t t/TestServer.pm
BuildRequires: perl(HTTP::Server::Simple) >= 0.35
BuildRequires: perl(HTTP::Server::Simple::CGI)
%endif
BuildRequires: perl(Test::Memory::Cycle)
BuildRequires: perl(Test::NoWarnings)
BuildRequires: perl(Test::Exception)
BuildRequires: perl(Test::Taint)
%if %{with pod}
BuildRequires: perl(Test::Pod) >= 1.14
BuildRequires: perl(Test::Pod::Coverage) >= 1.04
%endif
BuildRequires: perl(Test::More) >= 0.34
BuildRequires: perl(Test::Warn) >= 0.11
#
BuildRequires: perl(Carp)
BuildRequires: perl(File::Temp)
BuildRequires: perl(Getopt::Long)
BuildRequires: perl(HTML::Parser) >= 3.33
### coming with HTML::Parser
BuildRequires: perl(HTML::HeadParser)
BuildRequires: perl(HTML::TokeParser) >= 2.28
BuildRequires: perl(LWP) >= 5.829
### coming with LWP
BuildRequires: perl(HTML::Form) >= 1.038
BuildRequires: perl(HTTP::Daemon)
BuildRequires: perl(HTTP::Request) >= 1.3
BuildRequires: perl(HTTP::Status)
BuildRequires: perl(LWP::UserAgent) >= 5.829
BuildRequires: perl(URI) >= 1.36
### coming with URI
BuildRequires: perl(URI::file)
BuildRequires: perl(URI::URL)
#
Requires: perl(Carp)
Requires: perl(File::Temp)
Requires: perl(Getopt::Long)
Requires: perl(HTML::TreeBuilder)
Requires: perl(HTML::Parser) >= 3.33
### coming with HTML::Parser
Requires: perl(HTML::HeadParser)
Requires: perl(HTML::TokeParser) >= 2.28
Requires: perl(LWP) >= 5.829
### coming with LWP
Requires: perl(HTML::Form) >= 1.038
Requires: perl(HTTP::Daemon)
Requires: perl(HTTP::Request) >= 1.3
Requires: perl(HTTP::Status)
Requires: perl(LWP::UserAgent) >= 5.829
Requires: perl(URI) >= 1.36
### coming with URI
Requires: perl(URI::file)
Requires: perl(URI::URL)
%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.
Authors:
--------
Andy Lester <andy@petdance.com>
%prep
%setup -q -n %{cpan_name}-%{version}
%if !%{with TestServer}
%{__rm} -rf t/cookies.t
%endif
%build
# tests in t/live/*.t want network connectivity
%{__perl} Makefile.PL --nolive INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
%check
%{__make} test
%install
%perl_make_install
# do not perl_process_packlist (noarch)
# remove .packlist file
%{__rm} -rf $RPM_BUILD_ROOT%perl_vendorarch
# remove perllocal.pod file
%{__rm} -rf $RPM_BUILD_ROOT%perl_archlib
%perl_gen_filelist
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%files -f %{name}.files
%defattr(-,root,root,-)
%doc Changes perlcriticrc
%changelog