3 %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
5 # not yet available on x32 (ocaml 4.02.1), update when upstream will support it
6 %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
7 %undefine with_ocaml_opt
10 %if %{without ocaml_opt}
11 %define _enable_debug_packages 0
15 Summary: Legacy Num library for arbitrary-precision integer and rational arithmetic
19 License: LGPLv2+ with exceptions
20 Source0: https://github.com/ocaml/num/archive/v%{version}/%{module}-%{version}.tar.gz
21 # Source0-md5: cda2b727e116a0b6a9c03902cc4b2415
22 URL: https://github.com/ocaml/num
23 BuildRequires: ocaml >= 1:4.0
24 BuildRequires: ocaml-findlib-devel
25 %requires_eq ocaml-runtime
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 This library implements arbitrary-precision arithmetic on big integers
32 This is a legacy library. It used to be part of the core OCaml
33 distribution (in otherlibs/num) but is now distributed separately. New
34 applications that need arbitrary-precision arithmetic should use the
35 Zarith library (https://github.com/ocaml/Zarith) instead of the Num
36 library, and older applications that already use Num are encouraged to
37 switch to Zarith. Zarith delivers much better performance than Num and
41 Summary: Development files for %{name}
42 Requires: %{name} = %{version}-%{release}
45 The %{name}-devel package contains libraries and signature files for
46 developing applications that use %{name}.
49 %setup -q -n num-%{version}
53 %if %{without ocaml_opt}
59 rm -rf $RPM_BUILD_ROOT
62 %if %{without ocaml_opt}
66 DESTDIR=$RPM_BUILD_ROOT \
67 OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
70 rm -rf $RPM_BUILD_ROOT
73 %defattr(644,root,root,755)
74 %doc Changelog README.md
75 %attr(755,root,root) %{_libdir}/ocaml/stublibs/*.so
76 %dir %{_libdir}/ocaml/%{module}
77 %{_libdir}/ocaml/%{module}/META
78 %dir %{_libdir}/ocaml/num-top
79 %{_libdir}/ocaml/num-top/META
80 %{_libdir}/ocaml/*.cma
81 %{_libdir}/ocaml/num-top/num_top.cma
83 %attr(755,root,root) %{_libdir}/ocaml/*.cmxs
87 %defattr(644,root,root,755)
88 %{_libdir}/ocaml/*.cmi
89 %{_libdir}/ocaml/*.cmti
90 %{_libdir}/ocaml/*.mli
91 %{_libdir}/ocaml/libnums.a
93 %{_libdir}/ocaml/nums.a
94 %{_libdir}/ocaml/*.cmx
95 %{_libdir}/ocaml/*.cmxa
97 %{_libdir}/ocaml/num-top/*.cmi