77 lines
2.6 KiB
RPMSpec
77 lines
2.6 KiB
RPMSpec
#
|
|
# spec file for package perl-Tree-Nary
|
|
#
|
|
# 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 Tree-Nary
|
|
Name: perl-Tree-Nary
|
|
Version: 1.300.0
|
|
Release: 0
|
|
# 1.3 -> normalize -> 1.300.0
|
|
%define cpan_version 1.3
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
Summary: Perl implementation of N-ary search trees
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/F/FS/FSORIANO/%{cpan_name}-%{cpan_version}.tar.gz
|
|
Source100: README.md
|
|
BuildArch: noarch
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
Provides: perl(Tree::Nary) = %{version}
|
|
%undefine __perllib_provides
|
|
%{perl_requires}
|
|
|
|
%description
|
|
The *Tree::Nary* class implements N-ary trees (trees of data with any
|
|
number of branches), providing the organizational structure for a tree
|
|
(collection) of any number of nodes, but knowing nothing about the specific
|
|
type of node used. It can be used to display hierarchical database entries
|
|
in an internal application (the NIS netgroup file is an example of such a
|
|
database). It offers the capability to select nodes on the tree, and
|
|
attachment points for nodes on the tree. Each attachment point can support
|
|
multiple child nodes.
|
|
|
|
The data field contains the actual data of the node. The next and previous
|
|
fields point to the node's siblings (a sibling is another node with the
|
|
same parent). The parent field points to the parent of the node, or is
|
|
_undef_ if the node is the root of the tree. The children field points to
|
|
the first child of the node. The other children are accessed by using the
|
|
next pointer of each child.
|
|
|
|
This module is a translation (albeit not a direct one) from the C
|
|
implementation of N-ary trees, available in the *GLIB distribution* (see
|
|
SEE ALSO).
|
|
|
|
%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 CHANGES README
|
|
|
|
%changelog
|