Files
perl-Tickit/perl-Tickit.spec
2025-08-12 18:18:11 +02:00

120 lines
4.6 KiB
RPMSpec

#
# spec file for package perl-Tickit
#
# 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 Tickit
Name: perl-Tickit
Version: 0.510.0
Release: 0
# 0.51 -> normalize -> 0.510.0
%define cpan_version 0.51
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Terminal Interface Construction KIT
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(Alien::libtermkey) >= 0.160
#BuildRequires: perl(Alien::unibilium) >= 0.110
BuildRequires: perl(ExtUtils::CBuilder)
BuildRequires: perl(ExtUtils::PkgConfig)
BuildRequires: perl(List::MoreUtils)
BuildRequires: perl(Module::Build)
BuildRequires: perl(Parser::MGC)
BuildRequires: perl(Struct::Dumb)
BuildRequires: perl(Test::Fatal)
BuildRequires: perl(Test::HexString)
BuildRequires: perl(Test::Identity)
BuildRequires: perl(Test::More) >= 0.88
BuildRequires: perl(Test::Refcount)
Requires: perl(List::MoreUtils)
Requires: perl(Parser::MGC)
Requires: perl(Struct::Dumb)
Provides: perl(Tickit) = %{version}
Provides: perl(Tickit::ContainerWidget) = %{version}
Provides: perl(Tickit::Debug)
Provides: perl(Tickit::OneLineWidget) = %{version}
Provides: perl(Tickit::Pen) = %{version}
Provides: perl(Tickit::Pen::Immutable) = %{version}
Provides: perl(Tickit::Pen::Mutable) = %{version}
Provides: perl(Tickit::Rect) = %{version}
Provides: perl(Tickit::RectSet) = %{version}
Provides: perl(Tickit::RenderBuffer) = %{version}
Provides: perl(Tickit::SingleChildWidget) = %{version}
Provides: perl(Tickit::StringPos) = %{version}
Provides: perl(Tickit::Style) = %{version}
Provides: perl(Tickit::Style::Parser) = %{version}
Provides: perl(Tickit::Term) = %{version}
Provides: perl(Tickit::Test) = %{version}
Provides: perl(Tickit::Test::MockTerm) = %{version}
Provides: perl(Tickit::Utils) = %{version}
Provides: perl(Tickit::Widget) = %{version}
Provides: perl(Tickit::Widget::Box) = %{version}
Provides: perl(Tickit::Widget::Static) = %{version}
Provides: perl(Tickit::WidgetRole) = %{version}
Provides: perl(Tickit::WidgetRole::Alignable) = %{version}
Provides: perl(Tickit::Window) = %{version}
%undefine __perllib_provides
%{perl_requires}
# MANUAL BEGIN
BuildRequires: libtermkey-devel
BuildRequires: pkgconfig
# MANUAL END
%description
'Tickit' is a high-level toolkit for creating full-screen terminal-based
interactive programs. It allows programs to be written in an abstracted
way, working with a tree of widget objects, to represent the layout of the
interface and implement its behaviours.
Its supported terminal features includes a rich set of rendering attributes
(bold, underline, italic, 256-colours, etc), support for mouse including
wheel and position events above the 224th column and arbitrary modified key
input via _libtermkey_ (all of these will require a supporting terminal as
well). It also supports having multiple instances and non-blocking or
asynchronous control.
At the current version, this is a Perl distribution which contains and XS
and C implementation of the lower levels (Tickit::Term and Tickit::Pen),
and implements the higher levels (Tickit::Window and Tickit::Widget) in
pure perl. The XS parts are supported by _libtickit_, either from the
installed library, or using a bundled copy compiled at build time. It is
intended that eventually the Window layer will be rewritten in XS and C
instead.
%prep
%autosetup -n %{cpan_name}-%{cpan_version}
%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