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