2011-04-26 18:36:15 +00:00
|
|
|
#
|
2014-03-04 21:27:24 +00:00
|
|
|
# spec file for package perl-Text-Aligner
|
2011-04-26 18:36:15 +00:00
|
|
|
#
|
2020-04-29 11:50:17 +00:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2011-04-26 18:36:15 +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.
|
|
|
|
|
2020-04-29 11:50:17 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-04-26 18:36:15 +00:00
|
|
|
#
|
2010-08-29 06:39:43 +00:00
|
|
|
|
2014-03-04 21:27:24 +00:00
|
|
|
|
|
|
|
Name: perl-Text-Aligner
|
2020-04-30 11:01:35 +00:00
|
|
|
Version: 0.16
|
2014-03-04 21:27:24 +00:00
|
|
|
Release: 0
|
2015-02-10 13:44:40 +00:00
|
|
|
%define cpan_name Text-Aligner
|
2020-04-29 11:50:17 +00:00
|
|
|
Summary: Module to align text
|
|
|
|
License: SUSE-Public-Domain
|
2010-08-29 06:39:43 +00:00
|
|
|
Group: Development/Libraries/Perl
|
2020-04-29 11:50:17 +00:00
|
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
|
|
Source0: https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/%{cpan_name}-%{version}.tar.gz
|
2016-05-20 05:13:29 +00:00
|
|
|
Source1: cpanspec.yml
|
2025-08-12 18:18:00 +02:00
|
|
|
Source100: README.md
|
2015-02-10 13:44:40 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2010-08-29 06:39:43 +00:00
|
|
|
BuildRequires: perl
|
2010-12-03 14:53:28 +00:00
|
|
|
BuildRequires: perl-macros
|
2016-05-20 05:13:29 +00:00
|
|
|
BuildRequires: perl(Module::Build) >= 0.280000
|
2014-03-04 21:27:24 +00:00
|
|
|
BuildRequires: perl(Term::ANSIColor) >= 2.02
|
2020-04-29 11:50:17 +00:00
|
|
|
BuildRequires: perl(Test::More) >= 0.88
|
2014-03-04 21:27:24 +00:00
|
|
|
Requires: perl(Term::ANSIColor) >= 2.02
|
2011-04-26 18:36:15 +00:00
|
|
|
%{perl_requires}
|
2010-08-29 06:39:43 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
Text::Aligner exports a single function, align(), which is used to justify
|
|
|
|
strings to various alignment styles. The alignment specification is the
|
|
|
|
first argument, followed by any number of scalars which are subject to
|
|
|
|
alignment.
|
|
|
|
|
2011-04-26 18:36:15 +00:00
|
|
|
The operation depends on context. In list context, a list of the justified
|
|
|
|
scalars is returned. In scalar context, the justified arguments are joined
|
|
|
|
into a single string with newlines appended. The original arguments remain
|
|
|
|
unchanged. In void context, in-place justification is attempted. In this
|
|
|
|
case, all arguments must be lvalues.
|
|
|
|
|
|
|
|
Align() also does one level of scalar dereferencing. That is, whenever one
|
|
|
|
of the arguments is a scalar reference, the scalar pointed to is aligned
|
|
|
|
instead. Other references are simply stringified. An undefined argument is
|
|
|
|
interpreted as an empty string without complaint.
|
|
|
|
|
2016-05-20 05:13:29 +00:00
|
|
|
Alignment respects colorizing escape sequences a la Term::ANSIColor which
|
|
|
|
means it knows that these sequences don't take up space on the screen.
|
2011-04-26 18:36:15 +00:00
|
|
|
|
2010-08-29 06:39:43 +00:00
|
|
|
%prep
|
2011-04-26 18:36:15 +00:00
|
|
|
%setup -q -n %{cpan_name}-%{version}
|
2010-08-29 06:39:43 +00:00
|
|
|
|
|
|
|
%build
|
2020-04-29 11:50:17 +00:00
|
|
|
perl Build.PL installdirs=vendor
|
2015-02-10 13:44:40 +00:00
|
|
|
./Build build flags=%{?_smp_mflags}
|
2011-04-26 18:36:15 +00:00
|
|
|
|
|
|
|
%check
|
2015-02-10 13:44:40 +00:00
|
|
|
./Build test
|
2010-08-29 06:39:43 +00:00
|
|
|
|
|
|
|
%install
|
2015-02-10 13:44:40 +00:00
|
|
|
./Build install destdir=%{buildroot} create_packlist=0
|
2011-04-26 18:36:15 +00:00
|
|
|
%perl_gen_filelist
|
2010-08-29 06:39:43 +00:00
|
|
|
|
2011-04-26 18:36:15 +00:00
|
|
|
%files -f %{name}.files
|
|
|
|
%defattr(-,root,root,755)
|
2020-04-29 11:50:17 +00:00
|
|
|
%doc Changes README
|
|
|
|
%license LICENSE
|
2010-08-29 06:39:43 +00:00
|
|
|
|
2011-04-26 18:36:15 +00:00
|
|
|
%changelog
|