%ifnarch %{ocaml_native_compiler} %global debug_package %{nil} %endif Name: camlmix Version: 1.3.1 Release: %mkrel 14 Summary: A generic preprocessor for text with embedded OCaml License: BSD Group: Development/OCaml URL: https://github.com/mjambon/camlmix Source0: https://github.com/mjambon/camlmix/archive/refs/tags/v%{version}.tar.gz#/camlmix-%{version}.tar.gz Patch0: camlmix-1.3.1-enable-debugging-information.patch # Debian patch to make use of camlp-streams Patch1: 0002-Add-dependency-to-camlp-streams.patch BuildRequires: ocaml-compiler BuildRequires: ocaml-camlp-streams-devel BuildRequires: ocaml-findlib # for architectures without native code compilation we will need # Requires: ocaml-compiler %description Camlmix is a generic preprocessor which converts text with embedded OCaml into an OCaml program with embedded text. It produces text documents from one or several templates. (Camlmix is not a Camlp4 syntax extension.) %prep %setup -q %autopatch -p1 %build %ifarch %{ocaml_native_compiler} make native %else make byte %endif %install mkdir -p %{buildroot}%{_bindir} make install PREFIX=%{buildroot}/usr %files %doc LICENSE README.md %doc examples/ %{_bindir}/camlmix