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
8cb5ba6
Version:        0.38
2228255
Release:        10%{?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
BuildArch:      noarch
02c0673
efb1065
BuildRequires:  perl-generators
02c0673
BuildRequires:  perl(base)
8cb5ba6
BuildRequires:  perl(Module::Build::Tiny) >= 0.039
02c0673
BuildRequires:  perl(Carp)
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
43b7126
BuildRequires:  %{_bindir}/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}
8cb5ba6
8cb5ba6
# Package does not depend on ExtUtils::MakeMaker
8cb5ba6
sed -i '/ExtUtils::MakeMaker/d' META.*
02c0673
02c0673
%build
8cb5ba6
%{__perl} Build.PL --installdirs=vendor
8cb5ba6
./Build
02c0673
02c0673
%install
8cb5ba6
./Build install --destdir=$RPM_BUILD_ROOT --create_packlist=0
8cb5ba6
8cb5ba6
# Web-Scraper >= 0.38 misses to install bin/scaper
8cb5ba6
# Install it manually
8cb5ba6
install -m 755 -d ${RPM_BUILD_ROOT}%{_bindir}
8cb5ba6
install -m 755 bin/scraper ${RPM_BUILD_ROOT}%{_bindir}
02c0673
02c0673
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
02c0673
02c0673
%{_fixperms} $RPM_BUILD_ROOT/*
02c0673
02c0673
%check
8cb5ba6
LEAK_TEST=1 %{?with_live_test:LIVE_TEST=1} ./Build test
02c0673
02c0673
%files
02c0673
%doc Changes README
02c0673
%{_bindir}/scraper
02c0673
%{perl_vendorlib}/*
02c0673
%{_mandir}/man3/*
02c0673
02c0673
%changelog
2228255
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.38-10
2228255
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
2228255
3d86e1f
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.38-9
3d86e1f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
3d86e1f
eea9d61
* Mon Jun 05 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.38-8
eea9d61
- Perl 5.26 rebuild
eea9d61
d8e0d36
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.38-7
d8e0d36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
d8e0d36
d991a85
* Mon May 16 2016 Jitka Plesnikova <jplesnik@redhat.com> - 0.38-6
d991a85
- Perl 5.24 rebuild
d991a85
46f313a
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.38-5
46f313a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
46f313a
43b7126
* Tue Sep 29 2015 Petr Pisar <ppisar@redhat.com> - 0.38-4
43b7126
- Correct dependency on ps tool
43b7126
1ba9ce9
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.38-3
1ba9ce9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
1ba9ce9
7d3406c
* Sat Jun 06 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.38-2
7d3406c
- Perl 5.22 rebuild
7d3406c
8cb5ba6
* Thu Oct 23 2014 Ralf Corsépius <corsepiu@fedoraproject.org> - 0.38-1
8cb5ba6
- Upstream update.
8cb5ba6
- Fix bogus %%changelog entry.
8cb5ba6
- Reflect upstream having changed to Build.PL.
8cb5ba6
- Work-around to upstream having missed to install bin/scrapper.
8cb5ba6
da105ee
* Fri Aug 29 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.37-6
da105ee
- Perl 5.20 rebuild
da105ee
46835aa
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.37-5
46835aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
46835aa
610dd8e
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.37-4
610dd8e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
610dd8e
f262bc3
* Fri Aug 02 2013 Petr Pisar <ppisar@redhat.com> - 0.37-3
f262bc3
- Perl 5.18 rebuild
f262bc3
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
8cb5ba6
* Sat 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.