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