Add ocaml-yaml
[fedora-reviews.git] / ocaml-yaml / ocaml-yaml.spec
1 Name:           ocaml-yaml
2 Version:        3.1.0
3 Release:        %autorelease
4 Summary:        Parse and generate YAML 1.1/1.2 files
5
6 License:        ISC
7 URL:            https://avsm.github.io/ocaml-yaml/
8 Source0:        https://github.com/avsm/ocaml-yaml/releases/download/v%{version}/yaml-%{version}.tbz
9
10 BuildRequires:  ocaml >= 4.13.0
11 BuildRequires:  ocaml-bos-devel
12 BuildRequires:  ocaml-ctypes-devel >= 0.14.0
13 BuildRequires:  ocaml-dune >= 2.0
14 BuildRequires:  ocaml-dune-configurator-devel
15 BuildRequires:  ocaml-ppx-sexp-conv-devel >= 0.9.0
16 BuildRequires:  ocaml-sexplib-devel
17
18 # Test dependencies
19 # Fedora does not have crowbar, ezjsonm, or junit_alcotest
20 %if 0
21 BuildRequires:  ocaml-alcotest-devel
22 BuildRequires:  ocaml-crowbar-devel
23 BuildRequires:  ocaml-ezjsonm-devel
24 BuildRequires:  ocaml-fmt-devel
25 BuildRequires:  ocaml-junit-alcotest-devel
26 BuildRequires:  ocaml-logs-devel
27 BuildRequires:  ocaml-mdx-devel >= 2.10
28 %endif
29
30 # The bundled version of libyaml has been modified for better integration
31 # with ocaml-ctypes
32 Provides:       bundled(libyaml) = 0.2.5
33
34 %description
35 This is an OCaml library to parse and generate the YAML file format.  It
36 is intended to be interoperable with the Ezjsonm
37 (https://github.com/mirage/ezjsonm) JSON handling library, if the simple
38 common subset of Yaml is used.  Anchors and other advanced Yaml features
39 are not implemented in the JSON compatibility layer.
40
41 %package        devel
42 Summary:        Development files for %{name}
43 Requires:       %{name}%{?_isa} = %{version}-%{release}
44 Requires:       ocaml-bos-devel%{?_isa}
45 Requires:       ocaml-ctypes-devel%{?_isa}
46
47 %description    devel
48 The %{name}-devel package contains libraries and signature
49 files for developing applications that use %{name}.
50
51 %package        sexp
52 Summary:        Parse and generate YAML 1.1/1.2 files with sexp support
53 Requires:       %{name}%{?_isa} = %{version}-%{release}
54
55 %description    sexp
56 This package adds sexp support to the functionality of ocaml-yaml.
57
58 %package        sexp-devel
59 Summary:        Development files for %{name}-sexp
60 Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
61 Requires:       %{name}-sexp%{?_isa} = %{version}-%{release}
62 Requires:       ocaml-ppx-sexp-conv-devel%{?_isa}
63 Requires:       ocaml-sexplib-devel%{?_isa}
64
65 %description    sexp-devel
66 The %{name}-sexp-devel package contains libraries and signature
67 files for developing applications that use %{name}-sexp.
68
69 %prep
70 %autosetup -n yaml-%{version}
71
72 %build
73 %dune_build
74
75 %install
76 %dune_install -s
77
78 %if 0
79 %check
80 %dune_check
81 %endif
82
83 %files -f .ofiles-yaml
84 %license LICENSE.md
85 %doc README.md CHANGES.md
86
87 %files devel -f .ofiles-yaml-devel
88
89 %files sexp -f .ofiles-yaml-sexp
90 %license LICENSE.md
91 %doc README.md CHANGES.md
92
93 %files sexp-devel -f .ofiles-yaml-sexp-devel
94
95 %changelog
96 %autochangelog