Blob Blame History Raw
Name:           ocaml-zed
Version:        1.6
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
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Sat Dec 02 2017 Richard W.M. Jones <rjones@redhat.com> - 1.6-1
- New upstream version 1.6 (includes safe-string fixes).
- OCaml 4.06.0 rebuild.

* Tue Aug 15 2017 Ben Rosser <rosser.bjr@gmail.com> 1.5-2
- Modernize OCaml packaging.

* Fri Aug 11 2017 Ben Rosser <rosser.bjr@gmail.com> 1.5-1
- Initial packaging.