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 URL: http://www-verimag.imag.fr/~monniaux/programmes.html.en
20 BuildRequires: gmp-devel >= 5.0.1
21 BuildRequires: mpfr-devel >= 3.0.1
22 BuildRequires: ocaml >= 1:3.11.2
23 Requires: gmp >= 5.0.1
24 Requires: mpfr >= 3.0.1
25 %requires_eq ocaml-runtime
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 This package contains files needed to run bytecode executables using
32 %description -l pl.UTF-8
33 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
34 używających biblioteki MLGMP.
37 Summary: GMP binding for OCaml - development part
38 Summary(pl.UTF-8): Wiązania GMP dla OCamla - cześć programistyczna
39 Group: Development/Libraries
40 Requires: %{name} = %{version}-%{release}
44 This package contains files needed to develop OCaml programs using
47 %description devel -l pl.UTF-8
48 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
56 # clean up precompiled files
60 %{?with_ocaml_opt:HAS_OPT=1} \
61 CC="%{__cc} %{rpmcflags} -fPIC" \
62 CFLAGS_MISC="%{rpmcflags} -fPIC -Wall -Wno-unused -Werror" \
66 rm -rf $RPM_BUILD_ROOT
69 %{?with_ocaml_opt:HAS_OPT=1} \
70 DESTDIR=$RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/gmp
73 cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/gmp/META <<EOF
75 version = "%{version}"
77 archive(byte) = "gmp.cma"
78 archive(native) = "gmp.cmxa"
83 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/gmp/gmp.mli
86 rm -rf $RPM_BUILD_ROOT
89 %defattr(644,root,root,755)
90 %doc ChangeLog FAQ.txt README
91 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllgmpstub.so
94 %defattr(644,root,root,755)
96 %dir %{_libdir}/ocaml/gmp
97 %{_libdir}/ocaml/gmp/gmp.cma
98 %{_libdir}/ocaml/gmp/gmp.cmi
100 %{_libdir}/ocaml/gmp/gmp.a
101 %{_libdir}/ocaml/gmp/gmp.cmxa
103 %{_libdir}/ocaml/gmp/libgmpstub.a
104 %{_libdir}/ocaml/site-lib/gmp