File perl-Locale-Maketext-Simple.spec of Package perl-Locale-Maketext-Simple
#
# spec file for package perl-Locale-Maketext-Simple
#
# 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 Locale-Maketext-Simple
Name: perl-Locale-Maketext-Simple
Version: 0.21
Release: 0
#Upstream: Artistic-1.0 or GPL-1.0-or-later
License: MIT
Summary: Simple interface to Locale::Maketext::Lexicon
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/J/JE/JESSE/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
%{perl_requires}
# MANUAL BEGIN
Requires: perl(File::Spec)
Requires: perl(Locale::Maketext::Lexicon)
# MANUAL END
%description
This module is a simple wrapper around *Locale::Maketext::Lexicon*,
designed to alleviate the need of creating _Language Classes_ for module
authors.
The language used is chosen from the loc_lang call. If a lookup is not
possible, the i-default language will be used. If the lookup is not in the
i-default language, then the key will be returned.
If *Locale::Maketext::Lexicon* is not present, it implements a minimal
localization function by simply interpolating '[_1]' with the first
argument, '[_2]' with the second, etc. Interpolated function like
'[quant,_1]' are treated as '[_1]', with the sole exception of
'[tense,_1,X]', which will append 'ing' to '_1' when X is 'present', or
appending 'ed' to <_1> otherwise.
%prep
%autosetup -n %{cpan_name}-%{version}
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644
%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