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