Files
perl-XML-Compile/perl-XML-Compile.spec
2025-08-12 18:18:33 +02:00

105 lines
3.9 KiB
RPMSpec

#
# spec file for package perl-XML-Compile
#
# Copyright (c) 2024 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%define cpan_name XML-Compile
Name: perl-XML-Compile
Version: 1.640.0
Release: 0
# 1.64 -> normalize -> 1.640.0
%define cpan_version 1.64
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Compilation based XML processing
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/M/MA/MARKOV/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Log::Report) >= 1.200
BuildRequires: perl(MIME::Base64) >= 3.1
BuildRequires: perl(Test::Deep) >= 0.095
BuildRequires: perl(Types::Serialiser)
BuildRequires: perl(XML::Compile::Tester) >= 0.900
BuildRequires: perl(XML::LibXML) >= 2.0107
Requires: perl(Log::Report) >= 1.200
Requires: perl(MIME::Base64) >= 3.1
Requires: perl(Test::Deep) >= 0.095
Requires: perl(Types::Serialiser)
Requires: perl(XML::Compile::Tester) >= 0.900
Requires: perl(XML::LibXML) >= 2.0107
Provides: perl(XML::Compile) = %{version}
Provides: perl(XML::Compile::Iterator) = %{version}
Provides: perl(XML::Compile::Schema) = %{version}
Provides: perl(XML::Compile::Schema::BuiltInFacets) = %{version}
Provides: perl(XML::Compile::Schema::BuiltInTypes) = %{version}
Provides: perl(XML::Compile::Schema::Instance) = %{version}
Provides: perl(XML::Compile::Schema::NameSpaces) = %{version}
Provides: perl(XML::Compile::Schema::Specs) = %{version}
Provides: perl(XML::Compile::Translate) = %{version}
Provides: perl(XML::Compile::Translate::Reader) = %{version}
Provides: perl(XML::Compile::Translate::Template) = %{version}
Provides: perl(XML::Compile::Translate::Writer) = %{version}
Provides: perl(XML::Compile::Util) = %{version}
%undefine __perllib_provides
%{perl_requires}
%description
Many (professional) applications process XML messages based on a formal
specification, expressed in XML Schemas. XML::Compile translates between
XML and Perl with the help of such schemas. Your Perl program only handles
a tree of nested HASHes and ARRAYs, and does not need to understand
namespaces and other general XML and schema nastiness.
Three serious WARNINGS:
* The focus is on *data-centric XML*, which means that mixed elements are not
handler automatically: you need to work with XML::LibXML nodes yourself, on
these spots.
* The *data is not strictly validated*, still a large number of compile-time
errors can be reported. Values are checked quite thoroughly. Structure as
well.
* Imports and includes, as used in the schemas, are NOT performed
automatically. Schema's and such are NOT collected from internet
dynamically; you have to call XML::Compile::Schema::importDefinitions()
explicitly with filenames of locally stored copies. Includes do only work
if they have a targetNamespace defined, which is the same as that of the
schema it is included into.
%prep
%autosetup -n %{cpan_name}-%{cpan_version}
%build
perl Makefile.PL INSTALLDIRS=vendor
%make_build
%check
make test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%doc ChangeLog README README.md README.todo
%changelog