2010-11-15 13:43:38 +00:00
|
|
|
#
|
2015-04-17 18:52:16 +00:00
|
|
|
# spec file for package perl-XML-TreeBuilder
|
2010-11-15 13:43:38 +00:00
|
|
|
#
|
2015-04-17 18:52:16 +00:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2010-11-15 13:43:38 +00:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: perl-XML-TreeBuilder
|
2015-04-17 18:52:16 +00:00
|
|
|
Version: 5.4
|
|
|
|
Release: 0
|
2010-11-15 13:43:38 +00:00
|
|
|
%define cpan_name XML-TreeBuilder
|
|
|
|
Summary: Parser that builds a tree of XML::Element objects
|
2015-04-17 18:52:16 +00:00
|
|
|
License: Artistic-1.0 or GPL-1.0+
|
2010-11-15 13:43:38 +00:00
|
|
|
Group: Development/Libraries/Perl
|
|
|
|
Url: http://search.cpan.org/dist/XML-TreeBuilder/
|
2015-04-17 18:52:16 +00:00
|
|
|
Source0: http://www.cpan.org/authors/id/J/JF/JFEARN/%{cpan_name}-%{version}.tar.gz
|
|
|
|
Source1: cpanspec.yml
|
2010-11-15 13:43:38 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-macros
|
2015-04-17 18:52:16 +00:00
|
|
|
BuildRequires: perl(HTML::Element) >= 4.1
|
2010-11-15 13:43:38 +00:00
|
|
|
BuildRequires: perl(HTML::Tagset) >= 3.02
|
2015-04-17 18:52:16 +00:00
|
|
|
BuildRequires: perl(Module::Build)
|
|
|
|
BuildRequires: perl(XML::Catalog) >= 1.02
|
2010-11-15 13:43:38 +00:00
|
|
|
BuildRequires: perl(XML::Parser)
|
2015-04-17 18:52:16 +00:00
|
|
|
Requires: perl(HTML::Element) >= 4.1
|
2010-11-15 13:43:38 +00:00
|
|
|
Requires: perl(HTML::Tagset) >= 3.02
|
2015-04-17 18:52:16 +00:00
|
|
|
Requires: perl(XML::Catalog) >= 1.02
|
2010-11-15 13:43:38 +00:00
|
|
|
Requires: perl(XML::Parser)
|
2015-04-17 18:52:16 +00:00
|
|
|
%{perl_requires}
|
2010-11-15 13:43:38 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
This module uses XML::Parser to make XML document trees constructed of
|
|
|
|
XML::Element objects (and XML::Element is a subclass of HTML::Element
|
2015-04-17 18:52:16 +00:00
|
|
|
adapted for XML). XML::TreeBuilder is meant particularly for people who are
|
|
|
|
used to the HTML::TreeBuilder / HTML::Element interface to document trees,
|
|
|
|
and who don't want to learn some other document interface like XML::Twig or
|
|
|
|
XML::DOM.
|
|
|
|
|
|
|
|
The way to use this class is to:
|
|
|
|
|
|
|
|
1. start a new (empty) XML::TreeBuilder object.
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
4. do whatever you need to do with the syntax tree, presumably involving
|
|
|
|
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.
|
2010-11-15 13:43:38 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{cpan_name}-%{version}
|
2015-04-17 18:52:16 +00:00
|
|
|
find . -type f -print0 | xargs -0 chmod 644
|
2010-11-15 13:43:38 +00:00
|
|
|
|
|
|
|
%build
|
2015-04-17 18:52:16 +00:00
|
|
|
%{__perl} Build.PL installdirs=vendor
|
|
|
|
./Build build flags=%{?_smp_mflags}
|
2010-11-15 13:43:38 +00:00
|
|
|
|
|
|
|
%check
|
2015-04-17 18:52:16 +00:00
|
|
|
./Build test
|
2010-11-15 13:43:38 +00:00
|
|
|
|
|
|
|
%install
|
2015-04-17 18:52:16 +00:00
|
|
|
./Build install destdir=%{buildroot} create_packlist=0
|
2010-11-15 13:43:38 +00:00
|
|
|
%perl_gen_filelist
|
|
|
|
|
|
|
|
%files -f %{name}.files
|
2015-04-17 18:52:16 +00:00
|
|
|
%defattr(-,root,root,755)
|
2010-11-15 13:43:38 +00:00
|
|
|
%doc Changes README
|
|
|
|
|
|
|
|
%changelog
|