File libipathverbs.spec of Package libipathverbs

#
# spec file for package libipathverbs
#
# Copyright (c) 2015 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 dracutlibdir %{_libexecdir}/dracut

Name:           libipathverbs
Summary:        PathScale InfiniPath HCA Userspace Driver
Version:        1.3
Release:        0
License:        GPL-2.0 or BSD-2-Clause
Group:          Productivity/Networking/System
Source0:        https://www.openfabrics.org/downloads/libipathverbs/%{name}-%{version}.tar.gz
Source1:        GPLv2.txt
Patch0:         libipathverbs-configure.patch
Patch1:         libipthverbs-no_libversion.patch
Url:            http://www.openfabrics.org
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  libibverbs-devel
BuildRequires:  automake autoconf libtool
BuildRequires:  dracut
Requires(pre):  dracut
Requires(post): dracut

%define lname	libipathverbs-rdmav2

%description
libipathverbs provides a device-specific userspace driver for PathScale
HCAs.

%package     -n %lname
Summary:	PathScale InfiniPath HCA Userspace Driver
Group:		System/Libraries
# Added after openSUSE 12.2:
Obsoletes:	libipathverbs < %version-%release
Provides:	libipathverbs = %version-%release

%description -n %lname
libipathverbs provides a device-specific userspace driver for PathScale
HCAs.

%prep
%setup -q
mv COPYING LICENSES
cp %{S:1} COPYING
%patch0 -p1
%patch1
mv configure.in configure.ac

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

%install
make DESTDIR=%{buildroot} install
rm -f %{buildroot}%{_libdir}/*.la
rm -f %{buildroot}%{_libdir}/%name.so

%files -n %lname
%defattr(-, root, root)
%doc COPYING LICENSES AUTHORS README
%dir %_sysconfdir/libibverbs.d
%config %_sysconfdir/libibverbs.d/*
%_libdir/libipathverbs-rdmav2.so
%config %{_sysconfdir}/modprobe.d/truescale.conf
%{_sbindir}/truescale-serdes.cmds
%define dracutdir %(rpm -ql dracut | grep dracut-functions$ | sed 's/dracut-functions//')
%{dracutdir}modules.d/90qib/install
%{dracutdir}modules.d/90qib/check
%{dracutdir}modules.d/90qib/installkernel
%{dracutdir}modules.d/90qib

%changelog
openSUSE Build Service is sponsored by