]> git.pld-linux.org Git - packages/ocaml-num.git/blob - ocaml-num.spec
- and update opt files
[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} all \
53 %if %{without ocaml_opt}
54         BNG_ARCH=generic \
55         ARCH=none
56 %endif
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60
61 %{__make} install \
62 %if %{without ocaml_opt}
63         BNG_ARCH=generic \
64         ARCH=none \
65 %endif
66         DESTDIR=$RPM_BUILD_ROOT \
67         OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
68
69 %clean
70 rm -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
91 %{_libdir}/ocaml/libnums.a
92 %if %{with ocaml_opt}
93 %{_libdir}/ocaml/nums.a
94 %{_libdir}/ocaml/*.cmx
95 %{_libdir}/ocaml/*.cmxa
96 %endif
97 %{_libdir}/ocaml/num-top/*.cmi
This page took 0.158674 seconds and 3 git commands to generate.