]> git.pld-linux.org Git - packages/ocaml-zarith.git/blame - ocaml-zarith.spec
- added x32 patch (adjust asm arch detection for x32 ABI); release 2
[packages/ocaml-zarith.git] / ocaml-zarith.spec
CommitLineData
2581d7f6
JR
1#
2# Conditional build:
67c93bbb
JR
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
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
7f4ec68f 14Version: 1.9.1
41878b55 15Release: 2
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
20# Source0-md5: af41b7534a4c91a8f774f04e307c1c66
41878b55 21Patch0: %{name}-x32.patch
7f4ec68f 22URL: http://github.com/ocaml/Zarith
2581d7f6
JR
23BuildRequires: bash
24BuildRequires: gmp-devel
7f4ec68f
JB
25BuildRequires: ocaml >= 3.12.1
26BuildRequires: ocaml-findlib
27BuildRequires: perl-base
2581d7f6
JR
28%requires_eq ocaml-runtime
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
32The Zarith library implements arithmetic and logical operations over
33arbitrary-precision integers. It uses GMP to efficiently implement
34arithmetic over big integers. Small integers are represented as Caml
35unboxed integers, for speed and space economy.
36
7f4ec68f
JB
37%description -l pl.UTF-8
38Biblioteka Zarith implementuje operacje arytmetyczne i logiczne na
39liczbach całkowitych dowolnej precyzji. Wykorzystuje gmp do wydajnej
40arytmetyki na dużych liczbach całkowitych. Małe liczby całkowite są
41reprezentowane jako nieograniczone liczby całkowite Camla, aby zyskać
42na szybkości i rozmiarze.
43
2581d7f6
JR
44%package devel
45Summary: Zarith library development files
7f4ec68f 46Summary(pl.UTF-8): Pliki programistyczne biblioteki Zarith
2581d7f6
JR
47Group: Development/Libraries
48Requires: %{name} = %{version}-%{release}
49%requires_eq ocaml
50
51%description devel
52This package contains files needed to develop OCaml programs using
7f4ec68f
JB
53Zarith library.
54
55%description devel -l pl.UTF-8
56Ten pakiet zawiera pliki potrzebne do tworzenia programów w OCamlu
57przy użyciu biblioteki Zarith.
2581d7f6
JR
58
59%prep
7f4ec68f 60%setup -q -n Zarith-release-%{version}
41878b55 61%patch0 -p1
2581d7f6
JR
62
63%build
41878b55 64CC="%{__cc}" \
2581d7f6
JR
65CFLAGS="%{rpmcflags}" \
66./configure \
41878b55 67 -host %{_target_platform} \
7f4ec68f 68 -installdir $RPM_BUILD_ROOT%{_libdir}/ocaml \
2581d7f6
JR
69 -gmp
70
7f4ec68f 71%{__make} -j1
2581d7f6
JR
72
73%install
74rm -rf $RPM_BUILD_ROOT
75export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
76install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
77
78%{__make} install \
79 DESTDIR=$RPM_BUILD_ROOT
80
81# move to dir pld ocamlfind looks
62d25049 82install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
7f4ec68f 83%{__mv} $OCAMLFIND_DESTDIR/%{module}/META \
62d25049
JR
84 $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
85cat <<EOF >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}/META
86directory="+%{module}"
2581d7f6
JR
87EOF
88
7f4ec68f
JB
89# not required with system package manager
90%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.so.owner
91
2581d7f6
JR
92%clean
93rm -rf $RPM_BUILD_ROOT
94
95%files
96%defattr(644,root,root,755)
7f4ec68f
JB
97%doc Changes LICENSE README.md
98%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllzarith.so
62d25049 99%dir %{_libdir}/ocaml/%{module}
67c93bbb 100%if %{with ocaml_opt}
7f4ec68f 101%attr(755,root,root) %{_libdir}/ocaml/%{module}/zarith.cmxs
67c93bbb 102%endif
62d25049 103%{_libdir}/ocaml/site-lib/%{module}
2581d7f6
JR
104
105%files devel
106%defattr(644,root,root,755)
62d25049
JR
107%{_libdir}/ocaml/%{module}/*.cm[axi]
108%{_libdir}/ocaml/%{module}/*.mli
7f4ec68f 109%{_libdir}/ocaml/%{module}/*.cmti
67c93bbb 110%{_libdir}/ocaml/%{module}/libzarith.a
7f4ec68f 111%{_libdir}/ocaml/%{module}/zarith.h
67c93bbb
JR
112%if %{with ocaml_opt}
113%{_libdir}/ocaml/%{module}/zarith.a
7f4ec68f 114%{_libdir}/ocaml/%{module}/zarith.cmxa
2581d7f6 115%endif
This page took 0.047353 seconds and 4 git commands to generate.