From 10a420917d5e3498ee5340aa9720d47ce164da51 Mon Sep 17 00:00:00 2001 From: Ben Rosser Date: Wed, 7 Feb 2018 22:46:43 -0500 Subject: [PATCH] Initial import (rhbz#1538259). --- .gitignore | 1 + ocaml-lambda-term.spec | 100 +++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 102 insertions(+) create mode 100644 .gitignore create mode 100644 ocaml-lambda-term.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4def125 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/lambda-term-1.12.0.tar.gz diff --git a/ocaml-lambda-term.spec b/ocaml-lambda-term.spec new file mode 100644 index 0000000..0288916 --- /dev/null +++ b/ocaml-lambda-term.spec @@ -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 - 1.12.0-1 +- Updated to latest upstream release. + +* Thu Aug 31 2017 Ben Rosser - 1.11-1 +- Initial packaging. diff --git a/sources b/sources new file mode 100644 index 0000000..00b8464 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (lambda-term-1.12.0.tar.gz) = 4245adad1de413da76b2ed460b772c5787e6a351adc0689b46fada7bb5173969d4a759c6cb3f13e693ab40cba4342f38126bd26961d8bdc92df70d51fd0a239c