File dapl.spec of Package dapl

#
# spec file for package dapl (Version 2.0.14)
#
# Copyright (c) 2008 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/
#

# norootforbuild


Name:           dapl
ExcludeArch:    s390 s390x
Summary:        A Library for userspace access to RDMA devices using OS Agnostic DAT APIs
Version:        2.0.14
Release:        5
License:        BSD 3-Clause; GPL v2 or later; GPLv2 or later, CPLv1.0, BSD 3 Clause
Group:          System/Libraries
# bug437293
%ifarch ppc64
Obsoletes:      dapl-64bit
%endif
%ifarch  ppc
Obsoletes:      dapl-32bit
%endif
#
Source0:        %{name}-%{version}.tar.bz2
Patch0:         dapl-2.0.13-build_error.patch
Patch1:         dapl-ia64_buildfix.patch
Url:            http://www.openfabrics.org
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  libibverbs-devel librdmacm-devel

%description
Along with the OpenFabrics kernel drivers, libdat and libdapl provides
a userspace RDMA API that supports DAT 2.0 specification and IB
transport extensions for atomic operations and rdma write with
immediate data.



Authors:
--------
    Caitlin Bestler
    Philip Christopher
    Jay Danielsen
    Arlin Davis
    Tom Duffy
    Matthew Finlay
    Jimmy Hill
    James Lentini
    Gil Rubin
    Steve Sears
    Randy Smith
    Stan Smith
    Anthony Topper
    Steve Wise

%package devel
License:        BSD 3-Clause; GPL v2 or later; GPLv2 or later, CPLv1.0, BSD 3 Clause
Group:          Development/Libraries/Other
Summary:        Development files for the libdat and libdapl libraries
Requires:       %{name} = %{version} glibc-devel

%description devel
Static libraries and header files for the libdat and libdapl library.



Authors:
--------
    Caitlin Bestler
    Philip Christopher
    Jay Danielsen
    Arlin Davis
    Tom Duffy
    Matthew Finlay
    Jimmy Hill
    James Lentini
    Gil Rubin
    Steve Sears
    Randy Smith
    Stan Smith
    Anthony Topper
    Steve Wise

%prep
%setup -q -n dapl-%{version}
%patch0
%patch1

%build
%configure --disable-static --with-pic
%{__make} %{?jobs:-j%jobs}

%check
export MALLOC_CHECK_=2
%{__make} check
unset MALLOC_CHECK_

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

%clean
rm -rf ${RPM_BUILD_ROOT}

%post
/sbin/ldconfig
if test -e %_sysconfdir/dat.conf; then
	sed -e '/ofa-v2-.* u2/d' < %_sysconfdir/dat.conf > /tmp/$$$$ofadapl;
	cp /tmp/$$$$ofadapl %_sysconfdir/dat.conf;
else touch %_sysconfdir/dat.conf;
fi;
echo ofa-v2-ib0 u2.0 nonthreadsafe default libdaplofa.so.2 dapl.2.0 '"ib0 0" ""' >> %_sysconfdir/dat.conf;
echo ofa-v2-ib1 u2.0 nonthreadsafe default libdaplofa.so.2 dapl.2.0 '"ib1 0" ""' >> %_sysconfdir/dat.conf;
echo ofa-v2-mthca0-1 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"mthca0 1" ""' >> %_sysconfdir/dat.conf;
echo ofa-v2-mthca0-2 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"mthca0 2" ""' >> %_sysconfdir/dat.conf;
echo ofa-v2-mlx4_0-1 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"mlx4_0 1" ""' >> %_sysconfdir/dat.conf;
echo ofa-v2-mlx4_0-2 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"mlx4_0 2" ""' >> %_sysconfdir/dat.conf;
echo ofa-v2-ipath0-1 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"ipath0 1" ""' >> %_sysconfdir/dat.conf;
echo ofa-v2-ipath0-2 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"ipath0 2" ""' >> %_sysconfdir/dat.conf;
echo ofa-v2-ehca0-2 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"ehca0 1" ""' >> %_sysconfdir/dat.conf;
echo ofa-v2-iwarp u2.0 nonthreadsafe default libdaplofa.so.2 dapl.2.0 '"eth2 0" ""' >> %_sysconfdir/dat.conf;

%postun
/sbin/ldconfig
if test -e %_sysconfdir/dat.conf; then
	sed -e '/ofa-v2-.* u2/d' < %_sysconfdir/dat.conf > /tmp/$$$$ofadapl;
	cp /tmp/$$$$ofadapl %_sysconfdir/dat.conf;
fi;

%files
%defattr(-, root, root)
# %config(noreplace) %_sysconfdir/dat.conf
%_bindir/*
%_libdir/libd*.so.*
%_mandir/man1/*
%_mandir/man5/*

%files devel
%defattr(-, root, root)
%_includedir/dat2/
%_libdir/*.so

%changelog
* Tue Dec 09 2008 ro@suse.de
- remove ix86 from ifarch statement obsoleting 32bit package
* Thu Nov 06 2008 ihno@suse.de
- adding baselibs.conf
* Tue Nov 04 2008 ro@suse.de
- fix build on ia64 (same as in compat-dapl)
* Thu Oct 30 2008 olh@suse.de
- obsolete old -XXbit packages (bnc#437293)
* Mon Oct 27 2008 jjolly@suse.de
- Updated to v2.0.14 from OFED 1.4 rc3
* Mon Oct 20 2008 ihno@suse.de
- Excludearch for s390 s390x
* Fri Sep 12 2008 jjolly@suse.de
- Updated to v2.0.13 from OFED 1.4 RC1 and changed from dapl2 to dapl
* Mon Apr 28 2008 crrodriguez@suse.de
- do not build unusable static libraries
- fix -devel package requires
* Mon Mar 03 2008 jjolly@suse.de
- Initial submission of dapl v2.0.7 from OFED 1.3 GA release
openSUSE Build Service is sponsored by