]>
Commit | Line | Data |
---|---|---|
f9edcca0 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built) | |
4 | ||
5 | # not yet available on x32 (ocaml 4.02.1), update when upstream will support it | |
a7d056f8 | 6 | %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9 |
f9edcca0 JB |
7 | %undefine with_ocaml_opt |
8 | %endif | |
9 | ||
3d5fbf5a JB |
10 | Summary: libvirt binding for OCaml |
11 | Summary(pl.UTF-8): Wiązania libvirt dla OCamla | |
12 | Name: ocaml-libvirt | |
a7d056f8 | 13 | Version: 0.6.1.5 |
13e02c60 | 14 | Release: 3 |
3d5fbf5a JB |
15 | License: LGPL v2+ |
16 | Group: Libraries | |
a7d056f8 JB |
17 | Source0: https://libvirt.org/sources/ocaml/%{name}-%{version}.tar.gz |
18 | # Source0-md5: 4b5ec3b6eb93ca18e02433f04806f0ed | |
02634a7f JR |
19 | Patch0: 0001-block_peek-memory_peek-Use-bytes-for-return-buffer.patch |
20 | Patch1: 0001-Make-const-the-return-value-of-caml_named_value.patch | |
21 | Patch2: 0002-String_val-returns-const-char-in-OCaml-4.10.patch | |
22 | Patch3: 0003-Don-t-try-to-memcpy-into-a-String_val.patch | |
a7d056f8 JB |
23 | URL: https://libvirt.org/ocaml/ |
24 | BuildRequires: libvirt-devel >= 1.2.8 | |
3d5fbf5a JB |
25 | BuildRequires: ocaml >= 3.04-7 |
26 | BuildRequires: ocaml-findlib | |
a7d056f8 JB |
27 | BuildRequires: perl-base |
28 | BuildRequires: pkgconfig | |
29 | Requires: libvirt >= 1.2.8 | |
3d5fbf5a JB |
30 | %requires_eq ocaml-runtime |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
32 | ||
33 | %description | |
34 | ocaml-libvirt is a complete set of OCaml bindings around libvirt, | |
35 | exposing all known libvirt functionality to OCaml programs. | |
36 | ||
37 | This package contains files needed to run bytecode executables using | |
38 | the library. | |
39 | ||
40 | %description -l pl.UTF-8 | |
41 | ocaml-libvirt to kompletny zestaw wiązań OCamla do libvirt, | |
42 | udostępniający całą znaną funkcjonalność libvirt programom w OCamlu. | |
43 | ||
44 | Ten pakiet zawiera binaria potrzebne do uruchamiania programów | |
45 | używających tej biblioteki. | |
46 | ||
47 | %package devel | |
48 | Summary: libvirt binding for OCaml - development part | |
49 | Summary(pl.UTF-8): Wiązania libvirt dla OCamla - cześć programistyczna | |
50 | Group: Development/Libraries | |
51 | Requires: %{name} = %{version}-%{release} | |
52 | %requires_eq ocaml | |
53 | ||
54 | %description devel | |
55 | ocaml-libvirt is a complete set of OCaml bindings around libvirt, | |
56 | exposing all known libvirt functionality to OCaml programs. | |
57 | ||
58 | This package contains files needed to develop OCaml programs using | |
59 | the library. | |
60 | ||
61 | %description devel -l pl.UTF-8 | |
62 | ocaml-libvirt to kompletny zestaw wiązań OCamla do libvirt, | |
63 | udostępniający całą znaną funkcjonalność libvirt programom w OCamlu. | |
64 | ||
65 | Ten pakiet zawiera pliki niezbędne do tworzenia programów używających | |
66 | biblioteki. | |
67 | ||
68 | %prep | |
69 | %setup -q | |
02634a7f JR |
70 | %patch0 -p1 |
71 | %patch1 -p1 | |
72 | %patch2 -p1 | |
73 | %patch3 -p1 | |
3d5fbf5a JB |
74 | |
75 | %build | |
76 | %configure | |
77 | ||
a3733203 | 78 | # parallel build triggers makefile races |
f9edcca0 | 79 | %{__make} -j1 all %{?with_ocaml_opt:opt} \ |
3d5fbf5a JB |
80 | CC="%{__cc}" |
81 | ||
82 | %install | |
83 | rm -rf $RPM_BUILD_ROOT | |
13e02c60 | 84 | install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs |
3d5fbf5a | 85 | |
7a8e1860 | 86 | %{__make} install%{?with_ocaml_opt:-opt}%{!?with_ocaml_opt:-byte} \ |
13e02c60 | 87 | OCAMLFIND_INSTFLAGS="-destdir $RPM_BUILD_ROOT%{_libdir}/ocaml" |
f9edcca0 JB |
88 | |
89 | # packaged as %doc | |
13e02c60 | 90 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/libvirt/*.mli |
3d5fbf5a JB |
91 | |
92 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
93 | cp -p examples/*.ml $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
94 | ||
95 | %clean | |
96 | rm -rf $RPM_BUILD_ROOT | |
97 | ||
98 | %files | |
99 | %defattr(644,root,root,755) | |
100 | %doc ChangeLog README TODO.libvirt | |
101 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllmllibvirt.so | |
102 | ||
103 | %files devel | |
104 | %defattr(644,root,root,755) | |
105 | %doc libvirt/libvirt*.mli | |
13e02c60 JR |
106 | %dir %{_libdir}/ocaml/libvirt |
107 | %{_libdir}/ocaml/libvirt/META | |
108 | %{_libdir}/ocaml/libvirt/libvirt*.cmi | |
109 | %{_libdir}/ocaml/libvirt/libmllibvirt.a | |
110 | %{_libdir}/ocaml/libvirt/mllibvirt.cma | |
f9edcca0 | 111 | %if %{with ocaml_opt} |
13e02c60 JR |
112 | %{_libdir}/ocaml/libvirt/libvirt*.cmx |
113 | %{_libdir}/ocaml/libvirt/mllibvirt.a | |
114 | %{_libdir}/ocaml/libvirt/mllibvirt.cmxa | |
f9edcca0 | 115 | %endif |
3d5fbf5a | 116 | %{_examplesdir}/%{name}-%{version} |