Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37407441
en ru br
ALT Linux repos
S:0.24-alt10

Group :: Terminals
RPM: libstfl0

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%def_without python
%def_without ruby

Name: libstfl0
Version: 0.24
Release: alt10

%define oname stfl

Summary: library which implements a curses-based widget set for text terminals

License: LGPLv3
Group: Terminals
Url: http://www.clifford.at/stfl/

Packager: Vladimir D. Seleznev <vseleznv at altlinux.org>
# repackaged http://www.clifford.at/stfl/stfl-%version.tar.gz
Source: %oname-%version.tar
Source1: %name.watch

Patch1: stfl-0.24-alt-as-needed.patch
Patch3: stfl-0.24-alt-warnings.patch

%{?_with_ruby:BuildRequires(pre): rpm-build-ruby}
BuildRequires: libncursesw-devel perl-Encode swig
%{?_with_ruby:BuildRequires: libruby-devel}
%{?_with_python:BuildRequires: python-devel}

%description
STFL is a library which implements a curses-based widget set for text
terminals. The STFL API can be used from C, SPL, Python, Perl and Ruby.
The public STFL API is only 14 simple function calls big and there are
already generic SWIG bindings. Thus is very easy to port STFL to
additional scripting languages.

%package devel
Summary: Headers for %name
Group: Development/C
Requires: %name = %version-%release

%description devel
Headers for building software that uses %name

%package -n perl-%oname
Group: Terminals
Requires: perl
Requires: %name = %EVR
Summary: Perl binding to stfl

%description -n perl-%oname
Perl binding to stfl

%package -n python-module-%oname
Group: Terminals
Requires: python
Requires: %name = %EVR
Summary: Python binding to stfl
#%%setup_python_module %%oname

%description -n python-module-%oname
Python binding to stfl

%package -n ruby-%oname
Group: Terminals
Requires: swig ruby libstfl0
Summary: Ruby binding to stfl

%description -n ruby-%oname
Ruby binding to stfl

%prep
%setup -n %oname-%version
%autopatch -p2

%build
sed -i 's|$(prefix)/$(libdir)/ruby|%_ruby_lib_path/site_ruby|g' ruby/Makefile.snippet
# SMP-incompatible build
export CFLAGS="%optflags"
make

%install
make DESTDIR=%buildroot prefix=%prefix libdir=%_lib install
rm %buildroot%_libdir/*.a

%files
%doc README
%_libdir/*.so.*

%files devel
%_includedir/*.h
%_libdir/*.so
%_pkgconfigdir/*.pc

%files -n perl-%oname
%_libdir/perl5/*

%if_with python
%files -n python-module-%oname
%python_sitelibdir/lib-dynload/_stfl.so
%python_sitelibdir/stfl.py
%python_sitelibdir/stfl.pyc
%python_sitelibdir/stfl.pyo
%endif #python

%if_with ruby
%files -n ruby-%oname
%ruby_sitearchdir/stfl.so
%endif # ruby

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin