8
0
Files
perl-Web-Scraper/perl-Web-Scraper.spec

107 lines
3.3 KiB
RPMSpec
Raw Normal View History

# vim: set sw=4 ts=4 et nu:
# norootforbuild
Name: perl-Web-Scraper
Version: 0.32
Release: 0
Summary: Web Scraping Toolkit using HTML and CSS Selectors or XPath expressions
Source: http://search.cpan.org/CPAN/authors/id/M/MI/MIYAGAWA/Web-Scraper-%{version}.tar.gz
URL: http://search.cpan.org/dist/Web-Scraper
Group: Development/Libraries/Perl
License: Perl License
BuildRoot: %{_tmppath}/build-%{name}-%{version}
Requires: perl = %{perl_version}
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: make
BuildRequires: perl(Test::More)
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.42
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Scalar::Util)
BuildRequires: perl(HTML::TreeBuilder::XPath) >= 0.08
BuildRequires: perl(HTML::TreeBuilder::LibXML)
BuildRequires: perl(YAML)
BuildRequires: perl(URI)
BuildRequires: perl(XML::XPathEngine) >= 0.08
BuildRequires: perl(HTML::TreeBuilder) >= 3.23
BuildRequires: perl(Filter::Util::Call)
BuildRequires: perl(HTML::Entities)
BuildRequires: perl(HTML::Selector::XPath) >= 0.03
BuildRequires: perl(HTML::Tagset)
BuildRequires: perl(UNIVERSAL::require)
BuildRequires: perl(LWP) >= 5.827
Requires: perl(Scalar::Util)
Requires: perl(HTML::TreeBuilder::XPath) >= 0.08
Requires: perl(HTML::TreeBuilder::LibXML)
Requires: perl(YAML)
Requires: perl(URI)
Requires: perl(XML::XPathEngine) >= 0.08
Requires: perl(HTML::TreeBuilder) >= 3.23
Requires: perl(Filter::Util::Call)
Requires: perl(HTML::Entities)
Requires: perl(HTML::Selector::XPath) >= 0.03
Requires: perl(HTML::Tagset)
Requires: perl(UNIVERSAL::require)
Requires: perl(LWP) >= 5.827
%description
Web::Scraper is a web scraper toolkit, inspired by Ruby's equivalent
Scrapi. It provides a DSL-ish interface for traversing HTML documents and
returning a neatly arranged Perl data strcuture.
The *scraper* and *process* blocks provide a method to define what
segments of a document to extract. It understands HTML and CSS Selectors
as well as XPath expressions.
%package -n scraper
Summary: Web Scraping Tool using HTML and CSS Selectors or XPath expressions
Group: Productivity/Networking/Web/Utilities
Requires: %{name} = %{version}
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
%description -n scraper
Web::Scraper is a web scraper toolkit, inspired by Ruby's equivalent
Scrapi. It provides a command-line tool for traversing HTML documents and
returning a neatly arranged Perl data strcuture.
%prep
%setup -q -n "Web-Scraper-%{version}"
%__sed -i '/^auto_install/d' Makefile.PL
%build
%__perl Makefile.PL PREFIX="%{_prefix}"
%__make %{?jobs:-j%{jobs}}
%install
%perl_make_install
%perl_process_packlist
mkdir .rpmdoc
for f in Changes README; do
%__ln_s -f "../%{name}/$f" .rpmdoc/"$f"
done
%check
%__make test
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
%files
%defattr(-,root,root)
%doc Changes README
%dir %{perl_vendorlib}/Web
%{perl_vendorlib}/Web/Scraper.pm
%{perl_vendorlib}/Web/Scraper
%dir %{perl_vendorarch}/auto/Web
%{perl_vendorarch}/auto/Web/Scraper
%doc %{perl_man3dir}/Web::Scraper.%{perl_man3ext}%{ext_man}
%doc %{perl_man3dir}/Web::Scraper::*.%{perl_man3ext}%{ext_man}
%files -n scraper
%defattr(-,root,root)
%doc .rpmdoc/*
%{_bindir}/scraper