102 lines
3.6 KiB
RPMSpec
102 lines
3.6 KiB
RPMSpec
#
|
|
# spec file for package perl-Hash-AutoHash
|
|
#
|
|
# 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 Hash-AutoHash
|
|
Name: perl-Hash-AutoHash
|
|
Version: 1.170.0
|
|
Release: 0
|
|
# 1.17 -> normalize -> 1.170.0
|
|
%define cpan_version 1.17
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
Summary: Object-oriented access to real and tied hashes
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/N/NA/NATG/%{cpan_name}-%{cpan_version}.tar.gz
|
|
Source1: cpanspec.yml
|
|
Source100: README.md
|
|
BuildArch: noarch
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
BuildRequires: perl(Carp) >= 1.2
|
|
BuildRequires: perl(Cwd) >= 3.4
|
|
BuildRequires: perl(Exporter) >= 5.68
|
|
BuildRequires: perl(File::Spec) >= 3.4
|
|
BuildRequires: perl(List::MoreUtils) >= 0.33
|
|
BuildRequires: perl(List::Util) >= 1.32
|
|
BuildRequires: perl(Module::Build) >= 0.4007
|
|
BuildRequires: perl(Scalar::Util) >= 1.23
|
|
BuildRequires: perl(Storable) >= 2.3
|
|
BuildRequires: perl(Test::Deep) >= 0.11
|
|
BuildRequires: perl(Test::More) >= 0.98
|
|
BuildRequires: perl(Test::Pod) >= 1.48
|
|
BuildRequires: perl(Test::Pod::Content) >= 0.0.6
|
|
BuildRequires: perl(Tie::Hash) >= 1.04
|
|
BuildRequires: perl(Tie::Hash::MultiValue) >= 1.20.0
|
|
BuildRequires: perl(Tie::ToObject) >= 0.03
|
|
BuildRequires: perl(XSLoader) >= 0.15
|
|
Requires: perl(Carp) >= 1.2
|
|
Requires: perl(Cwd) >= 3.4
|
|
Requires: perl(Exporter) >= 5.68
|
|
Requires: perl(List::MoreUtils) >= 0.33
|
|
Requires: perl(List::Util) >= 1.32
|
|
Requires: perl(Tie::Hash) >= 1.04
|
|
Requires: perl(Tie::ToObject) >= 0.03
|
|
Requires: perl(XSLoader) >= 0.15
|
|
Provides: perl(Hash::AutoHash) = %{version}
|
|
Provides: perl(Hash::AutoHash::alias)
|
|
Provides: perl(Hash::AutoHash::helper)
|
|
%undefine __perllib_provides
|
|
%{perl_requires}
|
|
|
|
%description
|
|
This is yet another module that lets you access or change the elements of a
|
|
hash using methods with the same name as the element's key. It follows in
|
|
the footsteps of Hash::AsObject, Hash::Inflator, Data::OpenStruct::Deep,
|
|
Object::AutoAccessor, and probably others. The main difference between this
|
|
module and its forebears is that it supports tied hashes, in addition to
|
|
regular hashes. This allows a modular division of labor: this class is
|
|
generic and treats all hashes the same; any special semantics come from the
|
|
tied hash.
|
|
|
|
The class has a 'new' method but also supplies several functions for
|
|
constructing new Hash::AutoHash objects.
|
|
|
|
The constructor functions shown in the SYNOPSIS are all you need for
|
|
typical uses. autohash_hash creates a new 'real' (ie, not tied)
|
|
Hash::AutoHash object; autohash_tie creates a new tied Hash::AutoHash
|
|
object. Once the objects are constructed, the class treats them the same
|
|
way.
|
|
|
|
%prep
|
|
%autosetup -n %{cpan_name}-%{cpan_version}
|
|
|
|
%build
|
|
perl Build.PL --installdirs=vendor
|
|
./Build build --flags=%{?_smp_mflags}
|
|
|
|
%check
|
|
./Build test
|
|
|
|
%install
|
|
./Build install --destdir=%{buildroot} --create_packlist=0
|
|
%perl_gen_filelist
|
|
|
|
%files -f %{name}.files
|
|
%doc Changes README
|
|
|
|
%changelog
|