diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d97ebe5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/zed-1.5.tar.gz diff --git a/ocaml-zed.spec b/ocaml-zed.spec new file mode 100644 index 0000000..5062319 --- /dev/null +++ b/ocaml-zed.spec @@ -0,0 +1,75 @@ +Name: ocaml-zed +Version: 1.5 +Release: 2%{?dist} +Summary: Abstract engine for text edition in OCaml + +%global libname %(echo %{name} | sed -e 's/^ocaml-//') + +License: BSD +URL: https://github.com/diml/zed +Source0: https://github.com/diml/zed/archive/%{version}/%{libname}-%{version}.tar.gz + +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: ocaml-camomile-devel +BuildRequires: ocaml-react-devel + +BuildRequires: jbuilder + +%description +Zed is an abstract engine for text edition. It can be used to +write text editors, edition widgets, readlines, ... You just +have to connect an engine to your inputs and rendering functions +to get an editor. + +Zed provides: edition state management, multiple cursor support, +key-binding helpers, and general purpose unicode rope +manipulation functions. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%autosetup -n %{libname}-%{version} + +%build +# It might be nice to have a %jbuilder macro that just does this. +jbuilder build -p %{libname} %{?_smp_mflags} + +%install +mkdir -p %{buildroot}%{_libdir}/ocaml/zed/ +cp -aLr _build/install/default/lib/zed/* %{buildroot}%{_libdir}/ocaml/zed/ + +%files +%license LICENSE +%doc README.md CHANGES.md +%{_libdir}/ocaml/%{libname} +%ifarch %{ocaml_native_compiler} +%exclude %{_libdir}/ocaml/*/*.a +%exclude %{_libdir}/ocaml/*/*.cmxa +%exclude %{_libdir}/ocaml/*/*.cmx +%endif +%exclude %{_libdir}/ocaml/*/*.mli + + +%files devel +%license LICENSE +%ifarch %{ocaml_native_compiler} +%{_libdir}/ocaml/*/*.a +%{_libdir}/ocaml/*/*.cmxa +%{_libdir}/ocaml/*/*.cmx +%endif +%{_libdir}/ocaml/*/*.mli + + +%changelog +* Tue Aug 15 2017 Ben Rosser 1.5-2 +- Modernize OCaml packaging. + +* Fri Aug 11 2017 Ben Rosser 1.5-1 +- Initial packaging. diff --git a/sources b/sources new file mode 100644 index 0000000..cefd23d --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (zed-1.5.tar.gz) = ab097f3ad31ddc7b93661203fd23841d9520b2e164d55c4c868105ab918743d2c3e7c9c8e066bbd7f0ecabac8f9c0cfb656bc1b25eabc119ae5d1a041b5c770c