File perl-XML-Bare.spec of Package perl-XML-Bare

# spec file for package perl-XML-Bare
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 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

Name:           perl-XML-Bare
Version:        0.53
Release:        0
%define cpan_name XML-Bare
Summary:        Minimal XML parser implemented via a C state engine
License:        Artistic-1.0 or GPL-1.0+
Group:          Development/Libraries/Perl
Patch0:         fix-pointers.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(Test::More) >= 0.94

This module is a 'Bare' XML parser. It is implemented in C. The parser
itself is a simple state engine that is less than 500 lines of C. The
parser builds a C struct tree from input text. That C struct tree is
converted to a Perl hash by a Perl function that makes basic calls back to
the C to go through the nodes sequentially.

The parser itself will only cease parsing if it encounters tags that are
not closed properly. All other inputs will parse, even invalid inputs. To
allowing checking for validity, a schema checker is included in the module
as well.

The schema format is custom and is meant to be as simple as possible. It is
based loosely around the way multiplicity is handled in Perl regular

%setup -q -n %{cpan_name}-%{version}
%patch0 -p1
find . -type f -print0 | xargs -0 chmod 644

%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
%{__make} %{?_smp_mflags}

%{__make} test


%files -f %{name}.files
%doc Changes README