Files
perl-Time-Progress/perl-Time-Progress.spec
2025-08-12 18:18:14 +02:00

89 lines
2.7 KiB
RPMSpec

#
# spec file for package perl-Time-Progress
#
# 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 Time-Progress
Name: perl-Time-Progress
Version: 2.150.0
Release: 0
# 2.15 -> normalize -> 2.150.0
%define cpan_version 2.15
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Elapsed and estimated finish time reporting
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/C/CA/CADE/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Test::More) >= 0.88
Provides: perl(Time::Progress) = %{version}
%undefine __perllib_provides
%{perl_requires}
%description
This module displays progress information for long-running processes. This
can be percentage complete, time elapsed, estimated time remaining, an
ASCII progress bar, or any combination of those.
It is useful for code where you perform a number of steps, or iterations of
a loop, where the number of iterations is known before you start the loop.
The typical usage of this module is:
* *
Create an instance of 'Time::Progress', specifying min and max count
values.
* *
At the head of the loop, you call the 'report()' method with
a format specifier and the iteration count,
and get back a string that should be displayed.
If you include a carriage return character (\r) in the format string, then
the message will be over-written at each step. Putting \r at the start of
the format string, as in the SYNOPSIS, results in the cursor sitting at the
end of the message.
If you display to STDOUT, then remember to enable auto-flushing:
use IO::Handle;
STDOUT->autoflush(1);
The shortest time interval that can be measured is 1 second.
%prep
%autosetup -n %{cpan_name}-%{cpan_version} -p1
%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