Richard W.M. Jones 2023-07-11 11:36:26 +01:00
parent efb2cea238
commit 02b1f5d39d

View File

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