]> git.pld-linux.org Git - packages/ocaml-zarith.git/blob - ocaml-zarith.spec
- rebuild with ocaml 4.02
[packages/ocaml-zarith.git] / ocaml-zarith.spec
1 #
2 # Conditional build:
3 %bcond_without  opt             # build opt
4
5 %define         module  zarith
6 Summary:        Zarith: arbitrary-precision integers
7 Name:           ocaml-zarith
8 Version:        1.2.1
9 Release:        2
10 License:        GPL
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
15 BuildRequires:  bash
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)
21
22 %description
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.
27
28 %package devel
29 Summary:        Zarith library development files
30 Group:          Development/Libraries
31 Requires:       %{name} = %{version}-%{release}
32 %requires_eq    ocaml
33
34 %description devel
35 This package contains files needed to develop OCaml programs using
36 zarith library.
37
38 %prep
39 %setup -q -n %{module}-%{version}
40
41 %build
42 CFLAGS="%{rpmcflags}" \
43 ./configure \
44         -installdir $RPM_BUILD_ROOT/%{_libdir}/ocaml \
45         -gmp
46
47 %{__make} VERBOSE=1
48
49 %install
50 rm -rf $RPM_BUILD_ROOT
51 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
52 install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
53
54 %{__make} install \
55         DESTDIR=$RPM_BUILD_ROOT
56
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}"
63 EOF
64
65 %clean
66 rm -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
72 %dir %{_libdir}/ocaml/%{module}
73 %{_libdir}/ocaml/%{module}/*.cmxs
74 %{_libdir}/ocaml/site-lib/%{module}
75
76 %files devel
77 %defattr(644,root,root,755)
78 %doc LICENSE
79 %{_libdir}/ocaml/%{module}/*.cm[axi]
80 %{_libdir}/ocaml/%{module}/*.mli
81 %{_libdir}/ocaml/%{module}/*.h
82 %if %{with opt}
83 %{_libdir}/ocaml/%{module}/*.[ao]
84 %{_libdir}/ocaml/%{module}/*.cmxa
85 %endif
This page took 0.035275 seconds and 3 git commands to generate.