Use new OCaml macros.

This commit is contained in:
Jerry James 2022-07-20 15:22:05 -06:00
parent 7cb613890f
commit df22af03ed

View File

@ -1,4 +1,5 @@
%undefine _package_note_flags %undefine _package_note_flags
%ifarch %{ocaml_native_compiler} %ifarch %{ocaml_native_compiler}
# The only source file for this package consists of a single "include" line. # The only source file for this package consists of a single "include" line.
# It exports some private functions from the library in ocaml-base. Although # It exports some private functions from the library in ocaml-base. Although
@ -28,7 +29,6 @@ Source0: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz
BuildRequires: ocaml >= 4.08.0 BuildRequires: ocaml >= 4.08.0
BuildRequires: ocaml-base-devel >= 0.15 BuildRequires: ocaml-base-devel >= 0.15
BuildRequires: ocaml-dune >= 2.0.0 BuildRequires: ocaml-dune >= 2.0.0
BuildRequires: ocaml-odoc
%description %description
This package contains an OCaml syntax extension to define first class This package contains an OCaml syntax extension to define first class
@ -48,46 +48,24 @@ developing applications that use %{name}.
%autosetup -n %{srcname}-%{version} %autosetup -n %{srcname}-%{version}
%build %build
dune build %{?_smp_mflags} --verbose --release %dune_build
dune build %{?_smp_mflags} @doc
%install %install
dune install --destdir=%{buildroot} %dune_install
%if %{with doc} %check
# We do not want the dune markers %dune_check
find _build/default/_doc/_html -name .dune-keep -delete
%endif
# We do not want the ml files %files -f .ofiles
find %{buildroot}%{_libdir}/ocaml -name \*.ml -delete
# We install the documentation with the doc macro
rm -fr %{buildroot}%{_prefix}/doc
%files
%doc CHANGES.md %doc CHANGES.md
%license LICENSE.md %license LICENSE.md
%dir %{_libdir}/ocaml/%{srcname}/
%{_libdir}/ocaml/%{srcname}/META
%{_libdir}/ocaml/%{srcname}/*.cma
%{_libdir}/ocaml/%{srcname}/*.cmi
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/%{srcname}/*.cmxs
%endif
%files devel %files devel -f .ofiles-devel
%doc _build/default/_doc/_html/*
%{_libdir}/ocaml/%{srcname}/dune-package
%{_libdir}/ocaml/%{srcname}/opam
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/%{srcname}/*.a
%{_libdir}/ocaml/%{srcname}/*.cmx
%{_libdir}/ocaml/%{srcname}/*.cmxa
%endif
%{_libdir}/ocaml/%{srcname}/*.cmt
%changelog %changelog
* Wed Jul 20 2022 Jerry James <loganjerry@gmail.com> - 0.15.0-5
- Use new OCaml macros
* Sun Jun 19 2022 Richard W.M. Jones <rjones@redhat.com> - 0.15.0-5 * Sun Jun 19 2022 Richard W.M. Jones <rjones@redhat.com> - 0.15.0-5
- OCaml 4.14.0 rebuild - OCaml 4.14.0 rebuild