%undefine _package_note_flags %ifnarch %{ocaml_native_compiler} %global debug_package %{nil} %endif %global srcname ocamlfuse %global _version 2.7.1_cvs7 Name: ocaml-%{srcname} Version: %(echo %{_version} | tr _ .) Release: 3%{?dist} Summary: OCaml bindings for FUSE License: MIT URL: https://github.com/astrada/ocamlfuse Source: %{url}/archive/refs/tags/v%{_version}.tar.gz BuildRequires: ocaml >= 4.02.3 BuildRequires: ocaml-dune-devel >= 1.6 BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-odoc BuildRequires: ocaml-camlidl-devel BuildRequires: ocaml-result-devel BuildRequires: fuse-devel %description This is a binding to FUSE for the OCaml programming language, enabling you to write multithreaded filesystems in the OCaml language. It has been designed with simplicity as a goal. Efficiency has also been a separate goal. The Bigarray library is used for read and writes, allowing the library to do zero-copy in OCaml land. %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 %{srcname}-%{_version} %build dune build %{?_smp_mflags} --verbose --profile release dune build @doc # Relink the stublibs with $RPM_LD_FLAGS. cd _build/default/lib ocamlmklib -g -ldopt '%{build_ldflags}' -o fuse_stubs \ $(ar t libfuse_stubs.a) cd - %install dune install --destdir=%{buildroot} # We do not want the dune markers find _build/default/_doc/_html -name .dune-keep -delete # We do not want the ml files find %{buildroot}%{_libdir}/ocaml -name \*.ml -delete # We install the documentation with the doc macro rm -fr %{buildroot}%{_prefix}/doc %check dune runtest --profile release %files %doc README.md %license LICENSE %dir %{_libdir}/ocaml/ocamlfuse/ %{_libdir}/ocaml/ocamlfuse/META %{_libdir}/ocaml/ocamlfuse/*.cma %{_libdir}/ocaml/ocamlfuse/*.cmi %ifarch %{ocaml_native_compiler} %{_libdir}/ocaml/ocamlfuse/*.cmxs %endif %{_libdir}/ocaml/stublibs/dllfuse_stubs.so %files devel %doc _build/default/_doc/* %{_libdir}/ocaml/ocamlfuse/dune-package %{_libdir}/ocaml/ocamlfuse/opam %ifarch %{ocaml_native_compiler} %{_libdir}/ocaml/ocamlfuse/*.a %{_libdir}/ocaml/ocamlfuse/*.cmx %{_libdir}/ocaml/ocamlfuse/*.cmxa %endif %{_libdir}/ocaml/ocamlfuse/*.cmt %{_libdir}/ocaml/ocamlfuse/*.cmti %{_libdir}/ocaml/ocamlfuse/*.mli %changelog * Wed Jul 27 2022 Jashank Jeremy - 2.7.1.cvs7-3 - Bump for Fedora 37 mass rebuild. * Fri Jun 24 2022 Jashank Jeremy - 2.7.1.cvs7-2 - Bump to rebuild with OCaml 4.14.0. * Thu May 05 2022 Jashank Jeremy - 2.7.1.cvs7-1 - Initial RPM release.