%ifnarch %{ocaml_native_compiler}
%global debug_package %{nil}
%endif
Name: ocaml-result
Version: 1.5
Release: 2%{?dist}
Summary: Compat result type
%global libname %(echo %{name} | sed -e 's/^ocaml-//')
License: BSD
URL: https://github.com/janestreet/result/
Source0: %{URL}/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires: ocaml
BuildRequires: ocaml-dune >= 1.0
%description
Projects that want to use the new result type defined in
OCaml >= 4.03 while staying compatible with older versions
of OCaml should use the Result module defined in this library.
%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
dune build %{?_smp_mflags}
%install
dune install --destdir=%{buildroot}
# We install the documentation with the doc macro
rm -fr %{buildroot}%{_prefix}/doc
%ifarch %{ocaml_native_compiler}
# Add missing executable bits
find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod a+x {} \+
%endif
%check
dune runtest
%files
%doc CHANGES.md README.md
%license LICENSE.md
%dir %{_libdir}/ocaml/%{libname}/
%{_libdir}/ocaml/%{libname}/%{libname}.cma
%{_libdir}/ocaml/%{libname}/%{libname}.cmi
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/%{libname}/%{libname}.cmxs
%endif
%files devel
%license LICENSE.md
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/%{libname}/%{libname}.a
%{_libdir}/ocaml/%{libname}/%{libname}.cmxa
%{_libdir}/ocaml/%{libname}/%{libname}.cmx
%endif
# There's no .mli file, so I believe we should distribute this.
%{_libdir}/ocaml/%{libname}/%{libname}.ml
%{_libdir}/ocaml/%{libname}/%{libname}.cmt
%{_libdir}/ocaml/%{libname}/META
%{_libdir}/ocaml/%{libname}/dune-package
%{_libdir}/ocaml/%{libname}/opam
%changelog
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jun 15 2020 Jerry James <loganjerry@gmail.com> - 1.5-1
- Version 1.5
* Tue May 05 2020 Richard W.M. Jones <rjones@redhat.com> - 1.2-26
- Bump release and rebuild.
* Mon May 04 2020 Richard W.M. Jones <rjones@redhat.com> - 1.2-25
- OCaml 4.11.0+dev2-2020-04-22 rebuild
* Tue Apr 21 2020 Richard W.M. Jones <rjones@redhat.com> - 1.2-24
- OCaml 4.11.0 pre-release attempt 2
* Fri Apr 17 2020 Richard W.M. Jones <rjones@redhat.com> - 1.2-23
- Bump release and rebuild.
* Fri Apr 17 2020 Richard W.M. Jones <rjones@redhat.com> - 1.2-22
- OCaml 4.11.0 pre-release
* Thu Apr 02 2020 Richard W.M. Jones <rjones@redhat.com> - 1.2-21
- Update all OCaml dependencies for RPM 4.16.
* Wed Feb 26 2020 Richard W.M. Jones <rjones@redhat.com> - 1.2-20
- Bump release and rebuild.
* Wed Feb 26 2020 Richard W.M. Jones <rjones@redhat.com> - 1.2-19
- OCaml 4.10.0 final.
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sun Jan 19 2020 Richard W.M. Jones <rjones@redhat.com> - 1.2-17
- Bump release and rebuild.
* Sun Jan 19 2020 Richard W.M. Jones <rjones@redhat.com> - 1.2-16
- OCaml 4.10.0+beta1 rebuild.
* Thu Jan 09 2020 Richard W.M. Jones <rjones@redhat.com> - 1.2-15
- OCaml 4.09.0 for riscv64
* Fri Dec 06 2019 Richard W.M. Jones <rjones@redhat.com> - 1.2-14
- OCaml 4.09.0 (final) rebuild.
* Fri Aug 16 2019 Richard W.M. Jones <rjones@redhat.com> - 1.2-13
- OCaml 4.08.1 (final) rebuild.
* Wed Jul 31 2019 Richard W.M. Jones <rjones@redhat.com> - 1.2-12
- OCaml 4.08.1 (rc2) rebuild.
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Jun 27 2019 Richard W.M. Jones <rjones@redhat.com> - 1.2-10
- OCaml 4.08.0 (final) rebuild.
* Mon Apr 29 2019 Richard W.M. Jones <rjones@redhat.com> - 1.2-9
- OCaml 4.08.0 (beta 3) rebuild.
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Jul 11 2018 Richard W.M. Jones <rjones@redhat.com> - 1.2-6
- OCaml 4.07.0 (final) rebuild.
* Wed Jun 20 2018 Richard W.M. Jones <rjones@redhat.com> - 1.2-5
- OCaml 4.07.0-rc1 rebuild.
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Dec 02 2017 Richard W.M. Jones <rjones@redhat.com> - 1.2-3
- OCaml 4.06.0 rebuild.
* Mon Sep 11 2017 Ben Rosser <rosser.bjr@gmail.com> 1.2-2
- Disable debuginfo generation, as it fails on Rawhide.
- Move .ml file to devel package (as there is no .mli file).
* Sat Sep 02 2017 Ben Rosser <rosser.bjr@gmail.com> 1.2-1
- Initial package.