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

77 lines
2.7 KiB
RPMSpec

#
# spec file for package perl-Term-Screen
#
# 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-Screen
Name: perl-Term-Screen
Version: 1.60.0
Release: 0
# 1.06 -> normalize -> 1.60.0
%define cpan_version 1.06
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: A Simple all perl Term::Cap based screen positioning module
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/J/JS/JSTOWE/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
Provides: perl(Term::Screen) = %{version}
%undefine __perllib_provides
%{perl_requires}
%description
Term::Screen is a very simple screen positioning module that should work
wherever 'Term::Cap' does. It is set up for Unix using stty's but these
dependences are isolated by evals in the 'new' constructor. Thus you may
create a child module implementing Screen with MS-DOS, ioctl, or other
means to get raw and unblocked input. This is not a replacement for Curses
-- it has no memory. This was written so that it could be easily changed to
fit nasty systems, and to be available first thing.
The input functions getch, key_pressed, echo, and noecho are implemented so
as to work under a fairly standard Unix system. They use 'stty' to set raw
and no echo modes and turn on auto flush. All of these are 'eval'ed so that
this class can be inherited for new definitions easily.
Term::Screen was designed to be "required", then used with object syntax as
shown above. One quirk (which the author was used to so he didn't care) is
that for function key translation, no delay is set. So for many terminals
to get an esc character, you have to hit another char after it, generally
another esc.
%prep
%autosetup -n %{cpan_name}-%{cpan_version}
%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 example README
%changelog