Files
perl-Term-Clui/perl-Term-Clui.spec
2025-08-12 18:17:33 +02:00

101 lines
3.9 KiB
RPMSpec

#
# spec file for package perl-Term-Clui
#
# 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 Term-Clui
Name: perl-Term-Clui
Version: 1.760.0
Release: 0
# 1.76 -> normalize -> 1.760.0
%define cpan_version 1.76
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Perl module offering a Command-Line User Interface
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(ExtUtils::MakeMaker) >= 6.56
Provides: perl(Term::Clui) = %{version}
Provides: perl(Term::Clui::FileSelect) = %{version}
%undefine __perllib_provides
%{perl_requires}
%description
Term::Clui offers a high-level user interface to give the user of
command-line applications a consistent "look and feel". Its metaphor for
the computer is as a human-like conversation-partner, and as each
question/response is completed it is summarised onto one line, and remains
on screen, so that the history of the session gradually accumulates on the
screen and is available for review, or for cut/paste. This user interface
can therefore be intermixed with standard applications which write to
STDOUT or STDERR, such as _make_, _pgp_, _rcs_ etc.
For the user, _choose()_ uses either (since 1.50) the mouse; or arrow keys
(or hjkl) and Return; also *q* to quit, and SpaceBar or Button3 to
highlight multiple choices. _confirm()_ expects y, Y, n or N. In general,
ctrl-L redraws the (currently active bit of the) screen. _edit()_ and
_view()_ use the default EDITOR and PAGER if possible.
It's fast, simple, and has few external dependencies. It doesn't use
_curses_ (which is a whole-of-screen interface); it uses a small subset of
vt100 sequences (up down left right normal and reverse) which are very
portable, and also (since 1.50) the _SET_ANY_EVENT_MOUSE_ and _kmous_
(terminfo) sequences, which are supported by all _xterm_, _rxvt_,
_konsole_, _screen_, _linux_, _gnome_ and _putty_ terminals.
There is an associated file selector, Term::Clui::FileSelect
Since version 1.60, a speaking interface is provided for the
visually-impaired user; it employs _eflite_ or _espeak_. Speech is turned
on if the _CLUI_SPEAK_ environment variable is set to any non-empty string.
Since version 1.62, if _speakup_ is running, it is silenced while
Term::Clui runs, and then restored. Because Term::Clui's metaphor for the
computer is a human-like conversation-partner, this works very naturally.
The application needs no modification.
There is an equivalent Python3 module, with (as far as possible) the same
calling interface, at
http://cpansearch.perl.org/src/PJB/Term-Clui-1.71/py/TermClui.py
This is Term::Clui.pm version 1.71
%prep
%autosetup -n %{cpan_name}-%{cpan_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 examples README README.md
%license LICENSE
%changelog