[packages/libnbd] - add ocaml bcond
baggins
baggins at pld-linux.org
Thu Mar 11 23:20:09 CET 2021
commit 9fb82411b4dace041614e52526594cf0ff4ba01f
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Thu Mar 11 23:19:54 2021 +0100
- add ocaml bcond
libnbd.spec | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/libnbd.spec b/libnbd.spec
index 75aa24d..7941c31 100644
--- a/libnbd.spec
+++ b/libnbd.spec
@@ -1,6 +1,7 @@
# TODO: golang
#
# Conditional build:
+%bcond_without ocaml # Ocaml bindings
%bcond_without ocaml_opt # native optimized binaries
# not yet available on x32 (ocaml 4.02.1), update when upstream will support it
@@ -25,9 +26,11 @@ BuildRequires: jq
BuildRequires: libfuse-devel
BuildRequires: libstdc++-devel
BuildRequires: libxml2-devel >= 2.0
+%if %{with ocaml}
BuildRequires: ocaml
BuildRequires: ocaml-findlib
BuildRequires: ocaml-ocamldoc
+%endif
BuildRequires: perl-tools-pod
BuildRequires: pkgconfig
BuildRequires: python3-devel >= 1:3.2
@@ -159,7 +162,7 @@ parametrów dla narzędzi NBD (nbdcopy, nbdfuse, nbdinfo, nbdsh).
PYTHON=%{__python3} \
--enable-fuse \
--disable-golang \
- --enable-ocaml \
+ %{__enable_disable ocaml} \
--enable-python \
--disable-static \
--with-python-installdir=%{py3_sitedir} \
@@ -211,6 +214,7 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man3/libnbd-security.3*
%{_mandir}/man3/nbd_*.3*
+%if %{with ocaml}
%files -n ocaml-%{name}
%defattr(644,root,root,755)
%dir %{_libdir}/ocaml/nbd
@@ -232,6 +236,7 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man3/libnbd-ocaml.3*
%{_mandir}/man3/NBD.3*
%{_mandir}/man3/NBD.*.3*
+%endif
%files -n python3-%{name}
%defattr(644,root,root,755)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libnbd.git/commitdiff/9fb82411b4dace041614e52526594cf0ff4ba01f
More information about the pld-cvs-commit
mailing list