# If we have a core package, update API definition from there,
# otherwise leave everything as it is.
%if 0%{?rhel}
%bcond_with core_iedoc
%else
%bcond_without core_iedoc
%endif
Name: perl-Test-WWW-Selenium
Version: 1.25
Release: 4%{?dist}
Summary: Perl Client for the Selenium Remote Control test tool
License: (GPL+ or Artistic) and ASL 2.0
Group: Development/Libraries
URL: http://search.cpan.org/dist/Test-WWW-Selenium/
Source0: http://www.perl.org/authors/id/L/LU/LUKEC/Test-WWW-Selenium-%{version}.tar.gz
BuildArch: noarch
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Test::More) >= 0.42
BuildRequires: perl(Test::Exception)
BuildRequires: perl(Test::Mock::LWP)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(LWP::UserAgent)
BuildRequires: perl(URI::Escape) >= 1.31
BuildRequires: perl(CPAN)
BuildRequires: perl(Time::HiRes)
%if %with core_iedoc
BuildRequires: selenium-core
%endif
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: perl(Time::HiRes)
%description
Selenium Remote Control (SRC) is a test tool that allows you to write
automated web application UI tests in any programming language against any
HTTP website using any mainstream JavaScript-enabled browser. SRC provides
a Selenium Server, which can automatically start/stop/control any supported
browser. It works by using Selenium Core, a pure-HTML+JS library that
performs automated tasks in JavaScript; the Selenium Server communicates
directly with the browser using AJAX (XmlHttpRequest).
%prep
%setup -q -n Test-WWW-Selenium-%{version}
%if %with core_iedoc
# Newer API definition
mkdir -p target
unzip -qc %{_datadir}/java/selenium-core.jar core/iedoc.xml >target/iedoc.xml
%endif
%build
%if %with core_iedoc
# Recreate module with newer API
%{__perl} util/create_www_selenium.pl
%endif
%{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
%install
make pure_install PERL_INSTALL_ROOT=$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
%files
%doc Changes README todo.txt
%{perl_vendorlib}/*
%{_mandir}/man3/*
%changelog
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Jun 15 2012 Petr Pisar <ppisar@redhat.com> - 1.25-3
- Perl 5.16 rebuild
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Sun Oct 2 2011 Tom Callaway <spot@fedoraproject.org> - 1.25-1
- update to 1.25
* Tue Jul 19 2011 Petr Sabata <contyk@redhat.com> - 1.23-5
- Perl mass rebuild
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.23-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Dec 22 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.23-3
- 661697 rebuild for fixing problems with vendorach/lib
* Sun Dec 12 2010 Lubomir Rintel <lkundrak@v3.sk> - 1.23-2
- Require Time::HiRes
* Sun Dec 12 2010 Lubomir Rintel <lkundrak@v3.sk> - 1.23-1
- Newer release
- Do not require core in el6
* Thu Jun 3 2010 Marcela Mašláňová <mmaslano@redhat.com> - 1.22-1
- update
* Fri May 07 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.21-3
- Mass rebuild with perl-5.12.0
* Thu Mar 18 2010 Lubomir Rintel (GoodData) <lubo.rintel@gooddata.com> - 1.21-2
- Fix a packaging bug that caused incorrect Selenium.pm to be generated
- Enable foolishly disabled tests back
* Sun Feb 21 2010 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 1.21-1
- Newer release
- use API definitions from packaged selenium-core
* Fri Dec 4 2009 Stepan Kasal <skasal@redhat.com> - 1.18-2
- rebuild against perl 5.10.1
* Mon Sep 07 2009 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> 0.18-1
- Newer release, update API support to 1.0.1
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.15-5.20081021svn
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.15-4.20081021svn
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Tue Oct 21 2008 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> 0.15-3.20081021svn
- Bump to SCM snapshot to be able to test right-click javascript menus
* Mon Jun 23 2008 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> 0.15-2
- Fixed License tag to include Apache, thanks Parag AN
* Mon Jun 16 2008 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> 0.15-1
- Specfile autogenerated by cpanspec 1.75.
- Fix requires