4 Summary: Parse and generate YAML 1.1/1.2 files
7 URL: https://avsm.github.io/ocaml-yaml/
8 Source0: https://github.com/avsm/ocaml-yaml/releases/download/v%{version}/yaml-%{version}.tbz
10 # These are used to unbundle libyaml.
11 Patch1: fix-yaml.h.patch
12 Source1: unbundled-dune
14 BuildRequires: ocaml >= 4.13.0
15 BuildRequires: ocaml-bos-devel
16 BuildRequires: ocaml-ctypes-devel >= 0.14.0
17 BuildRequires: ocaml-dune >= 2.0
18 BuildRequires: ocaml-dune-configurator-devel
19 BuildRequires: ocaml-ppx-sexp-conv-devel >= 0.9.0
20 BuildRequires: ocaml-sexplib-devel
21 BuildRequires: libyaml-devel
24 # Fedora does not have crowbar, ezjsonm, or junit_alcotest
26 BuildRequires: ocaml-alcotest-devel
27 BuildRequires: ocaml-crowbar-devel
28 BuildRequires: ocaml-ezjsonm-devel
29 BuildRequires: ocaml-fmt-devel
30 BuildRequires: ocaml-junit-alcotest-devel
31 BuildRequires: ocaml-logs-devel
32 BuildRequires: ocaml-mdx-devel >= 2.10
36 This is an OCaml library to parse and generate the YAML file format. It
37 is intended to be interoperable with the Ezjsonm
38 (https://github.com/mirage/ezjsonm) JSON handling library, if the simple
39 common subset of Yaml is used. Anchors and other advanced Yaml features
40 are not implemented in the JSON compatibility layer.
43 Summary: Development files for %{name}
44 Requires: %{name}%{?_isa} = %{version}-%{release}
45 Requires: ocaml-bos-devel%{?_isa}
46 Requires: ocaml-ctypes-devel%{?_isa}
49 The %{name}-devel package contains libraries and signature
50 files for developing applications that use %{name}.
53 Summary: Parse and generate YAML 1.1/1.2 files with sexp support
54 Requires: %{name}%{?_isa} = %{version}-%{release}
57 This package adds sexp support to the functionality of ocaml-yaml.
60 Summary: Development files for %{name}-sexp
61 Requires: %{name}-devel%{?_isa} = %{version}-%{release}
62 Requires: %{name}-sexp%{?_isa} = %{version}-%{release}
63 Requires: ocaml-ppx-sexp-conv-devel%{?_isa}
64 Requires: ocaml-sexplib-devel%{?_isa}
66 %description sexp-devel
67 The %{name}-sexp-devel package contains libraries and signature
68 files for developing applications that use %{name}-sexp.
71 %setup -n yaml-%{version}
73 # Unbundle the included copy of libyaml.
74 # https://bugzilla.redhat.com/show_bug.cgi?id=2217729#c4
75 rm vendor/*.c vendor/yaml.h vendor/yaml_private.h vendor/dune
76 cp %{_includedir}/yaml.h vendor/yaml.h
79 cp %{SOURCE1} vendor/dune
81 sed -i 's|../../vendor/yaml_private.h||g' ffi/lib/dune
94 %files -f .ofiles-yaml
96 %doc README.md CHANGES.md
98 %files devel -f .ofiles-yaml-devel
100 %files sexp -f .ofiles-yaml-sexp
102 %doc README.md CHANGES.md
104 %files sexp-devel -f .ofiles-yaml-sexp-devel