2024-07-14 19:18:46 +00:00
committed by Git OBS Bridge
parent 6b3a194dc4
commit ac4cbb7916

View File

@@ -1,7 +1,7 @@
#
# spec file for package perl-XML-TreeBuilder
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# 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
@@ -12,33 +12,36 @@
# 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/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: perl-XML-TreeBuilder
Version: 5.4
Release: 0
%define cpan_name XML-TreeBuilder
Summary: Parser that builds a tree of XML::Element objects
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/XML-TreeBuilder/
Source0: http://www.cpan.org/authors/id/J/JF/JFEARN/%{cpan_name}-%{version}.tar.gz
Name: perl-XML-TreeBuilder
Version: 5.400.0
Release: 0
# 5.4 -> normalize -> 5.400.0
%define cpan_version 5.4
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: XML elements with the same interface as HTML::Element
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/J/JF/JFEARN/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(HTML::Element) >= 4.1
BuildRequires: perl(HTML::Tagset) >= 3.02
BuildRequires: perl(Module::Build)
BuildRequires: perl(XML::Catalog) >= 1.02
BuildRequires: perl(XML::Catalog) >= 1.20.0
BuildRequires: perl(XML::Parser)
Requires: perl(HTML::Element) >= 4.1
Requires: perl(HTML::Tagset) >= 3.02
Requires: perl(XML::Catalog) >= 1.02
Requires: perl(XML::Catalog) >= 1.20.0
Requires: perl(XML::Parser)
Provides: perl(XML::Element) = %{version}
Provides: perl(XML::TreeBuilder) = %{version}
%undefine __perllib_provides
%{perl_requires}
%description
@@ -56,8 +59,8 @@ The way to use this class is to:
2. set any of the "store" options you want.
3. then parse the document from a source by calling '$x->parsefile(...)' or
'$x->parse(...)' (See the XML::Parser manpage docs for the options that
these two methods take)
'$x->parse(...)' (See XML::Parser docs for the options that these two
methods take)
4. do whatever you need to do with the syntax tree, presumably involving
traversing it looking for some bit of information in it,
@@ -65,26 +68,26 @@ traversing it looking for some bit of information in it,
5. and finally, when you're done with the tree, call $tree->delete to erase
the contents of the tree from memory. This kind of thing usually isn't
necessary with most Perl objects, but it's necessary for TreeBuilder
objects. See the HTML::Element manpage for a more verbose explanation of
why this is the case.
objects. See HTML::Element for a more verbose explanation of why this is
the case.
%prep
%setup -q -n %{cpan_name}-%{version}
find . -type f -print0 | xargs -0 chmod 644
%autosetup -n %{cpan_name}-%{cpan_version}
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644
%build
%{__perl} Build.PL installdirs=vendor
./Build build flags=%{?_smp_mflags}
perl Build.PL --installdirs=vendor
./Build build --flags=%{?_smp_mflags}
%check
./Build test
%install
./Build install destdir=%{buildroot} create_packlist=0
./Build install --destdir=%{buildroot} --create_packlist=0
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes README
%changelog