File libibverbs.spec of Package libibverbs

#
# spec file for package libibverbs (Version 1.1.4)
#
# Copyright (c) 2010-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/
#

Name:           libibverbs
Summary:        Infiniband verbs library
Version:        1.1.7
Release:        1
License:        GPL-2.0 or BSD-2-Clause
Group:          System/Libraries
Source0:        http://www.openfabrics.org/downloads/%{name}-%{version}.tar.gz
Source1:        ibdev2netdev
#
Patch1:         libibverbs-fix_aliasing.patch
Patch2:		libibverbs-1.1.4-fix-deleted-ntohl.patch
Source3:        libibverbs-s390.patch
Patch6:         libibverbs-Add-ibv_port_cap_flags.patch
Patch7:         libibverbs-Use-neighbour-lookup-for-RoCE-UD-QPs-Eth-L2-resoluti.patch
Patch8:         libibverbs-Add-ibv_query_port_ex-support.patch
Patch9:         libibverbs-Add-receive-flow-steering-support.patch
Patch10:        libibverbs-autotools.patch
#
BuildRequires:  automake autoconf libtool
BuildRequires:  pkg-config
BuildRequires:  libnl3-devel
URL:            http://www.openfabrics.org/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%define so_major 1
%define lname %{name}%{so_major}

%description
libibverbs is a library that allows userspace processes to use
InfiniBand "verbs" as described in the InfiniBand Architecture
Specification.	This includes direct hardware access for fast path
operations.

%package     -n %{lname}
Summary:        Infiniband verbs library
Group:          System/Libraries

%description -n %{lname}
libibverbs is a library that allows userspace processes to use
InfiniBand "verbs" as described in the InfiniBand Architecture
Specification.	This includes direct hardware access for fast path
operations.

This package contains the runtime library.

%package        runtime
Group:          Productivity/Networking/System
Summary:        Tools for the Infiniband Verbs library and manpages

%description    runtime
This package contains the Infiniband verbs tools and their man pages.

%package        devel
Group:          Development/Libraries/C and C++
Summary:        Development files for the libibverbs library
Requires:       %{name}-runtime = %{version}

%description    devel
Static libraries and header files for the Infiniband verbs library.

%package        devel-static
Group:          Development/Libraries/C and C++
Summary:        Static libibverbs library
Requires:       %{name}-devel = %{version} glibc-devel

%description    devel-static
This package contains the static variant of libibverbs.

%prep
%setup -q
%patch1
%patch2 -p1
#%%patch3 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10

%build
autoreconf -fi
%configure --disable-silent-rules
make %{?_smp_mflags}

%post -n %{lname} -p /sbin/ldconfig

%postun -n %{lname} -p /sbin/ldconfig

%install
make DESTDIR=%{buildroot} install
mkdir -p %{buildroot}/%_sysconfdir/libibverbs.d
install -m 755 %{S:1} %{buildroot}%{_bindir}

%files runtime
%defattr(-, root, root)
%doc COPYING
%_sysconfdir/libibverbs.d
%_bindir/*
%_mandir/man1/*

%files -n %{lname}
%defattr(-, root, root)
%_libdir/libibverbs.so.*

%files devel
%defattr(-,root,root)
%_includedir/infiniband
%_libdir/libibverbs.so
%_mandir/man3/*

%files devel-static
%defattr(-,root,root)
%_libdir/libibverbs.a
%_libdir/libibverbs.la

%changelog
openSUSE Build Service is sponsored by