From 93e29acae87f9c08a9b02243ea0d771bb122ff18 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 17 Aug 2020 11:06:48 -0600 Subject: [PATCH] Initial import. --- .gitignore | 1 + ocaml-jst-config.spec | 66 +++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 68 insertions(+) create mode 100644 .gitignore create mode 100644 ocaml-jst-config.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57df557 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/jst-config-*.tar.gz diff --git a/ocaml-jst-config.spec b/ocaml-jst-config.spec new file mode 100644 index 0000000..247c960 --- /dev/null +++ b/ocaml-jst-config.spec @@ -0,0 +1,66 @@ +# This package contains generated C header files. They differ by architecture, +# so this package cannot be noarch, but there are no ELF objects in it. +%global debug_package %{nil} + +%global srcname jst-config + +Name: ocaml-%{srcname} +Version: 0.14.0 +Release: 1%{?dist} +Summary: Compile-time configuration for Jane Street libraries + +License: MIT +URL: https://github.com/janestreet/%{srcname} +Source0: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz + +BuildRequires: ocaml >= 4.04.2 +BuildRequires: (ocaml-base-devel >= 0.14.0 with ocaml-base-devel < 0.15.0) +BuildRequires: ocaml-dune-devel >= 2.0.0 +BuildRequires: (ocaml-ppx-assert-devel >= 0.14.0 with ocaml-ppx-assert-devel < 0.15.0) +BuildRequires: (ocaml-stdio-devel >= 0.14.0 with ocaml-stdio-devel < 0.15.0) + +%description +This package defines compile-time constants used in Jane Street libraries +such as Base, Core, and Async. + +%package devel +Summary: Development files for %{name} +Requires: ocaml-base-devel%{?_isa} +Requires: ocaml-ppx-assert-devel%{?_isa} +Requires: ocaml-stdio-devel%{?_isa} + +%description devel +This package defines compile-time constants used in Jane Street libraries +such as Base, Core, and Async. + +%prep +%autosetup -n %{srcname}-%{version} + +%build +dune build %{?_smp_mflags} --display=verbose + +%install +dune install --destdir=%{buildroot} + +# The generated config_h.ml file is empty, and so the rest of the compiled OCaml +# artifacts likewise contain nothing useful. No consumers need them either, so +# we remove them. +rm -f %{buildroot}%{_libdir}/ocaml/%{srcname}/*.{a,cma,cmi,cmt,cmx,cmxa,cmxs,ml} + +# Removing those artifacts means we also need to remove references to them +sed -ri '/(archive|plugin)/d' \ + %{buildroot}%{_libdir}/ocaml/%{srcname}/{dune-package,META} + +# We install the documentation with the doc macro +rm -fr %{buildroot}%{_prefix}/doc + +%check +dune runtest + +%files devel +%license LICENSE.md +%{_libdir}/ocaml/%{srcname}/ + +%changelog +* Fri Jun 19 2020 Jerry James - 0.14.0-1 +- Initial RPM diff --git a/sources b/sources new file mode 100644 index 0000000..d2df143 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (jst-config-0.14.0.tar.gz) = 9d76f3394490762aaef36a3fd3ced4769da05e5a62176bb215379f18a29eab5089e65f599a3a3621937a5a79fcbda22cecf189e8e290acffef5b565e1b4d3b58