|
|
02c0673 |
# Supported rpmbuild options:
|
|
|
02c0673 |
#
|
|
|
02c0673 |
# --with live-test/--without live-test
|
|
|
02c0673 |
# include/exclude LIVE_TEST testsuite
|
|
|
02c0673 |
# Default: --without (Requires networking, doesn't work in mock)
|
|
|
02c0673 |
%bcond_with live_test
|
|
|
02c0673 |
|
|
|
02c0673 |
Name: perl-Web-Scraper
|
|
|
9981bcf |
Version: 0.37
|
|
|
fa3bae3 |
Release: 2%{?dist}
|
|
|
02c0673 |
Summary: Web Scraping Toolkit using HTML and CSS Selectors or XPath expressions
|
|
|
02c0673 |
License: GPL+ or Artistic
|
|
|
02c0673 |
Group: Development/Libraries
|
|
|
02c0673 |
URL: http://search.cpan.org/dist/Web-Scraper/
|
|
|
02c0673 |
Source0: http://www.cpan.org/authors/id/M/MI/MIYAGAWA/Web-Scraper-%{version}.tar.gz
|
|
|
02c0673 |
# Misc. hacks to make the testsuite working
|
|
|
02c0673 |
Patch0: Web-Scraper-0.36-testsuite-hacks.patch
|
|
|
02c0673 |
BuildArch: noarch
|
|
|
02c0673 |
|
|
|
02c0673 |
BuildRequires: perl(base)
|
|
|
02c0673 |
BuildRequires: perl(Carp)
|
|
|
02c0673 |
BuildRequires: perl(ExtUtils::MakeMaker)
|
|
|
02c0673 |
BuildRequires: perl(HTML::Entities)
|
|
|
02c0673 |
BuildRequires: perl(HTML::Selector::XPath) >= 0.03
|
|
|
02c0673 |
BuildRequires: perl(HTML::Tagset)
|
|
|
02c0673 |
BuildRequires: perl(HTML::TreeBuilder) >= 3.23
|
|
|
02c0673 |
BuildRequires: perl(HTML::TreeBuilder::XPath) >= 0.08
|
|
|
02c0673 |
BuildRequires: perl(HTML::TreeBuilder::LibXML) >= 0.13
|
|
|
02c0673 |
BuildRequires: perl(List::Util)
|
|
|
02c0673 |
BuildRequires: perl(LWP) >= 5.827
|
|
|
02c0673 |
BuildRequires: perl(LWP::UserAgent)
|
|
|
02c0673 |
BuildRequires: perl(Scalar::Util)
|
|
|
02c0673 |
BuildRequires: perl(Test::Base)
|
|
|
02c0673 |
BuildRequires: perl(Test::More)
|
|
|
02c0673 |
BuildRequires: perl(Test::Requires)
|
|
|
02c0673 |
BuildRequires: perl(UNIVERSAL::require)
|
|
|
02c0673 |
BuildRequires: perl(URI)
|
|
|
02c0673 |
BuildRequires: perl(warnings)
|
|
|
02c0673 |
BuildRequires: perl(XML::XPathEngine) >= 0.08
|
|
|
02c0673 |
BuildRequires: perl(YAML)
|
|
|
02c0673 |
BuildRequires: perl(strict)
|
|
|
02c0673 |
|
|
|
02c0673 |
# Required by the testsuite
|
|
|
02c0673 |
BuildRequires: /bin/ps
|
|
|
02c0673 |
|
|
|
02c0673 |
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
|
|
02c0673 |
|
|
|
02c0673 |
# rpm's deptracker misses these:
|
|
|
02c0673 |
Requires: perl(LWP::UserAgent)
|
|
|
02c0673 |
|
|
|
02c0673 |
%{?perl_default_filter}
|
|
|
02c0673 |
|
|
|
02c0673 |
%description
|
|
|
02c0673 |
Web::Scraper is a web scraper toolkit, inspired by Ruby's equivalent
|
|
|
02c0673 |
Scrapi. It provides a DSL-ish interface for traversing HTML documents and
|
|
|
02c0673 |
returning a neatly arranged Perl data structure.
|
|
|
02c0673 |
|
|
|
02c0673 |
%prep
|
|
|
02c0673 |
%setup -q -n Web-Scraper-%{version}
|
|
|
02c0673 |
%patch0 -p1
|
|
|
02c0673 |
|
|
|
02c0673 |
%build
|
|
|
02c0673 |
# --skipdeps causes ExtUtils::AutoInstall not to try auto-installing
|
|
|
02c0673 |
# missing modules
|
|
|
02c0673 |
%{__perl} Makefile.PL INSTALLDIRS=vendor --skipdeps
|
|
|
02c0673 |
make %{?_smp_mflags}
|
|
|
02c0673 |
|
|
|
02c0673 |
%install
|
|
|
02c0673 |
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
|
|
|
02c0673 |
|
|
|
02c0673 |
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
|
|
|
02c0673 |
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
|
|
|
02c0673 |
|
|
|
02c0673 |
%{_fixperms} $RPM_BUILD_ROOT/*
|
|
|
02c0673 |
|
|
|
02c0673 |
%check
|
|
|
02c0673 |
make test LEAK_TEST=1 %{?with_live_test:LIVE_TEST=1}
|
|
|
02c0673 |
|
|
|
02c0673 |
%files
|
|
|
02c0673 |
%defattr(-,root,root,-)
|
|
|
02c0673 |
%doc Changes README
|
|
|
02c0673 |
%{_bindir}/scraper
|
|
|
02c0673 |
%{perl_vendorlib}/*
|
|
|
02c0673 |
%{_mandir}/man3/*
|
|
|
02c0673 |
|
|
|
02c0673 |
%changelog
|
|
|
fa3bae3 |
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.37-2
|
|
|
fa3bae3 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
fa3bae3 |
|
|
|
9981bcf |
* Tue Oct 30 2012 Ralf Corsépius <corsepiu@fedoraproject.org> 0.37-1
|
|
|
9981bcf |
- Upstream update.
|
|
|
9981bcf |
|
|
|
02c0673 |
* Tue Aug 07 2012 Ralf Corsépius <corsepiu@fedoraproject.org> 0.36-2
|
|
|
02c0673 |
- R: perl(LWP::UserAgent).
|
|
|
02c0673 |
- Make live tests working (Add Web-Scraper-0.36-testsuite-hacks.patch).
|
|
|
02c0673 |
- BR: /bin/ps.
|
|
|
02c0673 |
|
|
|
02c0673 |
* Tue Jul 10 2012 Ralf Corsépius <corsepiu@fedoraproject.org> 0.36-1.20120710.0
|
|
|
02c0673 |
- Merge in Xavier's spec.
|
|
|
02c0673 |
|
|
|
02c0673 |
* Fri Jan 21 2012 Ralf Corsépius <corsepiu@fedoraproject.org> 0.36-1.20120121.0
|
|
|
02c0673 |
- More deps.
|
|
|
02c0673 |
- Add %%{?perl_default_filter}.
|
|
|
02c0673 |
|
|
|
02c0673 |
* Mon Dec 19 2011 Ralf Corsépius <corsepiu@fedoraproject.org> 0.36-1
|
|
|
02c0673 |
- Upstream update.
|
|
|
02c0673 |
- Add --with/without live-test (disabled by default).
|
|
|
02c0673 |
|
|
|
02c0673 |
* Wed Mar 30 2011 Ralf Corsépius <corsepiu@fedoraproject.org> 0.34-1
|
|
|
02c0673 |
- Upstream update.
|
|
|
02c0673 |
- Spec cleanup.
|
|
|
02c0673 |
|
|
|
02c0673 |
* Tue Dec 21 2010 Ralf Corsépius <corsepiu@fedoraproject.org> 0.32-1
|
|
|
02c0673 |
- Initial Fedora package.
|