File libmlx4-rdmav2.spec of Package libmlx4-rdmav2

#
# spec file for package libmlx4-rdmav2
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define tarball_suf -1.20.g6771d22

Name:           libmlx4-rdmav2
Summary:        Mellanox InfiniBand HCA Userspace Driver
License:        BSD-2-Clause or GPL-2.0
Group:          System/Libraries
Version:        1.0.5
Release:        0
Url:            http://www.openfabrics.org
Source:         http://www.openfabrics.org/downloads/libmlx4-%version.tar.gz
Source1:        connectx_port_config
Source2:        baselibs.conf
Patch0:         libmlx4-fix_type_punning.patch
Patch2:         libmlx4-resize_cq-Fix-possible-endless-loop-scanning-CQ.patch
Patch3:         libmlx4-Remove_compatibility_with_libibverbs-1.1.7.patch
Patch4:         libmlx4-Update_to_use_libiverbs_extension_support_verbs_regi.patch
Patch5:         libmlx4-Add_support_for_XRC-QPs.patch
Patch6:         libmlx4-Add-RoCE-IP-based-addressing-support-for-UD-QPs.patch
Patch7:         libmlx4-Add-ibv_query_port_ex-support.patch
Patch8:         libmlx4-Add-receive-flow-steering-support.patch
Patch9:         libmlx4-autoreconf_too_old.patch.xz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libibverbs-devel
BuildRequires:  libtool

Supplements:    modalias(pci:v000015B3d00001000sv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d00001001sv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d00001002sv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d00001003sv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d00001004sv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d00001005sv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d00001006sv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d00001007sv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d00001008sv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d00001009sv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d0000100Asv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d0000100Bsv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d0000100Csv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d0000100Dsv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d0000100Esv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d0000100Fsv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d00006340sv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d0000634Asv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d00006354sv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d00006368sv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d00006372sv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d00006732sv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d0000673Csv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d00006746sv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d00006750sv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d0000675Asv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d00006764sv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d0000676Esv*sd*bc*sc*i*)
Supplements:    modalias(pci:v000015B3d00006778sv*sd*bc*sc*i*)

%description
libmlx4 provides a device-specific userspace driver for Mellanox
ConnectX HCAs for use with the libibverbs library.

%prep
%setup -q -n libmlx4-%version
%patch0
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%if 0%suse_version < 1315
%patch9 -p1
%endif

%build
%if 0%suse_version >= 1315
autoreconf -fi
%endif
%configure --disable-static
make %{?_smp_mflags} V=1

%install
make DESTDIR=%{buildroot} install
rm -f %{buildroot}%{_libdir}/libmlx4.{la,so}
mkdir -p %{buildroot}%{_bindir}
install -m 755 %{S:1} %{buildroot}%{_bindir}

%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING README
%{_libdir}/libmlx4-rdmav2.so
%dir %_sysconfdir/libibverbs.d
%config %{_sysconfdir}/libibverbs.d/mlx4.driver
%{_bindir}/connectx_port_config

%changelog