]> git.pld-linux.org Git - packages/ocaml-gmp.git/blame - ocaml-gmp.spec
- unify ocaml_opt bcond name
[packages/ocaml-gmp.git] / ocaml-gmp.spec
CommitLineData
af8c9270
JR
1#
2# Conditional build:
e9ed3d6f 3%bcond_without ocaml_opt # build opt (native code)
af8c9270 4
e9ed3d6f
JB
5%ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
6%undefine with_ocaml_opt
af8c9270
JR
7%endif
8
6bbca805
JB
9Summary: GMP binding for OCaml
10Summary(pl.UTF-8): Wiązania GMP dla OCamla
11Name: ocaml-gmp
12Version: 20120224
e9ed3d6f 13Release: 4
6bbca805
JB
14License: LGPL v2+
15Group: Libraries
16Source0: http://www-verimag.imag.fr/~monniaux/download/mlgmp_%{version}.tar.gz
17# Source0-md5: 7001db70f5fed91f230b459425129f96
18Patch0: %{name}-make.patch
19URL: http://www-verimag.imag.fr/~monniaux/programmes.html.en
20BuildRequires: gmp-devel >= 5.0.1
21BuildRequires: mpfr-devel >= 3.0.1
22BuildRequires: ocaml >= 1:3.11.2
23Requires: gmp >= 5.0.1
24Requires: mpfr >= 3.0.1
25%requires_eq ocaml-runtime
26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28%description
29This package contains files needed to run bytecode executables using
30MLGMP library.
31
32%description -l pl.UTF-8
33Pakiet ten zawiera binaria potrzebne do uruchamiania programów
34używających biblioteki MLGMP.
35
36%package devel
37Summary: GMP binding for OCaml - development part
38Summary(pl.UTF-8): Wiązania GMP dla OCamla - cześć programistyczna
39Group: Development/Libraries
40Requires: %{name} = %{version}-%{release}
41%requires_eq ocaml
42
43%description devel
44This package contains files needed to develop OCaml programs using
45MLGML library.
46
47%description devel -l pl.UTF-8
48Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
49biblioteki MLGMP.
50
51%prep
52%setup -q -n mlgmp
53%patch0 -p1
54
55%build
56# clean up precompiled files
57%{__make} clean
58
59%{__make} \
e9ed3d6f 60 %{?with_ocaml_opt:HAS_OPT=1} \
6bbca805
JB
61 CC="%{__cc} %{rpmcflags} -fPIC" \
62 CFLAGS_MISC="%{rpmcflags} -fPIC -Wall -Wno-unused -Werror" \
af8c9270 63 GMP_INCLUDES=
6bbca805
JB
64
65%install
66rm -rf $RPM_BUILD_ROOT
67
68%{__make} install \
e9ed3d6f 69 %{?with_ocaml_opt:HAS_OPT=1} \
af8c9270 70 DESTDIR=$RPM_BUILD_ROOT
6bbca805
JB
71
72install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/gmp
73cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/gmp/META <<EOF
74requires = ""
75version = "%{version}"
76directory = "+gmp"
77archive(byte) = "gmp.cma"
78archive(native) = "gmp.cmxa"
79linkopts = ""
80EOF
81
e9ed3d6f
JB
82# packaged as %doc
83%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/gmp/gmp.mli
84
6bbca805
JB
85%clean
86rm -rf $RPM_BUILD_ROOT
87
88%files
89%defattr(644,root,root,755)
90%doc ChangeLog FAQ.txt README
91%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllgmpstub.so
92
93%files devel
94%defattr(644,root,root,755)
95%doc *.mli
96%dir %{_libdir}/ocaml/gmp
e9ed3d6f
JB
97%{_libdir}/ocaml/gmp/gmp.cma
98%{_libdir}/ocaml/gmp/gmp.cmi
99%if %{with ocaml_opt}
af8c9270 100%{_libdir}/ocaml/gmp/gmp.a
e9ed3d6f 101%{_libdir}/ocaml/gmp/gmp.cmxa
af8c9270 102%endif
6bbca805
JB
103%{_libdir}/ocaml/gmp/libgmpstub.a
104%{_libdir}/ocaml/site-lib/gmp
This page took 0.082879 seconds and 4 git commands to generate.