diff --git a/libnbd.spec b/libnbd.spec index e0d7a22..2263681 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -55,10 +55,12 @@ BuildRequires: ubdsrv-devel >= 1.0-3.rc6 # For the Python 3 bindings. BuildRequires: python3-devel +%ifnarch %{ix86} # For the OCaml bindings. BuildRequires: ocaml BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-ocamldoc +%endif # Only for building the examples. BuildRequires: glib2-devel @@ -93,8 +95,10 @@ BuildRequires: nbdkit-sh-plugin BuildRequires: nbdkit-sparse-random-plugin %endif +%ifnarch %{ix86} # The OCaml runtime system does not provide this symbol %global __ocaml_requires_opts -x Stdlib__Callback +%endif %description @@ -127,6 +131,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release} This package contains development headers for %{name}. +%ifnarch %{ix86} %package -n ocaml-%{name} Summary: OCaml language bindings for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} @@ -145,6 +150,7 @@ Requires: ocaml-%{name}%{?_isa} = %{version}-%{release} This package contains OCaml language development package for %{name}. Install this if you want to compile OCaml software which uses %{name}. +%endif %package -n python3-%{name} @@ -215,7 +221,11 @@ autoreconf -i --with-tls-priority=@LIBNBD,SYSTEM \ PYTHON=%{__python3} \ --enable-python \ +%ifnarch %{ix86} --enable-ocaml \ +%else + --disable-ocaml \ +%endif --enable-fuse \ --disable-golang @@ -303,6 +313,7 @@ make %{?_smp_mflags} check || { %{_mandir}/man3/nbd_*.3* +%ifnarch %{ix86} %files -n ocaml-%{name} %dir %{_libdir}/ocaml/nbd %{_libdir}/ocaml/nbd/META @@ -324,6 +335,7 @@ make %{?_smp_mflags} check || { %{_mandir}/man3/libnbd-ocaml.3* %{_mandir}/man3/NBD.3* %{_mandir}/man3/NBD.*.3* +%endif %files -n python3-%{name}