]> git.pld-linux.org Git - packages/ocaml-libvirt.git/blob - ocaml-libvirt.spec
- typo
[packages/ocaml-libvirt.git] / ocaml-libvirt.spec
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
6 %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
7 %undefine       with_ocaml_opt
8 %endif
9
10 Summary:        libvirt binding for OCaml
11 Summary(pl.UTF-8):      Wiązania libvirt dla OCamla
12 Name:           ocaml-libvirt
13 Version:        0.6.1.5
14 Release:        4
15 License:        LGPL v2+
16 Group:          Libraries
17 Source0:        https://libvirt.org/sources/ocaml/%{name}-%{version}.tar.gz
18 # Source0-md5:  4b5ec3b6eb93ca18e02433f04806f0ed
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
23 URL:            https://libvirt.org/ocaml/
24 BuildRequires:  libvirt-devel >= 1.2.8
25 BuildRequires:  ocaml >= 3.04-7
26 BuildRequires:  ocaml-findlib
27 BuildRequires:  perl-base
28 BuildRequires:  pkgconfig
29 Requires:       libvirt >= 1.2.8
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 - część 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
70 %patch0 -p1
71 %patch1 -p1
72 %patch2 -p1
73 %patch3 -p1
74
75 %build
76 %configure
77
78 # parallel build triggers makefile races
79 %{__make} -j1 all %{?with_ocaml_opt:opt} \
80         CC="%{__cc}"
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
85
86 %{__make} install%{?with_ocaml_opt:-opt}%{!?with_ocaml_opt:-byte} \
87         OCAMLFIND_INSTFLAGS="-destdir $RPM_BUILD_ROOT%{_libdir}/ocaml"
88
89 # packaged as %doc
90 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/libvirt/*.mli
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
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
111 %if %{with ocaml_opt}
112 %{_libdir}/ocaml/libvirt/libvirt*.cmx
113 %{_libdir}/ocaml/libvirt/mllibvirt.a
114 %{_libdir}/ocaml/libvirt/mllibvirt.cmxa
115 %endif
116 %{_examplesdir}/%{name}-%{version}
This page took 0.114163 seconds and 3 git commands to generate.