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