Files
perl-HTML-HTML5-Parser/perl-HTML-HTML5-Parser.spec

82 lines
2.5 KiB
RPMSpec

#
# spec file for package perl-HTML-HTML5-Parser
#
# Copyright (c) 2020 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name: perl-HTML-HTML5-Parser
Version: 0.301
Release: 0
%define cpan_name HTML-HTML5-Parser
Summary: Parse HTML reliably
License: Artistic-1.0 OR GPL-1.0-or-later
Group: Development/Libraries/Perl
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/T/TO/TOBYINK/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(HTML::HTML5::Entities) >= 0.002
BuildRequires: perl(HTTP::Tiny)
BuildRequires: perl(IO::HTML)
BuildRequires: perl(Try::Tiny)
BuildRequires: perl(URI::file)
BuildRequires: perl(XML::LibXML) >= 1.94
BuildRequires: perl(XML::LibXML::Devel)
Requires: perl(HTML::HTML5::Entities) >= 0.002
Requires: perl(HTTP::Tiny)
Requires: perl(IO::HTML)
Requires: perl(Try::Tiny)
Requires: perl(URI::file)
Requires: perl(XML::LibXML) >= 1.94
Requires: perl(XML::LibXML::Devel)
%{perl_requires}
%description
This library is substantially the same as the non-CPAN module Whatpm::HTML.
Changes include:
* * Provides an XML::LibXML-like DOM interface. If you usually use
XML::LibXML's DOM parser, this should be a drop-in solution for tag soup
HTML.
* * Constructs an XML::LibXML::Document as the result of parsing.
* * Via bundling and modifications, removed external dependencies on
non-CPAN packages.
%prep
%setup -q -n %{cpan_name}-%{version}
%build
PERL_USE_UNSAFE_INC=1 perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
%check
make test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes COPYRIGHT CREDITS examples NEWS README TODO
%license LICENSE
%changelog