]> git.pld-linux.org Git - SPECS.git/blob - ocaml-gmp.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.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:        10
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 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)
28
29 %description
30 This package contains files needed to run bytecode executables using
31 MLGMP library.
32
33 %description -l pl.UTF-8
34 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
35 używających biblioteki MLGMP.
36
37 %package devel
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}
42 %requires_eq    ocaml
43
44 %description devel
45 This package contains files needed to develop OCaml programs using
46 MLGML library.
47
48 %description devel -l pl.UTF-8
49 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
50 biblioteki MLGMP.
51
52 %prep
53 %setup -q -n mlgmp
54 %patch0 -p1
55 %patch1 -p1
56
57 %build
58 # clean up precompiled files
59 %{__make} -j1 clean
60
61 %{__make} -j1 \
62         %{?with_ocaml_opt:HAS_OPT=1} \
63         CC="%{__cc} %{rpmcflags} -fPIC" \
64         CFLAGS_MISC="%{rpmcflags} -fPIC -Wall -Wno-unused -Werror" \
65         GMP_INCLUDES=
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69
70 %{__make} install \
71         %{?with_ocaml_opt:HAS_OPT=1} \
72         DESTDIR=$RPM_BUILD_ROOT
73
74 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/gmp
75 cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/gmp/META <<EOF
76 requires = ""
77 version = "%{version}"
78 directory = "+gmp"
79 archive(byte) = "gmp.cma"
80 archive(native) = "gmp.cmxa"
81 linkopts = ""
82 EOF
83
84 # packaged as %doc
85 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/gmp/gmp.mli
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90 %files
91 %defattr(644,root,root,755)
92 %doc ChangeLog FAQ.txt README
93 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllgmpstub.so
94
95 %files devel
96 %defattr(644,root,root,755)
97 %doc *.mli
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
104 %endif
105 %{_libdir}/ocaml/gmp/libgmpstub.a
106 %{_libdir}/ocaml/site-lib/gmp
This page took 0.828581 seconds and 3 git commands to generate.