File perl-XML-Structured.spec of Package perl-XML-Structured
72
1
#
2
# spec file for package perl-XML-Structured
3
#
4
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via http://bugs.opensuse.org/
16
#
17
18
19
# define the name from CPAN
20
%define cpan_name XML-Structured
21
Name: perl-XML-Structured
22
Version: 1.2
23
Release: 0
24
Summary: Simple conversion API from XML to perl structures and back
25
License: Artistic-1.0
26
Group: Development/Libraries/Perl
27
Url: http://search.cpan.org/~mls/
28
Source: %{cpan_name}-%{version}.tar.bz2
29
# perl(XML::Parser) has choice: brp-check-suse perl-XML-Parser
30
BuildRequires: perl-XML-Parser
31
BuildRoot: %{_tmppath}/%{name}-%{version}-build
32
%if 0%{?suse_version} < 1120
33
BuildRequires: perl-macros
34
%endif
35
%if 0%{?suse_version} < 1140
36
Requires: perl = %{perl_version}
37
%else
38
%{perl_requires}
39
%endif
40
%if 0%{?suse_version} > 1120
41
BuildRequires: perl(Test::Pod)
42
BuildRequires: perl(Test::Pod::Coverage)
43
%endif
44
45
%description
46
Provides a way to convert XML data into a predefined perl data structure and
47
back to XML. Unlike with modules like XML::Simple, it is an error if the XML
48
data does not match the provided skeleton (the "DTD").
49
Another advantage is that the order of the attributes and elements is taken
50
from the DTD when converting back to xml.
51
52
%prep
53
%setup -q -n %{cpan_name}-%{version}
54
55
%build
56
perl Makefile.PL OPTIMIZE="%{optflags} -Wall"
57
make %{?_smp_mflags}
58
59
%check
60
make %{?_smp_mflags} test
61
62
%install
63
%perl_make_install
64
%perl_process_packlist
65
%perl_gen_filelist
66
67
%files -f %{name}.files
68
%defattr(-,root,root)
69
%doc MANIFEST README speed test
70
71
%changelog
72