2020-11-03 16:57:53 +00:00
|
|
|
#
|
|
|
|
# spec file for package perl-Locale-Codes
|
|
|
|
#
|
2025-04-14 20:40:16 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2020-11-03 16:57:53 +00:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-03-03 13:01:37 +00:00
|
|
|
%define cpan_name Locale-Codes
|
2020-11-03 16:57:53 +00:00
|
|
|
Name: perl-Locale-Codes
|
2025-06-17 10:45:54 +00:00
|
|
|
Version: 3.840.0
|
2020-11-03 16:57:53 +00:00
|
|
|
Release: 0
|
2025-06-17 10:45:54 +00:00
|
|
|
# 3.84 -> normalize -> 3.840.0
|
|
|
|
%define cpan_version 3.84
|
2020-11-03 16:57:53 +00:00
|
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
2022-03-03 14:09:20 +00:00
|
|
|
Summary: Distribution of modules to handle locale codes
|
2020-11-03 16:57:53 +00:00
|
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
2023-09-12 15:19:30 +00:00
|
|
|
Source0: https://cpan.metacpan.org/authors/id/S/SB/SBECK/%{cpan_name}-%{cpan_version}.tar.gz
|
2020-12-01 09:45:03 +00:00
|
|
|
Source1: cpanspec.yml
|
2025-08-12 18:15:05 +02:00
|
|
|
Source100: README.md
|
2020-11-03 16:57:53 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-macros
|
2025-06-02 15:53:45 +00:00
|
|
|
BuildRequires: perl(Test::Inter) >= 1.90
|
2024-01-04 15:16:58 +00:00
|
|
|
Provides: perl(Locale::Codes) = %{version}
|
|
|
|
Provides: perl(Locale::Codes::Constants) = %{version}
|
|
|
|
Provides: perl(Locale::Codes::Country) = %{version}
|
|
|
|
Provides: perl(Locale::Codes::Country_Codes) = %{version}
|
|
|
|
Provides: perl(Locale::Codes::Country_Retired) = %{version}
|
|
|
|
Provides: perl(Locale::Codes::Currency) = %{version}
|
|
|
|
Provides: perl(Locale::Codes::Currency_Codes) = %{version}
|
|
|
|
Provides: perl(Locale::Codes::Currency_Retired) = %{version}
|
|
|
|
Provides: perl(Locale::Codes::LangExt) = %{version}
|
|
|
|
Provides: perl(Locale::Codes::LangExt_Codes) = %{version}
|
|
|
|
Provides: perl(Locale::Codes::LangExt_Retired) = %{version}
|
|
|
|
Provides: perl(Locale::Codes::LangFam) = %{version}
|
|
|
|
Provides: perl(Locale::Codes::LangFam_Codes) = %{version}
|
|
|
|
Provides: perl(Locale::Codes::LangFam_Retired) = %{version}
|
|
|
|
Provides: perl(Locale::Codes::LangVar) = %{version}
|
|
|
|
Provides: perl(Locale::Codes::LangVar_Codes) = %{version}
|
|
|
|
Provides: perl(Locale::Codes::LangVar_Retired) = %{version}
|
|
|
|
Provides: perl(Locale::Codes::Language) = %{version}
|
|
|
|
Provides: perl(Locale::Codes::Language_Codes) = %{version}
|
|
|
|
Provides: perl(Locale::Codes::Language_Retired) = %{version}
|
|
|
|
Provides: perl(Locale::Codes::Script) = %{version}
|
|
|
|
Provides: perl(Locale::Codes::Script_Codes) = %{version}
|
|
|
|
Provides: perl(Locale::Codes::Script_Retired) = %{version}
|
|
|
|
Provides: perl(Locale::Country) = %{version}
|
|
|
|
Provides: perl(Locale::Currency) = %{version}
|
|
|
|
Provides: perl(Locale::Language) = %{version}
|
|
|
|
Provides: perl(Locale::Script) = %{version}
|
2024-03-08 22:41:14 +00:00
|
|
|
%undefine __perllib_provides
|
2020-11-03 16:57:53 +00:00
|
|
|
%{perl_requires}
|
|
|
|
|
|
|
|
%description
|
|
|
|
*Locale-Codes* is a distribution containing a set of modules designed to
|
|
|
|
work with sets of codes which uniquely identify something. For example,
|
|
|
|
there are codes associated with different countries, different currencies,
|
|
|
|
different languages, etc. These sets of codes are typically maintained in
|
|
|
|
some standard.
|
|
|
|
|
|
|
|
This distribution provides a way to work with these lists of codes. Because
|
|
|
|
the data from the various standards is not available in any sort of
|
|
|
|
consistent API, access to the lists is not available in any direct fashion.
|
|
|
|
To compensate for this, the list of codes is stored internally within this
|
|
|
|
distribution, and the distribution is updated on a regular basis to include
|
|
|
|
all known codes at that point in time. This does mean that it is necessary
|
|
|
|
to keep this distribution up-to-date to keep up with the various changes
|
|
|
|
that are made in the various standards.
|
|
|
|
|
|
|
|
Traditionally, a module has been created to work with each type of code
|
|
|
|
sets. So, there is a module for working with country lists, one for
|
|
|
|
currency lists, etc. Since version 3.00, all of these individual modules
|
|
|
|
were written as wrappers around a central module (which was not intended to
|
|
|
|
be used directly) which did all of the real work.
|
|
|
|
|
|
|
|
Starting with version 3.50, the central module was reworked slightly to
|
|
|
|
provide an object-oriented interface. All of the modules for working with
|
|
|
|
individual types of code sets were reworked to use the improved OO module,
|
|
|
|
so the traditional interfaces still work as they always have. As a result,
|
|
|
|
you are free to use the traditional functional (non-OO) interfaces, or to
|
|
|
|
use the OO interface and bypass the wrapper modules entirely.
|
|
|
|
|
|
|
|
Both methods will be supported in the future, so use the one that is best
|
|
|
|
suited to your needs.
|
|
|
|
|
|
|
|
Within each type, any number of code sets are allowed. For example, sets of
|
|
|
|
country codes are maintained in several different locations including the
|
|
|
|
ISO-3166 standard, the IANA, and by the United Nations. The lists of
|
|
|
|
countries are similar, but not identical. Multiple code sets are supported,
|
|
|
|
though trying to convert from one code set to another will not always work
|
|
|
|
since the list of countries is not one-to-one.
|
|
|
|
|
|
|
|
All data in all of these modules comes directly from the original standards
|
|
|
|
(or as close to direct as possible), so it should be up-to-date at the time
|
|
|
|
of release.
|
|
|
|
|
|
|
|
I plan on releasing a new version several times a year to incorporate any
|
|
|
|
changes made in the standards. However, I don't always know about changes
|
|
|
|
that occur, so if any of the standards change, and you want a new release
|
|
|
|
sooner, just email me and I'll get one out.
|
|
|
|
|
|
|
|
%prep
|
2025-06-02 15:53:45 +00:00
|
|
|
%autosetup -n %{cpan_name}-%{cpan_version} -p1
|
2023-03-10 10:44:15 +00:00
|
|
|
|
2023-06-13 07:33:54 +00:00
|
|
|
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644
|
2020-11-03 16:57:53 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
2021-03-03 13:01:37 +00:00
|
|
|
%make_build
|
2020-11-03 16:57:53 +00:00
|
|
|
|
|
|
|
%check
|
|
|
|
make test
|
|
|
|
|
|
|
|
%install
|
|
|
|
%perl_make_install
|
|
|
|
%perl_process_packlist
|
|
|
|
%perl_gen_filelist
|
|
|
|
|
|
|
|
%files -f %{name}.files
|
|
|
|
%doc Changes examples README README.first
|
|
|
|
%license LICENSE
|
|
|
|
|
|
|
|
%changelog
|