]> git.pld-linux.org Git - packages/ocaml-num.git/blame - ocaml-num.spec
- and update opt files
[packages/ocaml-num.git] / ocaml-num.spec
CommitLineData
ab75d363
JR
1#
2# Conditional build:
3%bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
4
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
8%endif
9
10%if %{without ocaml_opt}
11%define _enable_debug_packages 0
12%endif
13
14%define module num
15Summary: Legacy Num library for arbitrary-precision integer and rational arithmetic
16Name: ocaml-num
17Version: 1.4
18Release: 1
19License: LGPLv2+ with exceptions
20Source0: https://github.com/ocaml/num/archive/v%{version}/%{module}-%{version}.tar.gz
21# Source0-md5: cda2b727e116a0b6a9c03902cc4b2415
22URL: https://github.com/ocaml/num
23BuildRequires: ocaml >= 1:4.0
24BuildRequires: ocaml-findlib-devel
25%requires_eq ocaml-runtime
26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28%description
29This library implements arbitrary-precision arithmetic on big integers
30and on rationals.
31
32This is a legacy library. It used to be part of the core OCaml
33distribution (in otherlibs/num) but is now distributed separately. New
34applications that need arbitrary-precision arithmetic should use the
35Zarith library (https://github.com/ocaml/Zarith) instead of the Num
36library, and older applications that already use Num are encouraged to
37switch to Zarith. Zarith delivers much better performance than Num and
38has a nicer API.
39
40%package devel
41Summary: Development files for %{name}
42Requires: %{name} = %{version}-%{release}
43
44%description devel
45The %{name}-devel package contains libraries and signature files for
46developing applications that use %{name}.
47
48%prep
49%setup -q -n num-%{version}
50
51%build
bae1513a
JR
52%{__make} all \
53%if %{without ocaml_opt}
54 BNG_ARCH=generic \
55 ARCH=none
56%endif
ab75d363
JR
57
58%install
59rm -rf $RPM_BUILD_ROOT
60
61%{__make} install \
bae1513a
JR
62%if %{without ocaml_opt}
63 BNG_ARCH=generic \
64 ARCH=none \
65%endif
ab75d363
JR
66 DESTDIR=$RPM_BUILD_ROOT \
67 OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
68
69%clean
70rm -rf $RPM_BUILD_ROOT
71
72%files
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
82%if %{with ocaml_opt}
83%attr(755,root,root) %{_libdir}/ocaml/*.cmxs
84%endif
85
86%files devel
87%defattr(644,root,root,755)
88%{_libdir}/ocaml/*.cmi
89%{_libdir}/ocaml/*.cmti
90%{_libdir}/ocaml/*.mli
bae1513a 91%{_libdir}/ocaml/libnums.a
ab75d363 92%if %{with ocaml_opt}
24a702a9 93%{_libdir}/ocaml/nums.a
ab75d363
JR
94%{_libdir}/ocaml/*.cmx
95%{_libdir}/ocaml/*.cmxa
96%endif
97%{_libdir}/ocaml/num-top/*.cmi
This page took 0.070407 seconds and 4 git commands to generate.