- 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
This commit is contained in:
Olaf Hering 2012-11-13 14:45:14 +00:00 committed by Git OBS Bridge
parent 3daa88d84a
commit 7c41a63ed4
2 changed files with 21 additions and 5 deletions

View File

@ -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

View File

@ -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