Initial import (rhbz#1538259).

This commit is contained in:
Ben Rosser 2018-02-07 22:46:43 -05:00
parent 86a964b918
commit 10a420917d
3 changed files with 102 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/lambda-term-1.12.0.tar.gz

100
ocaml-lambda-term.spec Normal file
View File

@ -0,0 +1,100 @@
Name: ocaml-lambda-term
Version: 1.12.0
Release: 1%{?dist}
Summary: Terminal manipulation library for OCaml
%global libname %(echo %{name} | sed -e 's/^ocaml-//')
License: BSD
URL: https://github.com/diml/lambda-term/
Source0: https://github.com/diml/lambda-term/archive/%{version}/%{libname}-%{version}.tar.gz
BuildRequires: ocaml
BuildRequires: ocaml-camomile-devel
BuildRequires: ocaml-findlib-devel
BuildRequires: ocaml-lwt-devel
BuildRequires: ocaml-react-devel
BuildRequires: ocaml-zed-devel
BuildRequires: libev-devel
# opam-installer is needed for "jbuilder install" to work.
BuildRequires: jbuilder, opam-installer
%description
Lambda-term is a cross-platform library for manipulating the terminal. It
provides an abstraction for keys, mouse events, colors, as well as a set of
widgets to write curses-like applications.
The main objective of lambda-term is to provide a higher level functional
interface to terminal manipulation than, for example, ncurses, by providing
a native OCaml interface instead of bindings to a C library.
Lambda-term integrates with zed to provide text edition facilities in
console applications.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.
%prep
%autosetup -n %{libname}-%{version}
# For compatibility with older lwt_react
sed 's/lwt_react/lwt.react/g' -i src/jbuild
%build
# It might be nice to have a %jbuilder macro that just does this.
jbuilder build -p %{libname} %{?_smp_mflags}
%install
export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml
mkdir -p $OCAMLFIND_DESTDIR
jbuilder install --prefix %{buildroot}%{_prefix}
# Hmm... the above needs refinement. Remove spurious doc files.
rm -rf %{buildroot}%{_prefix}/doc
# Also put mandir in the right place.
mv %{buildroot}%{_prefix}/man %{buildroot}%{_mandir}
# Also, remove ml files that jbuilder seems to want to install.
rm -rf %{buildroot}%{_libdir}/ocaml/%{libname}/*.ml
%check
make test
%files
%license LICENSE
%doc README.md CHANGES.md
%{_libdir}/ocaml/%{libname}
%{_bindir}/lambda-term-actions
%{_mandir}/man1/lambda-term-actions.1*
%{_mandir}/man5/lambda-term-inputrc.5*
%{_datadir}/lambda-term
%ifarch %{ocaml_native_compiler}
%exclude %{_libdir}/ocaml/*/*.a
%exclude %{_libdir}/ocaml/*/*.cmxa
%exclude %{_libdir}/ocaml/*/*.cmx
%endif
%exclude %{_libdir}/ocaml/*/*.mli
%{_libdir}/ocaml/stublibs/*.so
%files devel
%license LICENSE
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/*/*.a
%{_libdir}/ocaml/*/*.cmxa
%{_libdir}/ocaml/*/*.cmx
%endif
%{_libdir}/ocaml/*/*.mli
%changelog
* Fri Dec 15 2017 Ben Rosser <rosser.bjr@gmail.com> - 1.12.0-1
- Updated to latest upstream release.
* Thu Aug 31 2017 Ben Rosser <rosser.bjr@gmail.com> - 1.11-1
- Initial packaging.

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (lambda-term-1.12.0.tar.gz) = 4245adad1de413da76b2ed460b772c5787e6a351adc0689b46fada7bb5173969d4a759c6cb3f13e693ab40cba4342f38126bd26961d8bdc92df70d51fd0a239c