3 %bcond_without ocaml_opt # build opt (native code)
5 %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
6 %undefine with_ocaml_opt
9 Summary: GMP binding for OCaml
10 Summary(pl.UTF-8): Wiązania GMP dla OCamla
16 Source0: http://www-verimag.imag.fr/~monniaux/download/mlgmp_%{version}.tar.gz
17 # Source0-md5: 7001db70f5fed91f230b459425129f96
18 Patch0: %{name}-make.patch
19 Patch1: inttypes.patch
20 URL: http://www-verimag.imag.fr/~monniaux/
21 BuildRequires: gmp-devel >= 5.0.1
22 BuildRequires: mpfr-devel >= 3.0.1
23 BuildRequires: ocaml >= 1:3.11.2
24 Requires: gmp >= 5.0.1
25 Requires: mpfr >= 3.0.1
26 %requires_eq ocaml-runtime
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 This package contains files needed to run bytecode executables using
33 %description -l pl.UTF-8
34 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
35 używających biblioteki MLGMP.
38 Summary: GMP binding for OCaml - development part
39 Summary(pl.UTF-8): Wiązania GMP dla OCamla - cześć programistyczna
40 Group: Development/Libraries
41 Requires: %{name} = %{version}-%{release}
45 This package contains files needed to develop OCaml programs using
48 %description devel -l pl.UTF-8
49 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
58 # clean up precompiled files
62 %{?with_ocaml_opt:HAS_OPT=1} \
63 CC="%{__cc} %{rpmcflags} -fPIC" \
64 CFLAGS_MISC="%{rpmcflags} -fPIC -Wall -Wno-unused -Werror" \
68 rm -rf $RPM_BUILD_ROOT
71 %{?with_ocaml_opt:HAS_OPT=1} \
72 DESTDIR=$RPM_BUILD_ROOT
74 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/gmp
75 cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/gmp/META <<EOF
77 version = "%{version}"
79 archive(byte) = "gmp.cma"
80 archive(native) = "gmp.cmxa"
85 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/gmp/gmp.mli
88 rm -rf $RPM_BUILD_ROOT
91 %defattr(644,root,root,755)
92 %doc ChangeLog FAQ.txt README
93 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllgmpstub.so
96 %defattr(644,root,root,755)
98 %dir %{_libdir}/ocaml/gmp
99 %{_libdir}/ocaml/gmp/gmp.cma
100 %{_libdir}/ocaml/gmp/gmp.cmi
101 %if %{with ocaml_opt}
102 %{_libdir}/ocaml/gmp/gmp.a
103 %{_libdir}/ocaml/gmp/gmp.cmxa
105 %{_libdir}/ocaml/gmp/libgmpstub.a
106 %{_libdir}/ocaml/site-lib/gmp