# # spec file for package perl-Term-TermKey # # 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 Term-TermKey Name: perl-Term-TermKey Version: 0.190.0 Release: 0 # 0.19 -> normalize -> 0.190.0 %define cpan_version 0.19 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Perl wrapper around libtermkey URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/P/PE/PEVANS/%{cpan_name}-%{cpan_version}.tar.gz Source1: cpanspec.yml Source100: README.md BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(ExtUtils::CBuilder) BuildRequires: perl(Module::Build) >= 0.4004 BuildRequires: perl(Module::Build::Using::PkgConfig) BuildRequires: perl(Test2::V0) >= 0.000149 Provides: perl(Term::TermKey) = %{version} %undefine __perllib_provides %{perl_requires} # MANUAL BEGIN BuildRequires: perl(Alien::libtermkey) >= 0.16 # MANUAL END %description *Note* that 'libtermkey' itself is deprecated in favour of its eventual merge into 'libtickit'. As a result, uses of this module should also be considered deprecated. Consider rewriting code to use Tickit instead; either by creating a Tickit::Term to receive key input events, or perform a more wholescale rewrite into using 'Tickit' generally for all screen interaction purposes. This module provides a light perl wrapper around the 'libtermkey' library. This library attempts to provide an abstract way to read keypress events in terminal-based programs by providing structures that describe keys, rather than simply returning raw bytes as read from the TTY device. This version of 'Term::TermKey' requires 'libtermkey' version at least 0.16. %prep %autosetup -n %{cpan_name}-%{cpan_version} -p1 %build perl Build.PL --installdirs=vendor optimize="%{optflags}" ./Build build --flags=%{?_smp_mflags} %check ./Build test %install ./Build install --destdir=%{buildroot} --create_packlist=0 %perl_gen_filelist %files -f %{name}.files %doc Changes examples README %license LICENSE %changelog