File perl-Convert-Number-Roman.spec of Package perl-Convert-Number-Roman

#
# spec file for package perl-Convert-Number-Roman
#
# Copyright (c) 2025 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 Convert-Number-Roman
Name:           perl-Convert-Number-Roman
Version:        0.04
Release:        0
License:        Artistic-1.0 OR GPL-1.0-or-later
Summary:        Conversion For Roman Numerals in Perl
URL:            https://metacpan.org/release/%{cpan_name}
Source0:        https://cpan.metacpan.org/authors/id/D/DY/DYACOB/%{cpan_name}-%{version}.tar.gz
BuildArch:      noarch
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(Module::Build) >= 0.420000
%{perl_requires}

%description
Implementation of the Roman numeral conversion algorithm proposed for the
CSS3-List module specification. Use to convert between Western and Roman
numeral systems under Unicode.

* See: http://www.w3.org/TR/css3-lists/

Roman numerals have both uppercase and lowercase styles. The default style
used is the uppercase. The default style can be set at instantiation time
as per:

 my $n = new Convert::Number::Roman( "lower" );

or

 my $n = new Convert::Number::Roman( 4294967296, "lower" );

The default style may also be set during conversion as per:

 $n->convert( "lower" );

or

 $n->convert( 4294967296, "lower" );

The 'style' method is also available to set or query the default style:

 my $style = $n->style;  # query style

 $n->style( "upper" );   # reset style

%prep
%autosetup  -n %{cpan_name}-%{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 Changes.md CONTRIBUTING.md examples README.md SECURITY.md
%license LICENSE

%changelog
openSUSE Build Service is sponsored by