Initial import.

This commit is contained in:
Jerry James 2020-08-17 11:06:48 -06:00
parent 5b06816bb3
commit 93e29acae8
3 changed files with 68 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/jst-config-*.tar.gz

66
ocaml-jst-config.spec Normal file
View File

@ -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 <loganjerry@gmail.com> - 0.14.0-1
- Initial RPM

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (jst-config-0.14.0.tar.gz) = 9d76f3394490762aaef36a3fd3ced4769da05e5a62176bb215379f18a29eab5089e65f599a3a3621937a5a79fcbda22cecf189e8e290acffef5b565e1b4d3b58