From e2d7bf7bc58187afa9ee3a8a505c214f38ef77a8 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Jan 07 2022 23:44:49 +0000 Subject: Initial import. --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a4ab9f3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/stdcompat-*.tar.gz diff --git a/README.md b/README.md index d5c0ec1..ffedab6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,17 @@ # ocaml-stdcompat -The ocaml-stdcompat package +[Stdcompat](https://github.com/thierry-martinez/stdcompat) is a compatibility +layer allowing programs to use some recent additions to the OCaml standard +library while preserving the ability to be compiled on former versions of +OCaml. + +The Stdcompat API is not intended to be stable, but there will be efforts to +allow future versions of Stdcompat to be compiled on a large range of versions +of OCaml: Stdcompat should compile (at least) on every version of OCaml from +3.08 (inclusive). + +The module Stdcompat provides some definitions for values and types introduced +in recent versions of the standard library. These definitions are just +aliases to the matching definition of the standard library if the latter is +recent enough. Otherwise, the module Stdcompat provides an alternative +implementation. diff --git a/ocaml-stdcompat.spec b/ocaml-stdcompat.spec new file mode 100644 index 0000000..cd5135f --- /dev/null +++ b/ocaml-stdcompat.spec @@ -0,0 +1,96 @@ +%global srcname stdcompat + +Name: ocaml-%{srcname} +Version: 17 +Release: 1%{?dist} +Summary: Compatibility module for the OCaml standard library + +License: BSD +URL: https://github.com/thierry-martinez/stdcompat +Source0: %{url}/releases/download/v%{version}/%{srcname}-%{version}.tar.gz + +BuildRequires: make +BuildRequires: ocaml +BuildRequires: ocaml-findlib + +%description +Stdcompat is a compatibility layer allowing programs to use some recent +additions to the OCaml standard library while preserving the ability to +be compiled on former versions of OCaml. + +The Stdcompat API is not intended to be stable, but there will be +efforts to allow future versions of Stdcompat to be compiled on a large +range of versions of OCaml: Stdcompat should compile (at least) on every +version of OCaml from 3.08 (inclusive). + +The module Stdcompat provides some definitions for values and types +introduced in recent versions of the standard library. These +definitions are just aliases to the matching definition of the standard +library if the latter is recent enough. Otherwise, the module Stdcompat +provides an alternative implementation. + +%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}. + +%prep +%autosetup -n %{srcname}-%{version} -p1 + +# Generate debuginfo +sed -i 's/-nolabels/-g &/' Makefile.in + +%build +%configure --libdir=%{_libdir}/ocaml + +# Parallel make does NOT work; there seem to be missing dependencies +make all + +%install +%make_install + +# We do not want the ml files +find %{buildroot}%{_libdir}/ocaml -name \*.ml -delete + +# Install the mli files +cp -p *.mli %{buildroot}%{_libdir}/ocaml/stdcompat + +# Install the opam file +cp -p stdcompat.opam %{buildroot}%{_libdir}/ocaml/stdcompat/opam + +# Remove spurious executable bits +chmod a-x %{buildroot}%{_libdir}/ocaml/stdcompat/*.{a,cma,cmi,cmt,cmx,cmxa,h} + +%check +make test + +%files +%doc AUTHORS ChangeLog README +%license COPYING +%dir %{_libdir}/ocaml/%{srcname}/ +%{_libdir}/ocaml/%{srcname}/META +%{_libdir}/ocaml/%{srcname}/*.cma +%{_libdir}/ocaml/%{srcname}/*.cmi +%ifarch %{ocaml_native_compiler} +%{_libdir}/ocaml/%{srcname}/*.cmxs +%endif +%{_libdir}/ocaml/stublibs/dllstdcompat__stubs.so +%{_libdir}/ocaml/stublibs/dllstdcompat__stubs.so.owner + +%files devel +%{_libdir}/ocaml/%{srcname}/opam +%ifarch %{ocaml_native_compiler} +%{_libdir}/ocaml/%{srcname}/*.a +%{_libdir}/ocaml/%{srcname}/*.cmx +%{_libdir}/ocaml/%{srcname}/*.cmxa +%endif +%{_libdir}/ocaml/%{srcname}/*.cmt +%{_libdir}/ocaml/%{srcname}/*.h +%{_libdir}/ocaml/%{srcname}/*.mli + +%changelog +* Fri Dec 31 2021 Jerry James - 17-1 +- Initial RPM diff --git a/sources b/sources new file mode 100644 index 0000000..bdde8c9 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (stdcompat-17.tar.gz) = 5fad888ec6fa06e0f3fa947ab7a0da6682011cffe0d388bfe69716b2b9a3aa184f859a7d55d75bf05e4bd059e4bb0b67aff0dc3479346e29f9d6a54a14dfc915