Normalize CPAN version
See https://github.com/openSUSE/cpanspec/issues/47 for details OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-XML-TreeBuilder?expand=0&rev=6
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package perl-XML-TreeBuilder
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# 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)
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
# published by the Open Source Initiative.
|
# 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
|
%define cpan_name XML-TreeBuilder
|
||||||
Summary: Parser that builds a tree of XML::Element objects
|
Name: perl-XML-TreeBuilder
|
||||||
License: Artistic-1.0 or GPL-1.0+
|
Version: 5.400.0
|
||||||
Group: Development/Libraries/Perl
|
Release: 0
|
||||||
Url: http://search.cpan.org/dist/XML-TreeBuilder/
|
# 5.4 -> normalize -> 5.400.0
|
||||||
Source0: http://www.cpan.org/authors/id/J/JF/JFEARN/%{cpan_name}-%{version}.tar.gz
|
%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
|
Source1: cpanspec.yml
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
BuildRequires: perl
|
BuildRequires: perl
|
||||||
BuildRequires: perl-macros
|
BuildRequires: perl-macros
|
||||||
BuildRequires: perl(HTML::Element) >= 4.1
|
BuildRequires: perl(HTML::Element) >= 4.1
|
||||||
BuildRequires: perl(HTML::Tagset) >= 3.02
|
BuildRequires: perl(HTML::Tagset) >= 3.02
|
||||||
BuildRequires: perl(Module::Build)
|
BuildRequires: perl(Module::Build)
|
||||||
BuildRequires: perl(XML::Catalog) >= 1.02
|
BuildRequires: perl(XML::Catalog) >= 1.20.0
|
||||||
BuildRequires: perl(XML::Parser)
|
BuildRequires: perl(XML::Parser)
|
||||||
Requires: perl(HTML::Element) >= 4.1
|
Requires: perl(HTML::Element) >= 4.1
|
||||||
Requires: perl(HTML::Tagset) >= 3.02
|
Requires: perl(HTML::Tagset) >= 3.02
|
||||||
Requires: perl(XML::Catalog) >= 1.02
|
Requires: perl(XML::Catalog) >= 1.20.0
|
||||||
Requires: perl(XML::Parser)
|
Requires: perl(XML::Parser)
|
||||||
|
Provides: perl(XML::Element) = %{version}
|
||||||
|
Provides: perl(XML::TreeBuilder) = %{version}
|
||||||
|
%undefine __perllib_provides
|
||||||
%{perl_requires}
|
%{perl_requires}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -56,8 +59,8 @@ The way to use this class is to:
|
|||||||
2. set any of the "store" options you want.
|
2. set any of the "store" options you want.
|
||||||
|
|
||||||
3. then parse the document from a source by calling '$x->parsefile(...)' or
|
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
|
'$x->parse(...)' (See XML::Parser docs for the options that these two
|
||||||
these two methods take)
|
methods take)
|
||||||
|
|
||||||
4. do whatever you need to do with the syntax tree, presumably involving
|
4. do whatever you need to do with the syntax tree, presumably involving
|
||||||
traversing it looking for some bit of information in it,
|
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
|
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
|
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
|
necessary with most Perl objects, but it's necessary for TreeBuilder
|
||||||
objects. See the HTML::Element manpage for a more verbose explanation of
|
objects. See HTML::Element for a more verbose explanation of why this is
|
||||||
why this is the case.
|
the case.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{cpan_name}-%{version}
|
%autosetup -n %{cpan_name}-%{cpan_version}
|
||||||
find . -type f -print0 | xargs -0 chmod 644
|
|
||||||
|
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__perl} Build.PL installdirs=vendor
|
perl Build.PL --installdirs=vendor
|
||||||
./Build build flags=%{?_smp_mflags}
|
./Build build --flags=%{?_smp_mflags}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
./Build test
|
./Build test
|
||||||
|
|
||||||
%install
|
%install
|
||||||
./Build install destdir=%{buildroot} create_packlist=0
|
./Build install --destdir=%{buildroot} --create_packlist=0
|
||||||
%perl_gen_filelist
|
%perl_gen_filelist
|
||||||
|
|
||||||
%files -f %{name}.files
|
%files -f %{name}.files
|
||||||
%defattr(-,root,root,755)
|
|
||||||
%doc Changes README
|
%doc Changes README
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user