2010-11-29 15:28:44 +00:00
|
|
|
#
|
|
|
|
# spec file for package perl-XML-Structured (Version 1.1)
|
|
|
|
#
|
|
|
|
# Copyright 2010 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.
|
|
|
|
|
|
|
|
Name: perl-XML-Structured
|
|
|
|
Version: 1.1
|
|
|
|
Release: 0
|
|
|
|
# define the name from CPAN
|
|
|
|
%define cpan_name %( echo %{name} | %{__sed} -e 's,perl-,,' )
|
2010-12-01 13:58:23 +00:00
|
|
|
%{perl_requires}
|
2010-11-29 15:28:44 +00:00
|
|
|
%if 0%{?suse_version} < 1120
|
|
|
|
BuildRequires: perl-macros
|
|
|
|
%endif
|
|
|
|
Group: Development/Libraries/Perl
|
|
|
|
License: Artistic License, Other License(s), see package
|
|
|
|
URL: http://search.cpan.org/~mls/
|
|
|
|
Summary: Simple conversion API from XML to perl structures and back
|
|
|
|
Source: %cpan_name-%{version}.tar.bz2
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
# perl(XML::Parser) has choice: brp-check-suse perl-XML-Parser
|
|
|
|
BuildRequires: perl-XML-Parser
|
|
|
|
%if 0%{?suse_version} > 1120
|
|
|
|
BuildRequires: perl(Test::Pod) perl(Test::Pod::Coverage)
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
|
|
|
Provides a way to convert XML data into a predefined perl data structure and
|
|
|
|
back to XML. Unlike with modules like XML::Simple, it is an error if the XML
|
|
|
|
data does not match the provided skeleton (the "DTD").
|
|
|
|
Another advantage is that the order of the attributes and elements is taken
|
|
|
|
from the DTD when converting back to xml.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{cpan_name}-%{version}
|
|
|
|
|
|
|
|
%build
|
|
|
|
perl Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS -Wall"
|
|
|
|
make %{?jobs:-j%jobs}
|
|
|
|
|
|
|
|
%check
|
|
|
|
make test
|
|
|
|
|
|
|
|
%install
|
|
|
|
%perl_make_install
|
|
|
|
%perl_process_packlist
|
|
|
|
%perl_gen_filelist
|
|
|
|
|
|
|
|
%clean
|
|
|
|
# clean up the hard disc after build
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files -f %{name}.files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc MANIFEST README
|
|
|
|
|
|
|
|
%changelog
|