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