- rebuild with ocaml 4.02
[packages/ocaml-zarith.git] / ocaml-zarith.spec
CommitLineData
2581d7f6
JR
1#
2# Conditional build:
3%bcond_without opt # build opt
4
62d25049 5%define module zarith
2581d7f6 6Summary: Zarith: arbitrary-precision integers
62d25049 7Name: ocaml-zarith
2581d7f6 8Version: 1.2.1
6feb2fd6 9Release: 2
2581d7f6
JR
10License: GPL
11Group: Applications/Math
62d25049 12Source0: http://forge.ocamlcore.org/frs/download.php/1199/%{module}-%{version}.tgz
2581d7f6
JR
13# Source0-md5: b507aaf2469103bb9e54291ff8def5c7
14URL: http://forge.ocamlcore.org/projects/zarith
15BuildRequires: bash
16BuildRequires: gmp-devel
17BuildRequires: ocaml >= 3.09.0
18BuildRequires: camlp5 >= 5.01
19%requires_eq ocaml-runtime
20BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22%description
23The Zarith library implements arithmetic and logical operations over
24arbitrary-precision integers. It uses GMP to efficiently implement
25arithmetic over big integers. Small integers are represented as Caml
26unboxed integers, for speed and space economy.
27
28%package devel
29Summary: Zarith library development files
30Group: Development/Libraries
31Requires: %{name} = %{version}-%{release}
32%requires_eq ocaml
33
34%description devel
35This package contains files needed to develop OCaml programs using
36zarith library.
37
38%prep
62d25049 39%setup -q -n %{module}-%{version}
2581d7f6
JR
40
41%build
42CFLAGS="%{rpmcflags}" \
43./configure \
44 -installdir $RPM_BUILD_ROOT/%{_libdir}/ocaml \
45 -gmp
46
47%{__make} VERBOSE=1
48
49%install
50rm -rf $RPM_BUILD_ROOT
51export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
52install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
53
54%{__make} install \
55 DESTDIR=$RPM_BUILD_ROOT
56
57# move to dir pld ocamlfind looks
62d25049
JR
58install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
59mv $OCAMLFIND_DESTDIR/%{module}/META \
60 $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
61cat <<EOF >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}/META
62directory="+%{module}"
2581d7f6
JR
63EOF
64
65%clean
66rm -rf $RPM_BUILD_ROOT
67
68%files
69%defattr(644,root,root,755)
70%attr(755,root,root) %{_libdir}/ocaml/stublibs/*.so
71%{_libdir}/ocaml/stublibs/*.so.owner
62d25049
JR
72%dir %{_libdir}/ocaml/%{module}
73%{_libdir}/ocaml/%{module}/*.cmxs
74%{_libdir}/ocaml/site-lib/%{module}
2581d7f6
JR
75
76%files devel
77%defattr(644,root,root,755)
78%doc LICENSE
62d25049
JR
79%{_libdir}/ocaml/%{module}/*.cm[axi]
80%{_libdir}/ocaml/%{module}/*.mli
81%{_libdir}/ocaml/%{module}/*.h
2581d7f6 82%if %{with opt}
62d25049
JR
83%{_libdir}/ocaml/%{module}/*.[ao]
84%{_libdir}/ocaml/%{module}/*.cmxa
2581d7f6 85%endif
This page took 0.073061 seconds and 4 git commands to generate.