forked from pool/perl-HTML-Parser
Dirk Mueller
c0dbb6703a
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-HTML-Parser?expand=0&rev=21
100 lines
3.2 KiB
RPMSpec
100 lines
3.2 KiB
RPMSpec
#
|
|
# spec file for package perl-HTML-Parser (Version 3.68)
|
|
#
|
|
# Copyright (c) 2010 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/
|
|
#
|
|
|
|
# vim: set sw=4 ts=4 et nu:
|
|
# norootforbuild
|
|
|
|
%bcond_with opt
|
|
|
|
Name: perl-HTML-Parser
|
|
Version: 3.68
|
|
Release: 0
|
|
Summary: HTML parser class
|
|
Source: http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/HTML-Parser-%{version}.tar.bz2
|
|
URL: http://search.cpan.org/dist/HTML-Parser
|
|
Group: Development/Libraries/Perl
|
|
License: Perl License
|
|
BuildRoot: %{_tmppath}/build-%{name}-%{version}
|
|
Requires: perl = %{perl_version}
|
|
BuildRequires: perl
|
|
BuildRequires: make
|
|
BuildRequires: perl(Test::More)
|
|
BuildRequires: perl(ExtUtils::MakeMaker)
|
|
BuildRequires: perl(XSLoader)
|
|
BuildRequires: perl(HTML::Tagset) >= 3
|
|
Requires: perl(XSLoader)
|
|
Requires: perl(HTML::Tagset) >= 3
|
|
Recommends: perl(HTML::Headers)
|
|
%if %{with opt}
|
|
BuildRequires: perl(HTTP::Headers)
|
|
BuildRequires: perl(Test::Pod) >= 1.00
|
|
%endif
|
|
|
|
%description
|
|
Objects of the HTML::Parser class will recognize markup and separate it
|
|
from plain text (alias data content) in HTML documents. As different
|
|
kinds of markup and text are recognized, the corresponding event handlers
|
|
are invoked.
|
|
|
|
HTML::Parser is not a generic SGML parser. We have tried to make it able to
|
|
deal with the HTML that is actually "out there", and it normally parses as
|
|
closely as possible to the way the popular web browsers do it instead of
|
|
strictly following one of the many HTML specifications from W3C. Where
|
|
there is disagreement, there is often an option that you can enable to
|
|
get the official behaviour.
|
|
|
|
The document to be parsed may be supplied in arbitrary chunks. This makes
|
|
on-the-fly parsing as documents are received from the network possible.
|
|
|
|
If event driven parsing does not feel right for your application, you might
|
|
want to use HTML::PullParser. This is an HTML::Parser subclass that allows
|
|
a more conventional program structure.
|
|
|
|
|
|
%prep
|
|
%setup -q -n "HTML-Parser-%{version}"
|
|
%__sed -i '/^auto_install/d' Makefile.PL
|
|
|
|
# rpmlint: spurious-executable-perm
|
|
find ./eg -type f -exec %__chmod 0644 {} \;
|
|
%__chmod 0644 mkpfunc mkhctype
|
|
|
|
%build
|
|
%__perl Makefile.PL PREFIX="%{_prefix}"
|
|
%__make %{?jobs:-j%{jobs}}
|
|
|
|
%install
|
|
%perl_make_install
|
|
%perl_process_packlist
|
|
|
|
%check
|
|
%__make test
|
|
|
|
%clean
|
|
%{?buildroot:%__rm -rf "%{buildroot}"}
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc Changes mkhctype mkpfunc README TODO eg
|
|
%dir %{perl_vendorarch}/HTML
|
|
%{perl_vendorarch}/HTML/*.pm
|
|
%dir %{perl_vendorarch}/auto/HTML
|
|
%{perl_vendorarch}/auto/HTML/Parser
|
|
%doc %{perl_man3dir}/HTML::*.%{perl_man3ext}%{ext_man}
|
|
/var/adm/perl-modules/%{name}
|
|
|