SHA256
1
0
forked from pool/yascreen
yascreen/yascreen.spec
Jan Engelhardt 534a5e591a Accepting request 966300 from home:jonapap
Request to use devel:libraries:c_c++ as the devel project for yascreen. yascreen is a dependency for bpfmon, which I'm submitting soon.

OBS-URL: https://build.opensuse.org/request/show/966300
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/yascreen?expand=0&rev=1
2022-04-02 11:26:54 +00:00

103 lines
3.2 KiB
RPMSpec

#
# spec file for package yascreen
#
# Copyright (c) 2022 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/
#
Name: yascreen
Version: 1.86
Release: 0
Summary: Yet Another Screen Library (lib(n)curses alternative)
License: LGPL-3.0-only
URL: https://github.com/bbonev/yascreen/
Source: %{url}releases/download/v%{version}/yascreen-%{version}.tar.xz
BuildRequires: gcc
BuildRequires: make
BuildRequires: go-md2man
%description
lib(n)curses alternative oriented towards modern terminals.
Suitable for developing terminal applications or daemons with
telnet access and terminal support.
Main features
* small footprint
* does not have external dependencies
* allows both internal and external event loop
* allows stdin/stdout or external input/output (can work over socket)
* supports basic set of telnet sequences, making it suitable for built-in
terminal interfaces for daemons
* supports a limited set of input keystroke sequences
* fully Unicode compatible (parts of this depend on wcwidth in libc)
* supports utf8 verification of input
* relies only on a limited subset of ANSI/xterm ESC sequences, making it
compatible with mostly all modern terminals (inspired by linenoise)
* there is no curses API and ancient terminal compatibility, hence less bloat
* clean API with opaque private data, usable from C/C++
%package -n libyascreen0
Summary: Yet Another Screen Library (lib(n)curses alternative)
Provides: %{name} = %{version}-%{release}
Obsoletes: %{name} < %{version}-%{release}
%description -n libyascreen0
lib(n)curses alternative oriented towards modern terminals.
Suitable for developing terminal applications or daemons with
telnet access and terminal support.
%package devel
Summary: Development files for yascreen
Requires: libyascreen0 = %{version}
%description devel
This package contains the header files and libraries needed to
compile applications or shared objects that use yascreen.
%prep
%setup -q
%build
export CFLAGS="%{optflags}"
%make_build
%install
%make_install PREFIX=%{_prefix} LIBDIR=/%{_lib}/
# allow debug info to be generated
chmod +x %{buildroot}%{_libdir}/libyascreen.so.0.0.0
# remove unpackaged static library
rm -f %{buildroot}%{_libdir}/libyascreen.a
%post -n libyascreen0 -p /sbin/ldconfig
%postun -n libyascreen0 -p /sbin/ldconfig
%files -n libyascreen0
%license LICENSE
%{_libdir}/libyascreen.so.0
%{_libdir}/libyascreen.so.0.0.0
%files devel
%doc README.md
%{_libdir}/libyascreen.so
%{_libdir}/pkgconfig/yascreen.pc
%{_mandir}/man3/yascreen.3*
%{_includedir}/yascreen.h
%changelog