diff options
author | Michel Alexandre Salim <salimma@fedoraproject.org> | 2021-04-30 12:28:29 -0700 |
---|---|---|
committer | Michel Alexandre Salim <salimma@fedoraproject.org> | 2021-04-30 12:28:29 -0700 |
commit | 901110ad08620bafac5b8165a29abae4d7755ba3 (patch) | |
tree | 8cfaca88bd17eb178e8a4d4efa9b40ff8f4305af /ocaml | |
parent | 8660559b74fc14a70e640914e65ea19e182716fe (diff) | |
download | specs-901110ad08620bafac5b8165a29abae4d7755ba3.tar.gz specs-901110ad08620bafac5b8165a29abae4d7755ba3.tar.xz specs-901110ad08620bafac5b8165a29abae4d7755ba3.zip |
- ocaml-atd
Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
Diffstat (limited to 'ocaml')
-rw-r--r-- | ocaml/ocaml-atd.spec | 314 |
1 files changed, 0 insertions, 314 deletions
diff --git a/ocaml/ocaml-atd.spec b/ocaml/ocaml-atd.spec deleted file mode 100644 index b56036e..0000000 --- a/ocaml/ocaml-atd.spec +++ /dev/null @@ -1,314 +0,0 @@ -%global project_name atd -%global forgeurl https://github.com/ahrefs/%{project_name} - -# Scala tests are failing -%bcond_with scala -%bcond_without tests - -Name: ocaml-%{project_name} -Version: 2.2.1 -Release: 2%{?dist} -Summary: Static Types for Json APIs - -License: BSD -URL: %{forgeurl} -Source0: %{url}/archive/%{version}/%{project_name}-%{version}.tar.gz - -BuildRequires: ocaml -BuildRequires: ocaml-dune -BuildRequires: ocaml-menhir -BuildRequires: ocaml-biniou-devel -BuildRequires: ocaml-easy-format-devel -BuildRequires: ocaml-re-devel -BuildRequires: ocaml-yojson-devel -%if %{with tests} -BuildRequires: java-11-openjdk-devel -%if %{with scala} -BuildRequires: scala -%endif -%endif - -%description -ATD stands for Adaptable Type Definitions. It is a syntax for defining -cross-language data types. It is used as input to generate efficient and -type-safe serializers, deserializers and validators. The current target -languages are OCaml and Java. - -The following opam packages are provided by the atd project: - -* atdgen: executable that generates OCaml code dealing with json and - biniou data formats -* atdj: executable that generates Java code dealing with json -* atd: library for parsing atd files used by code generators - - -%package devel -Summary: Development files for %{name} -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%package -n ocaml-atdgen -Summary: Generates efficient JSON serializers, deserializers and validators -# Requires: - -%description -n ocaml-atdgen -Atdgen is a command-line program that takes as input type definitions in the ATD -syntax and produces OCaml code suitable for data serialization and -deserialization. Two data formats are currently supported, these are biniou and -JSON. Atdgen-biniou and Atdgen-json will refer to Atdgen used in one context or -the other. Atdgen was designed with efficiency and durability in mind. Software -authors are encouraged to use Atdgen directly and to write tools that may reuse -part of Atdgen’s source code. - - -%package -n ocaml-atdgen-devel -Summary: Development files for ocaml-atdgen -Requires: ocaml-atdgen%{?_isa} = %{version}-%{release} - -%description -n ocaml-atdgen-devel -The ocaml-atdgen-devel package contains libraries and signature files for -developing applications that use ocaml-atdgen. - - -%package -n ocaml-atdj -Summary: Java code generation for ATD -# Requires: - -%description -n ocaml-atdj -Atdj is a program that generates a Java interface from type definitions. In -particular, given a set of ATD type definitions, this tool generates a set of -Java classes representing those types with built-in JSON serializers and -deserializers. - -The primary benefits of using the generated interface, over manually -manipulating JSON strings from within Java, are safety and ease of use. -Specifically, the generated interface offers the following features: - -- JSON strings are automatically checked for correctness with respect to the ATD - specification. - -- Details such as optional fields and their associated default values are - automatically handled. - - -%if %{with scala} -%package -n ocaml-atds -Summary: ATD Code generator for Scala -# Requires: - -%description -n ocaml-atds -Atdj is a program that generates a Scala interface from type definitions. In -particular, given a set of ATD type definitions, this tool generates a set of -Scala classes representing those types with built-in JSON serializers and -deserializers. - -The primary benefits of using the generated interface, over manually -manipulating JSON strings from within Scala, are safety and ease of use. -Specifically, the generated interface offers the following features: - -- JSON strings are automatically checked for correctness with respect to the ATD - specification. - -- Details such as optional fields and their associated default values are - automatically handled. -%endif - - -%package -n ocaml-atdgen-codec-runtime -Summary: Runtime for atdgen generated bucklescript converters -# Requires: - -%description -n ocaml-atdgen-codec-runtime -This library contains the types that are used by atdgen's bucklescript backend. - - -%package -n ocaml-atdgen-codec-runtime-devel -Summary: Development files for ocaml-atdgen-codec-runtime -Requires: ocaml-atdgen-codec-runtime%{?_isa} = %{version}-%{release} - -%description -n ocaml-atdgen-codec-runtime-devel -The ocaml-atdgen-codec-runtime-devel package contains libraries and signature -files for developing applications that use ocaml-atdgen-codec-runtime. - - -%package -n ocaml-atdgen-runtime -Summary: Runtime library for code generated by atdgen -# Requires: - -%description -n ocaml-atdgen-runtime -This package should be used only in conjunction with the stdgen code generator. - - -%package -n ocaml-atdgen-runtime-devel -Summary: Development files for ocaml-atdgen-runtime -Requires: ocaml-atdgen-runtime%{?_isa} = %{version}-%{release} - -%description -n ocaml-atdgen-runtime-devel -The ocaml-atdgen-runtime-devel package contains libraries and signature files -for developing applications that use ocaml-atdgen-runtime. - - -%prep -%autosetup -p1 -n %{project_name}-%{version} -%if %{with scala} -%else -rm atds.opam -rm -rf atds -%endif - - -%build -dune build %{?_smp_mflags} --verbose - - -%install -dune install --destdir=%{buildroot} --verbose - -# we are already packaging these properly -rm -rf %{buildroot}%{_usr}/doc - -# atdj and atds do not ship libraries -# dune has a known issue where it generates empty META files -# -# we actually don't need to ship devel files at all so remove -# the directories entirely -# -# https://github.com/ocaml/dune/issues/2353 -rm -rf %{buildroot}%{_libdir}/ocaml/atd{j,s} - - -%if %{with tests} -%check -dune runtest -%endif - - -%files -%license LICENSE.md -%doc CHANGES.md README.md -%{_bindir}/atdcat -%{_bindir}/cppo-json -%{_libdir}/ocaml/atd -%exclude %{_libdir}/ocaml/atd/dune-package -%exclude %{_libdir}/ocaml/atd/opam -%ifarch %{ocaml_native_compiler} -%exclude %{_libdir}/ocaml/atd/*.a -%exclude %{_libdir}/ocaml/atd/*.cmxa -%exclude %{_libdir}/ocaml/atd/*.cmx -%endif -%exclude %{_libdir}/ocaml/atd/*.ml -%exclude %{_libdir}/ocaml/atd/*.mli - - -%files devel -%doc CODEOWNERS -%ifarch %{ocaml_native_compiler} -%{_libdir}/ocaml/atd/dune-package -%{_libdir}/ocaml/atd/opam -%{_libdir}/ocaml/atd/*.a -%{_libdir}/ocaml/atd/*.cmxa -%{_libdir}/ocaml/atd/*.cmx -%endif -%{_libdir}/ocaml/atd/*.ml -%{_libdir}/ocaml/atd/*.mli - - -%files -n ocaml-atdgen -%{_bindir}/atdgen -%{_bindir}/atdgen-cppo -%{_libdir}/ocaml/atdgen -%exclude %{_libdir}/ocaml/atdgen/dune-package -%exclude %{_libdir}/ocaml/atdgen/opam -%ifarch %{ocaml_native_compiler} -%exclude %{_libdir}/ocaml/atdgen/*.a -%exclude %{_libdir}/ocaml/atdgen/*.cmxa -%exclude %{_libdir}/ocaml/atdgen/*.cmx -%endif -%exclude %{_libdir}/ocaml/atdgen/*.ml - - -%files -n ocaml-atdgen-devel -%ifarch %{ocaml_native_compiler} -%{_libdir}/ocaml/atdgen/dune-package -%{_libdir}/ocaml/atdgen/opam -%{_libdir}/ocaml/atdgen/*.a -%{_libdir}/ocaml/atdgen/*.cmxa -%{_libdir}/ocaml/atdgen/*.cmx -%endif -%{_libdir}/ocaml/atdgen/*.ml - - -%files -n ocaml-atdj -%{_bindir}/atdj - - -%if %{with scala} -%files -n ocaml-atds -%{_bindir}/atds -%{_libdir}/ocaml/atds -%endif - - -%files -n ocaml-atdgen-codec-runtime -%{_libdir}/ocaml/atdgen-codec-runtime -%exclude %{_libdir}/ocaml/atdgen-codec-runtime/dune-package -%exclude %{_libdir}/ocaml/atdgen-codec-runtime/opam -%ifarch %{ocaml_native_compiler} -%exclude %{_libdir}/ocaml/atdgen-codec-runtime/*.a -%exclude %{_libdir}/ocaml/atdgen-codec-runtime/*.cmxa -%exclude %{_libdir}/ocaml/atdgen-codec-runtime/*.cmx -%endif -%exclude %{_libdir}/ocaml/atdgen-codec-runtime/*.ml -%exclude %{_libdir}/ocaml/atdgen-codec-runtime/*.mli - - -%files -n ocaml-atdgen-codec-runtime-devel -%{_libdir}/ocaml/atdgen-codec-runtime/dune-package -%{_libdir}/ocaml/atdgen-codec-runtime/opam -%ifarch %{ocaml_native_compiler} -%{_libdir}/ocaml/atdgen-codec-runtime/*.a -%{_libdir}/ocaml/atdgen-codec-runtime/*.cmxa -%{_libdir}/ocaml/atdgen-codec-runtime/*.cmx -%endif -%{_libdir}/ocaml/atdgen-codec-runtime/*.ml -%{_libdir}/ocaml/atdgen-codec-runtime/*.mli - - -%files -n ocaml-atdgen-runtime -%{_libdir}/ocaml/atdgen-runtime -%exclude %{_libdir}/ocaml/atdgen-runtime/dune-package -%exclude %{_libdir}/ocaml/atdgen-runtime/opam -%ifarch %{ocaml_native_compiler} -%exclude %{_libdir}/ocaml/atdgen-runtime/*.a -%exclude %{_libdir}/ocaml/atdgen-runtime/*.cmxa -%exclude %{_libdir}/ocaml/atdgen-runtime/*.cmx -%endif -%exclude %{_libdir}/ocaml/atdgen-runtime/*.ml -%exclude %{_libdir}/ocaml/atdgen-runtime/*.mli - - -%files -n ocaml-atdgen-runtime-devel -%{_libdir}/ocaml/atdgen-runtime/dune-package -%{_libdir}/ocaml/atdgen-runtime/opam -%ifarch %{ocaml_native_compiler} -%{_libdir}/ocaml/atdgen-runtime/*.a -%{_libdir}/ocaml/atdgen-runtime/*.cmxa -%{_libdir}/ocaml/atdgen-runtime/*.cmx -%endif -%{_libdir}/ocaml/atdgen-runtime/*.ml -%{_libdir}/ocaml/atdgen-runtime/*.mli - - -%changelog -* Fri Apr 23 2021 Michel Alexandre Salim <salimma@fedoraproject.org> - 2.2.1-2 -- Create subpackages per OPAM module -- Optionally compile and test `atds` -- Skip shipping empty META files; known Dune issue - https://github.com/ocaml/dune/issues/2353 - -* Wed Apr 07 2021 Michel Alexandre Salim <salimma@fedoraproject.org> - 2.2.1-1 -- Initial package |