3 %bcond_without opt # build opt
6 Summary: Zarith: arbitrary-precision integers
11 Group: Applications/Math
12 Source0: http://forge.ocamlcore.org/frs/download.php/1199/%{module}-%{version}.tgz
13 # Source0-md5: b507aaf2469103bb9e54291ff8def5c7
14 URL: http://forge.ocamlcore.org/projects/zarith
16 BuildRequires: gmp-devel
17 BuildRequires: ocaml >= 3.09.0
18 BuildRequires: camlp5 >= 5.01
19 %requires_eq ocaml-runtime
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 The Zarith library implements arithmetic and logical operations over
24 arbitrary-precision integers. It uses GMP to efficiently implement
25 arithmetic over big integers. Small integers are represented as Caml
26 unboxed integers, for speed and space economy.
29 Summary: Zarith library development files
30 Group: Development/Libraries
31 Requires: %{name} = %{version}-%{release}
35 This package contains files needed to develop OCaml programs using
39 %setup -q -n %{module}-%{version}
42 CFLAGS="%{rpmcflags}" \
44 -installdir $RPM_BUILD_ROOT/%{_libdir}/ocaml \
50 rm -rf $RPM_BUILD_ROOT
51 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
52 install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
55 DESTDIR=$RPM_BUILD_ROOT
57 # move to dir pld ocamlfind looks
58 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
59 mv $OCAMLFIND_DESTDIR/%{module}/META \
60 $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
61 cat <<EOF >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}/META
62 directory="+%{module}"
66 rm -rf $RPM_BUILD_ROOT
69 %defattr(644,root,root,755)
70 %attr(755,root,root) %{_libdir}/ocaml/stublibs/*.so
71 %{_libdir}/ocaml/stublibs/*.so.owner
72 %dir %{_libdir}/ocaml/%{module}
73 %{_libdir}/ocaml/%{module}/*.cmxs
74 %{_libdir}/ocaml/site-lib/%{module}
77 %defattr(644,root,root,755)
79 %{_libdir}/ocaml/%{module}/*.cm[axi]
80 %{_libdir}/ocaml/%{module}/*.mli
81 %{_libdir}/ocaml/%{module}/*.h
83 %{_libdir}/ocaml/%{module}/*.[ao]
84 %{_libdir}/ocaml/%{module}/*.cmxa