Files
perl-Test-Version/perl-Test-Version.spec
2025-08-12 18:17:57 +02:00

105 lines
3.0 KiB
RPMSpec

#
# spec file for package perl-Test-Version
#
# 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 Test-Version
Name: perl-Test-Version
Version: 2.90.0
Release: 0
# 2.09 -> normalize -> 2.90.0
%define cpan_version 2.09
License: Artistic-2.0
Summary: Check to see that version's in modules are sane
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(File::Find::Rule::Perl)
BuildRequires: perl(Module::Metadata) >= 1.000020
BuildRequires: perl(Test::Exception)
BuildRequires: perl(Test::More) >= 0.94
BuildRequires: perl(Test::Tester)
BuildRequires: perl(parent)
BuildRequires: perl(version) >= 0.86
Requires: perl(File::Find::Rule::Perl)
Requires: perl(Module::Metadata) >= 1.000020
Requires: perl(Test::More) >= 0.94
Requires: perl(parent)
Requires: perl(version) >= 0.86
Provides: perl(Test::Version) = %{version}
%undefine __perllib_provides
%{perl_requires}
%description
This module's goal is to be a one stop shop for checking to see that your
versions across your dist are sane. Please ensure that you use version
'0.04' or later only, as earlier versions are old code and may not work
correctly. Current feature list:
* module has a version
Tests to insure that all modules checked have a VERSION defined, Can
replace Test::HasVersion
* module has a valid version
Tests to insure that all versions are valid, according to the rules of
version method 'is_lax'. To quote:
_The lax criteria corresponds to what is currently allowed by the version
parser. All of the following formats are acceptable for dotted-decimal
formats strings:_
v1.2
1.2345.6
v1.23_4
1.2345
1.2345_01
_If you want to limit yourself to a much more narrow definition of what a
version string constitutes, is_strict() is limited to version strings like
the following list:_
v1.234.5
2.3456
you can cause your tests to fail if not strict by setting is_strict to '1'
%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 CONTRIBUTING README
%license LICENSE
%changelog