Files
perl-HTML-Gumbo/perl-HTML-Gumbo.spec
2025-08-12 18:14:34 +02:00

82 lines
2.4 KiB
RPMSpec

#
# spec file for package perl-HTML-Gumbo
#
# Copyright (c) 2024 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/
#
%define cpan_name HTML-Gumbo
Name: perl-HTML-Gumbo
Version: 0.180.0
Release: 0
# 0.18 -> normalize -> 0.180.0
%define cpan_version 0.18
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: HTML5 parser based on gumbo C library
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/R/RU/RUZ/%{cpan_name}-%{cpan_version}.tar.gz
Source100: README.md
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Alien::LibGumbo) >= 0.30.0
BuildRequires: perl(ExtUtils::CBuilder)
BuildRequires: perl(Module::Build) >= 0.42
Requires: perl(Alien::LibGumbo) >= 0.30.0
Provides: perl(HTML::Gumbo) = %{version}
%undefine __perllib_provides
%{perl_requires}
%description
at https://github.com/google/gumbo-parser is an implementation of at
http://www.w3.org/TR/html5/syntax.html implemented as a pure C99 library
with no outside dependencies.
Goals and features of the C library:
* * Fully conformant with the HTML5 spec.
* * Robust and resilient to bad input.
* * Simple API that can be easily wrapped by other languages. (This is one
of such wrappers.)
* * Support for source locations and pointers back to the original text.
(Not exposed by this implementation at the moment.)
* * Relatively lightweight, with no outside dependencies.
* * Passes all html5lib-0.95 tests.
* * Tested on over 2.5 billion pages from Google's index.
%prep
%autosetup -n %{cpan_name}-%{cpan_version}
%build
perl Build.PL --installdirs=vendor optimize="%{optflags}"
./Build build --flags=%{?_smp_mflags}
%check
./Build test
%install
./Build install --destdir=%{buildroot} --create_packlist=0
%perl_gen_filelist
%files -f %{name}.files
%doc Changes
%license LICENSE
%changelog