]> git.pld-linux.org Git - packages/ocaml-gmp.git/blob - ocaml-gmp.spec
- unify ocaml_opt bcond name
[packages/ocaml-gmp.git] / ocaml-gmp.spec
1 #
2 # Conditional build:
3 %bcond_without  ocaml_opt       # build opt (native code)
4
5 %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
6 %undefine       with_ocaml_opt
7 %endif
8
9 Summary:        GMP binding for OCaml
10 Summary(pl.UTF-8):      Wiązania GMP dla OCamla
11 Name:           ocaml-gmp
12 Version:        20120224
13 Release:        4
14 License:        LGPL v2+
15 Group:          Libraries
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)
27
28 %description
29 This package contains files needed to run bytecode executables using
30 MLGMP library.
31
32 %description -l pl.UTF-8
33 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
34 używających biblioteki MLGMP.
35
36 %package devel
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}
41 %requires_eq    ocaml
42
43 %description devel
44 This package contains files needed to develop OCaml programs using
45 MLGML library.
46
47 %description devel -l pl.UTF-8
48 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
49 biblioteki 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} \
60         %{?with_ocaml_opt:HAS_OPT=1} \
61         CC="%{__cc} %{rpmcflags} -fPIC" \
62         CFLAGS_MISC="%{rpmcflags} -fPIC -Wall -Wno-unused -Werror" \
63         GMP_INCLUDES=
64
65 %install
66 rm -rf $RPM_BUILD_ROOT
67
68 %{__make} install \
69         %{?with_ocaml_opt:HAS_OPT=1} \
70         DESTDIR=$RPM_BUILD_ROOT
71
72 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/gmp
73 cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/gmp/META <<EOF
74 requires = ""
75 version = "%{version}"
76 directory = "+gmp"
77 archive(byte) = "gmp.cma"
78 archive(native) = "gmp.cmxa"
79 linkopts = ""
80 EOF
81
82 # packaged as %doc
83 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/gmp/gmp.mli
84
85 %clean
86 rm -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
97 %{_libdir}/ocaml/gmp/gmp.cma
98 %{_libdir}/ocaml/gmp/gmp.cmi
99 %if %{with ocaml_opt}
100 %{_libdir}/ocaml/gmp/gmp.a
101 %{_libdir}/ocaml/gmp/gmp.cmxa
102 %endif
103 %{_libdir}/ocaml/gmp/libgmpstub.a
104 %{_libdir}/ocaml/site-lib/gmp
This page took 0.092717 seconds and 3 git commands to generate.