[hivex] - conditionalize ocaml support

Dan Horák sharkcz at fedoraproject.org
Tue Sep 7 13:26:20 UTC 2010


commit f82d66f59df8bf0a5db0ef2fd7fae9592a274ed5
Author: Dan Horák <dan at danny.cz>
Date:   Tue Sep 7 15:26:23 2010 +0200

    - conditionalize ocaml support

 hivex.spec |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/hivex.spec b/hivex.spec
index 4e00f66..fb864cf 100644
--- a/hivex.spec
+++ b/hivex.spec
@@ -1,6 +1,13 @@
+# conditionalize Ocaml support
+%ifarch sparc64 s390 s390x
+%bcond_with ocaml
+%else
+%bcond_without ocaml
+%endif
+
 Name:           hivex
 Version:        1.2.3
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Read and write Windows Registry binary hive files
 
 Group:          Development/Libraries
@@ -16,8 +23,10 @@ BuildRequires:  perl-Test-Pod-Coverage
 BuildRequires:  perl-ExtUtils-MakeMaker
 BuildRequires:  perl-IO-stringy
 BuildRequires:  perl-libintl
+%if %{with ocaml}
 BuildRequires:  ocaml
 BuildRequires:  ocaml-findlib-devel
+%endif
 BuildRequires:  readline-devel
 BuildRequires:  libxml2-devel
 
@@ -76,6 +85,7 @@ Requires:       %{name} = %{version}-%{release}
 for %{name}.
 
 
+%if %{with ocaml}
 %package -n ocaml-%{name}
 Summary:       OCaml bindings for %{name}
 Group:         Development/Libraries
@@ -98,6 +108,7 @@ Requires:      ocaml-%{name} = %{version}-%{release}
 %description -n ocaml-%{name}-devel
 ocaml-%{name}-devel contains development libraries
 required to use the OCaml bindings for %{name}.
+%endif
 
 
 %package -n perl-%{name}
@@ -173,6 +184,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libhivex.a
 
 
+%if %{with ocaml}
 %files -n ocaml-%{name}
 %defattr(-,root,root,-)
 %doc README
@@ -191,6 +203,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/ocaml/hivex/*.cmxa
 %{_libdir}/ocaml/hivex/*.cmx
 %{_libdir}/ocaml/hivex/*.mli
+%endif
 
 
 %files -n perl-%{name}
@@ -201,6 +214,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Tue Sep  7 2010 Dan Horák <dan[at]danny.cz> - 1.2.3-2
+- conditionalize ocaml support
+
 * Fri Aug 27 2010 Richard W.M. Jones <rjones at redhat.com> - 1.2.3-1
 - New upstream version 1.2.3.
 


More information about the scm-commits mailing list