Name: ocaml-num Version: 1.1 Release: 2%{?dist} Summary: Legacy Num library for arbitrary-precision integer and rational arithmetic License: LGPLv2+ with exceptions URL: https://github.com/ocaml/num Source0: https://github.com/ocaml/num/archive/v%{version}/%{name}-%{version}.tar.gz # Downstream patch to use ocamlfind to install everything, so # that DESTDIR installs work. Patch1: 0001-Use-ocamlfind-to-install.patch BuildRequires: ocaml BuildRequires: ocaml-findlib-devel %description This library implements arbitrary-precision arithmetic on big integers and on rationals. This is a legacy library. It used to be part of the core OCaml distribution (in otherlibs/num) but is now distributed separately. New applications that need arbitrary-precision arithmetic should use the Zarith library (https://github.com/ocaml/Zarith) instead of the Num library, and older applications that already use Num are encouraged to switch to Zarith. Zarith delivers much better performance than Num and has a nicer API. %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep %setup -q -n num-%{version} %patch1 -p1 %build make %{?_smp_mflags} all %check make -j1 test %install export DESTDIR=$RPM_BUILD_ROOT export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR make install find $RPM_BUILD_ROOT -name '*.annot' -delete find $RPM_BUILD_ROOT -name '*.cmt' -delete find $RPM_BUILD_ROOT -name '*.cmti' -delete %files %doc Changelog README.md %license LICENSE %{_libdir}/ocaml/num/ %{_libdir}/ocaml/num-top/ %ifarch %{ocaml_native_compiler} %exclude %{_libdir}/ocaml/num/*.a %exclude %{_libdir}/ocaml/num/*.cmxa %exclude %{_libdir}/ocaml/num/*.cmx %endif %exclude %{_libdir}/ocaml/num/*.mli %files devel %license LICENSE %ifarch %{ocaml_native_compiler} %{_libdir}/ocaml/num/*.a %{_libdir}/ocaml/num/*.cmxa %{_libdir}/ocaml/num/*.cmx %endif %{_libdir}/ocaml/num/*.mli %changelog * Wed Nov 8 2017 Richard W.M. Jones - 1.1-2 - Initial RPM version. - Fix Source0 to use nice package name.