add a MOFED / OPA modules dependency to produce a right
package.
Test-parameters: trivial
Cray-bug-id: LUS-6033, LUS-7204
Change-Id: I843762945c5dbb59d53e1913b7382813bfba86ad
Signed-off-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-on: https://review.whamcloud.com/36426
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Alexander Boyko <c17825@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
%bcond_without shared
%bcond_without static
%bcond_with systemd
%bcond_without shared
%bcond_without static
%bcond_with systemd
# By default both gss and gss keyring are disabled.
# gss keyring requires the gss core. If the builder
# By default both gss and gss keyring are disabled.
# gss keyring requires the gss core. If the builder
Requires: libselinux
%endif
%if %{with lustre_modules}
Requires: libselinux
%endif
%if %{with lustre_modules}
+%if %{with mofed}
+BuildRequires: mlnx-ofa_kernel-devel
+%if %{_vendor} == "redhat"
+Requires: kmod-mlnx-ofa_kernel
+%else
+Requires: mlnx-ofa_kernel-kmp
+%endif
+%endif
%if 0%{?rhel} >= 8 && %{undefined kernel_module_package_buildreqs}
BuildRequires: redhat-rpm-config kernel-rpm-macros elfutils-libelf-devel kmod
%else
%if 0%{?rhel} >= 8 && %{undefined kernel_module_package_buildreqs}
BuildRequires: redhat-rpm-config kernel-rpm-macros elfutils-libelf-devel kmod
%else
%{!?with_manpages:--disable-manpages} \
%{!?with_systemd:--with-systemdsystemunitdir=no} \
%{?with_systemd:--with-systemdsystemunitdir=%{_unitdir}} \
%{!?with_manpages:--disable-manpages} \
%{!?with_systemd:--with-systemdsystemunitdir=no} \
%{?with_systemd:--with-systemdsystemunitdir=%{_unitdir}} \
+ %{?with_mofed:--with-o2ib=/usr/src/ofa_kernel/default} \
--with-linux=%{kdir} \
--with-linux-obj=%{kobjdir} \
--with-kmp-moddir=%{kmoddir}/%{name}
--with-linux=%{kdir} \
--with-linux-obj=%{kobjdir} \
--with-kmp-moddir=%{kmoddir}/%{name}