3 %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
5 # not yet available on x32 (ocaml 4.02.1), remove when upstream will support it
6 %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
7 %undefine with_ocaml_opt
11 Summary: Zarith: arbitrary-precision integers
16 Group: Applications/Math
17 Source0: http://forge.ocamlcore.org/frs/download.php/1199/%{module}-%{version}.tgz
18 # Source0-md5: b507aaf2469103bb9e54291ff8def5c7
19 URL: http://forge.ocamlcore.org/projects/zarith
21 BuildRequires: gmp-devel
22 BuildRequires: ocaml >= 3.09.0
23 BuildRequires: camlp5 >= 5.01
24 %requires_eq ocaml-runtime
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 The Zarith library implements arithmetic and logical operations over
29 arbitrary-precision integers. It uses GMP to efficiently implement
30 arithmetic over big integers. Small integers are represented as Caml
31 unboxed integers, for speed and space economy.
34 Summary: Zarith library development files
35 Group: Development/Libraries
36 Requires: %{name} = %{version}-%{release}
40 This package contains files needed to develop OCaml programs using
44 %setup -q -n %{module}-%{version}
47 CFLAGS="%{rpmcflags}" \
49 -installdir $RPM_BUILD_ROOT/%{_libdir}/ocaml \
52 %{__make} -j1 VERBOSE=1
55 rm -rf $RPM_BUILD_ROOT
56 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
57 install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
60 DESTDIR=$RPM_BUILD_ROOT
62 # move to dir pld ocamlfind looks
63 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
64 mv $OCAMLFIND_DESTDIR/%{module}/META \
65 $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
66 cat <<EOF >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}/META
67 directory="+%{module}"
71 rm -rf $RPM_BUILD_ROOT
74 %defattr(644,root,root,755)
75 %attr(755,root,root) %{_libdir}/ocaml/stublibs/*.so
76 %{_libdir}/ocaml/stublibs/*.so.owner
77 %dir %{_libdir}/ocaml/%{module}
79 %{_libdir}/ocaml/%{module}/*.cmxs
81 %{_libdir}/ocaml/site-lib/%{module}
84 %defattr(644,root,root,755)
86 %{_libdir}/ocaml/%{module}/*.cm[axi]
87 %{_libdir}/ocaml/%{module}/*.mli
88 %{_libdir}/ocaml/%{module}/*.h
89 %{_libdir}/ocaml/%{module}/libzarith.a
91 %{_libdir}/ocaml/%{module}/zarith.a
92 %{_libdir}/ocaml/%{module}/*.cmxa