]> git.pld-linux.org Git - packages/ocaml-zarith.git/blob - ocaml-zarith.spec
rebuild with separate debuginfo build-ids
[packages/ocaml-zarith.git] / ocaml-zarith.spec
1 #
2 # Conditional build:
3 %bcond_without  ocaml_opt       # 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 Summary(pl.UTF-8):      Zarith - liczby całkowite dowolnej precyzji
13 Name:           ocaml-zarith
14 Version:        1.12
15 Release:        5
16 License:        LGPL v2 with linking exception
17 Group:          Applications/Math
18 #Source0Download: https://github.com/ocaml/Zarith/releases
19 Source0:        https://github.com/ocaml/Zarith/archive/release-%{version}/Zarith-%{version}.tar.gz
20 # Source0-md5:  bf368f3d9e20b6b446d54681afc05a04
21 URL:            http://github.com/ocaml/Zarith
22 BuildRequires:  bash
23 BuildRequires:  gmp-devel
24 BuildRequires:  ocaml >= 1:4.04
25 BuildRequires:  ocaml-findlib
26 BuildRequires:  perl-base
27 %requires_eq    ocaml-runtime
28 # does not work on x32 because sizeof(intnat) != sizeof(mp_limb_t) (4 != 8)
29 ExclusiveArch:  %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 The Zarith library implements arithmetic and logical operations over
34 arbitrary-precision integers. It uses GMP to efficiently implement
35 arithmetic over big integers. Small integers are represented as Caml
36 unboxed integers, for speed and space economy.
37
38 %description -l pl.UTF-8
39 Biblioteka Zarith implementuje operacje arytmetyczne i logiczne na
40 liczbach całkowitych dowolnej precyzji. Wykorzystuje gmp do wydajnej
41 arytmetyki na dużych liczbach całkowitych. Małe liczby całkowite są
42 reprezentowane jako nieograniczone liczby całkowite Camla, aby zyskać
43 na szybkości i rozmiarze.
44
45 %package devel
46 Summary:        Zarith library development files
47 Summary(pl.UTF-8):      Pliki programistyczne biblioteki Zarith
48 Group:          Development/Libraries
49 Requires:       %{name} = %{version}-%{release}
50 %requires_eq    ocaml
51
52 %description devel
53 This package contains files needed to develop OCaml programs using
54 Zarith library.
55
56 %description devel -l pl.UTF-8
57 Ten pakiet zawiera pliki potrzebne do tworzenia programów w OCamlu
58 przy użyciu biblioteki Zarith.
59
60 %prep
61 %setup -q -n Zarith-release-%{version}
62
63 %build
64 CC="%{__cc}" \
65 CFLAGS="%{rpmcflags}" \
66 ./configure \
67         -installdir $RPM_BUILD_ROOT%{_libdir}/ocaml \
68         -gmp
69
70 %{__make} -j1
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
75 install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
76
77 %{__make} install \
78         DESTDIR=$RPM_BUILD_ROOT
79
80 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/
81
82 # not required with system package manager
83 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.so.owner
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %files
89 %defattr(644,root,root,755)
90 %doc Changes LICENSE README.md
91 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllzarith.so
92 %dir %{_libdir}/ocaml/%{module}
93 %{_libdir}/ocaml/%{module}/META
94 %if %{with ocaml_opt}
95 %attr(755,root,root) %{_libdir}/ocaml/%{module}/zarith.cmxs
96 %endif
97
98 %files devel
99 %defattr(644,root,root,755)
100 %{_libdir}/ocaml/%{module}/*.cm[axi]
101 %{_libdir}/ocaml/%{module}/*.mli
102 %{_libdir}/ocaml/%{module}/*.cmti
103 %{_libdir}/ocaml/%{module}/libzarith.a
104 %{_libdir}/ocaml/%{module}/zarith.h
105 %if %{with ocaml_opt}
106 %{_libdir}/ocaml/%{module}/zarith.a
107 %{_libdir}/ocaml/%{module}/zarith.cmxa
108 %endif
This page took 0.057379 seconds and 3 git commands to generate.