]> git.pld-linux.org Git - packages/ocaml-num.git/blob - ocaml-num.spec
- new
[packages/ocaml-num.git] / ocaml-num.spec
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
15 Summary:        Legacy Num library for arbitrary-precision integer and rational arithmetic
16 Name:           ocaml-num
17 Version:        1.4
18 Release:        1
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)
27
28 %description
29 This library implements arbitrary-precision arithmetic on big integers
30 and on rationals.
31
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
38 has a nicer API.
39
40 %package        devel
41 Summary:        Development files for %{name}
42 Requires:       %{name} = %{version}-%{release}
43
44 %description    devel
45 The %{name}-devel package contains libraries and signature files for
46 developing applications that use %{name}.
47
48 %prep
49 %setup -q -n num-%{version}
50
51 %build
52 %{__make} %{?_smp_mflags} all
53
54 %install
55 rm -rf $RPM_BUILD_ROOT
56
57 %{__make} install \
58         DESTDIR=$RPM_BUILD_ROOT \
59         OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
60
61 %clean
62 rm -rf $RPM_BUILD_ROOT
63
64 %files
65 %defattr(644,root,root,755)
66 %doc Changelog README.md
67 %attr(755,root,root) %{_libdir}/ocaml/stublibs/*.so
68 %dir %{_libdir}/ocaml/%{module}
69 %{_libdir}/ocaml/%{module}/META
70 %dir %{_libdir}/ocaml/num-top
71 %{_libdir}/ocaml/num-top/META
72 %{_libdir}/ocaml/*.cma
73 %{_libdir}/ocaml/num-top/num_top.cma
74 %if %{with ocaml_opt}
75 %attr(755,root,root) %{_libdir}/ocaml/*.cmxs
76 %endif
77
78 %files devel
79 %defattr(644,root,root,755)
80 %{_libdir}/ocaml/*.cmi
81 %{_libdir}/ocaml/*.cmti
82 %{_libdir}/ocaml/*.mli
83 %if %{with ocaml_opt}
84 %{_libdir}/ocaml/*.[ao]
85 %{_libdir}/ocaml/*.cmx
86 %{_libdir}/ocaml/*.cmxa
87 %endif
88 %{_libdir}/ocaml/num-top/*.cmi
This page took 0.071958 seconds and 3 git commands to generate.