96 lines
3.0 KiB
RPMSpec
96 lines
3.0 KiB
RPMSpec
#
|
|
# spec file for package perl-XML-Hash-LX
|
|
#
|
|
# 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-Hash-LX
|
|
Name: perl-XML-Hash-LX
|
|
Version: 0.70.0
|
|
Release: 0
|
|
# 0.07 -> normalize -> 0.70.0
|
|
%define cpan_version 0.07
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
Summary: Convert hash to xml and xml to hash using LibXML
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/M/MO/MONS/%{cpan_name}-%{cpan_version}.tar.gz
|
|
Source1: cpanspec.yml
|
|
Source100: README.md
|
|
Patch0: XML-Hash-LX-0.0603-Fix-unpredictable-order-at-empty-attr-test.patch
|
|
BuildArch: noarch
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.59
|
|
BuildRequires: perl(XML::LibXML)
|
|
BuildRequires: perl(lib::abs) >= 0.900
|
|
Requires: perl(XML::LibXML)
|
|
Provides: perl(XML::Hash::LX) = %{version}
|
|
%undefine __perllib_provides
|
|
%{perl_requires}
|
|
# MANUAL BEGIN
|
|
BuildRequires: perl(Test::Pod::Coverage)
|
|
BuildRequires: perl(Types::Serialiser)
|
|
Requires: perl(Types::Serialiser)
|
|
# MANUAL END
|
|
|
|
%description
|
|
This module is a companion for 'XML::LibXML'. It operates with LibXML
|
|
objects, could return or accept LibXML objects, and may be used for easy
|
|
data transformations
|
|
|
|
It is faster in parsing then XML::Simple, XML::Hash, XML::Twig and of
|
|
course much slower than XML::Bare ;)
|
|
|
|
It is faster in composing than XML::Hash, but slower than XML::Simple
|
|
|
|
Parse benchmark:
|
|
|
|
Rate Simple Hash Twig Hash::LX Bare
|
|
Simple 11.3/s -- -2% -16% -44% -97%
|
|
Hash 11.6/s 2% -- -14% -43% -97%
|
|
Twig 13.5/s 19% 16% -- -34% -96%
|
|
Hash::LX 20.3/s 79% 75% 51% -- -95%
|
|
Bare 370/s 3162% 3088% 2650% 1721% --
|
|
|
|
Compose benchmark:
|
|
|
|
Rate Hash Hash::LX Simple
|
|
Hash 49.2/s -- -18% -40%
|
|
Hash::LX 60.1/s 22% -- -26%
|
|
Simple 81.5/s 66% 36% --
|
|
|
|
Benchmark was done on http://search.cpan.org/uploads.rdf
|
|
|
|
%prep
|
|
%autosetup -n %{cpan_name}-%{cpan_version} -p1
|
|
|
|
%build
|
|
PERL_USE_UNSAFE_INC=1 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 Changes README
|
|
%license LICENSE
|
|
|
|
%changelog
|