Name: ocaml-yaml Version: 3.1.0 Release: %autorelease Summary: Parse and generate YAML 1.1/1.2 files License: ISC URL: https://avsm.github.io/ocaml-yaml/ Source0: https://github.com/avsm/ocaml-yaml/releases/download/v%{version}/yaml-%{version}.tbz # These are used to unbundle libyaml. Patch1: fix-yaml.h.patch Source1: unbundled-dune BuildRequires: ocaml >= 4.13.0 BuildRequires: ocaml-bos-devel BuildRequires: ocaml-ctypes-devel >= 0.14.0 BuildRequires: ocaml-dune >= 2.0 BuildRequires: ocaml-dune-configurator-devel BuildRequires: ocaml-ppx-sexp-conv-devel >= 0.9.0 BuildRequires: ocaml-sexplib-devel BuildRequires: libyaml-devel # Test dependencies # Fedora does not have crowbar, ezjsonm, or junit_alcotest %if 0 BuildRequires: ocaml-alcotest-devel BuildRequires: ocaml-crowbar-devel BuildRequires: ocaml-ezjsonm-devel BuildRequires: ocaml-fmt-devel BuildRequires: ocaml-junit-alcotest-devel BuildRequires: ocaml-logs-devel BuildRequires: ocaml-mdx-devel >= 2.10 %endif %description This is an OCaml library to parse and generate the YAML file format. It is intended to be interoperable with the Ezjsonm (https://github.com/mirage/ezjsonm) JSON handling library, if the simple common subset of Yaml is used. Anchors and other advanced Yaml features are not implemented in the JSON compatibility layer. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: ocaml-bos-devel%{?_isa} Requires: ocaml-ctypes-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %package sexp Summary: Parse and generate YAML 1.1/1.2 files with sexp support Requires: %{name}%{?_isa} = %{version}-%{release} %description sexp This package adds sexp support to the functionality of ocaml-yaml. %package sexp-devel Summary: Development files for %{name}-sexp Requires: %{name}-devel%{?_isa} = %{version}-%{release} Requires: %{name}-sexp%{?_isa} = %{version}-%{release} Requires: ocaml-ppx-sexp-conv-devel%{?_isa} Requires: ocaml-sexplib-devel%{?_isa} %description sexp-devel The %{name}-sexp-devel package contains libraries and signature files for developing applications that use %{name}-sexp. %prep %setup -n yaml-%{version} # Unbundle the included copy of libyaml. # https://bugzilla.redhat.com/show_bug.cgi?id=2217729#c4 rm vendor/*.c vendor/yaml.h vendor/yaml_private.h vendor/dune cp %{_includedir}/yaml.h vendor/yaml.h %patch -P1 -p1 touch vendor/dummy.c cp %{SOURCE1} vendor/dune sed -i 's|../../vendor/yaml_private.h||g' ffi/lib/dune %build %dune_build %install %dune_install -s %if 0 %check %dune_check %endif %files -f .ofiles-yaml %license LICENSE.md %doc README.md CHANGES.md %files devel -f .ofiles-yaml-devel %files sexp -f .ofiles-yaml-sexp %license LICENSE.md %doc README.md CHANGES.md %files sexp-devel -f .ofiles-yaml-sexp-devel %changelog %autochangelog