Name: ocaml-ocplib-endian Version: 1.0 Release: 2%{?dist} Summary: Functions to read/write int16/32/64 from strings, bigarrays %global libname ocplib-endian # License is LGPL 2.1 with standard OCaml exceptions License: LGPLv2+ with exceptions URL: https://github.com/OCamlPro/ocplib-endian Source0: https://github.com/OCamlPro/ocplib-endian/archive/%{version}/ocplib-endian-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-cppo BuildRequires: ocaml-ocamlbuild-devel BuildRequires: ocaml-ocamldoc %description Optimised functions to read and write int16/32/64 from strings, bytes and bigarrays, based on primitives added in version 4.01. The library implements three modules: EndianString works directly on strings, and provides submodules BigEndian and LittleEndian, with their unsafe counter-parts; EndianBytes works directly on bytes, and provides submodules BigEndian and LittleEndian, with their unsafe counter-parts; EndianBigstring works on bigstrings (Bigarrays of chars), and provides submodules BigEndian and LittleEndian, with their unsafe counter-parts; %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 %{libname}-%{version} %build ocaml setup.ml -configure --enable-tests %make_build build %install export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR make install DESTDIR=%{buildroot} %check make test %files %license COPYING.txt %doc README.md CHANGES.md %{_libdir}/ocaml/%{libname} %ifarch %{ocaml_native_compiler} %exclude %{_libdir}/ocaml/%{libname}/*.a %exclude %{_libdir}/ocaml/%{libname}/*.cmxa %exclude %{_libdir}/ocaml/%{libname}/*.cmx %endif %exclude %{_libdir}/ocaml/%{libname}/*.mli %files devel %ifarch %{ocaml_native_compiler} %{_libdir}/ocaml/%{libname}/*.a %{_libdir}/ocaml/%{libname}/*.cmxa %{_libdir}/ocaml/%{libname}/*.cmx %endif %{_libdir}/ocaml/%{libname}/*.mli %changelog * Mon Oct 14 2019 Ben Rosser - 1.0-2 - Fix devel package Requires; switch to make_build macro. * Mon Oct 14 2019 Ben Rosser - 1.0-1 - Initial package.