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