From 7c41a63ed4760bd2322f81ecb9d1a37ed2561e6100b4d84dd5765c14149b6634 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Tue, 13 Nov 2012 14:45:14 +0000 Subject: [PATCH] - split BuildRequires ocaml into ocaml_tools and ocaml_bindings - disable ocaml_bindings when building for SLES11 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=147 --- libguestfs.changes | 6 ++++++ libguestfs.spec | 20 +++++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/libguestfs.changes b/libguestfs.changes index 8c8d7e2..553b5f7 100644 --- a/libguestfs.changes +++ b/libguestfs.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Nov 13 15:42:54 CET 2012 - ohering@suse.de + +- split BuildRequires ocaml into ocaml_tools and ocaml_bindings +- disable ocaml_bindings when building for SLES11 + ------------------------------------------------------------------- Tue Nov 13 15:25:29 CET 2012 - ohering@suse.de diff --git a/libguestfs.spec b/libguestfs.spec index e5167d7..a198e9c 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -17,7 +17,8 @@ # -%define with_ocaml 1 +%define with_ocaml_tools 1 +%define with_ocaml_bindings 1 %define with_python 1 %define with_perl 1 %define with_ruby 1 @@ -29,6 +30,7 @@ %if "%_project" == "Virtualization" # leave features enabled in OBS main repo %else +%define with_ocaml_bindings 0 %define with_ruby 0 %define with_hivex 0 %define with_zerofree 0 @@ -66,10 +68,20 @@ BuildRequires: readline-devel # perl as included in openSuSE 12.1 includes 3.16, so require at least this version BuildRequires: perl(Pod::Simple::XHTML) >= 3.16 # +%if %{with_ocaml_bindings} +%define with_ocaml_tools 1 +%endif +%if %{with_ocaml_tools} +# Required to build tools, its independent from bindings +BuildRequires: ocaml +BuildRequires: ocaml-findlib +%endif +# %if %{with_fuse} BuildRequires: fuse-devel %define _configure_fuse --enable-fuse %endif +# %if %{with_hivex} BuildRequires: hivex-devel %endif @@ -177,12 +189,10 @@ guestfish, or use virt-rescue to get a rescue shell for fixing unbootable virtual machines. # -%if %{with_ocaml} +%if %{with_ocaml_bindings} %package -n ocaml-libguestfs Summary: Provides OCaml support for libguestfs Group: System/Filesystems -BuildRequires: ocaml -BuildRequires: ocaml-findlib %define _configure_ocaml --enable-ocaml # @@ -586,7 +596,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %{_libdir}/guestfs -%if %{with_ocaml} +%if %{with_ocaml_bindings} %files -n ocaml-libguestfs %defattr(-,root,root) %dir %{_libdir}/ocaml