]> git.pld-linux.org Git - packages/ocaml-gmp.git/blob - ocaml-gmp.spec
0ed9db0ba5509418f91d614debcf5c026647c225
[packages/ocaml-gmp.git] / ocaml-gmp.spec
1 #
2 # Conditional build:
3 %bcond_without  opt             # build opt
4
5 %ifarch x32
6 %undefine       with_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:        3
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_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_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 %clean
83 rm -rf $RPM_BUILD_ROOT
84
85 %files
86 %defattr(644,root,root,755)
87 %doc ChangeLog FAQ.txt README
88 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllgmpstub.so
89
90 %files devel
91 %defattr(644,root,root,755)
92 %doc *.mli
93 %dir %{_libdir}/ocaml/gmp
94 %{_libdir}/ocaml/gmp/gmp.cm[ixa]*
95 %if %{with opt}
96 %{_libdir}/ocaml/gmp/gmp.a
97 %endif
98 %{_libdir}/ocaml/gmp/libgmpstub.a
99 %{_libdir}/ocaml/site-lib/gmp
This page took 0.058652 seconds and 2 git commands to generate.