File ibutils.spec of Package ibutils

#
# spec file for package ibutils (Version 1.5.7)
#
# Copyright (c) 2010-2012 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 ibdm_major 1
%define extra_version -0.2.gbd7e502

Name:           ibutils
Summary:        OpenIB Mellanox InfiniBand Diagnostic Tools
Version:        1.5.7
Release:        1
License:        BSD-2-Clause or GPL-2.0
Group:          Productivity/Networking/Diagnostic
Source0:        http://www.openfarics.org/downloads/ibutils/%{name}-%{version}%{extra_version}.tar.gz
Source1:        ibutils-rpmlintrc
#PATCH-FIX-UPSTREAM Fix non-void functions returning no value
Patch1:         ibutils-1.2-retval.patch
#PATCH-FIX-UPSTREAM Extend the check to include tk 8.6
Patch2:         ibutils-tk-8.6.patch
#PATCH-FIX-UPSTREAM Prepare for autoreconf run
Patch4:         ibutils-autotools.patch
#PATCH-FIX-UPSTREAM Clean up code to reduce compiler warnings.
Patch5:         ibutils-code_cleanup.patch
Url:            http://www.openfabrics.org
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  gcc-c++ libibverbs-devel opensm-devel tk-devel graphviz-tcl
BuildRequires:  automake autoconf libtool gawk fdupes swig
Requires:       graphviz-tcl

%description
The ibutils package provides a set of diagnostic tools that check the health
of an InfiniBand fabric.

Package components:
ibis:     IB interface - A TCL shell that provides interface for sending various
          MADs on the IB fabric. This is the component that actually accesses
          the IB Hardware.

ibdm:     IB Data Model - A library that provides IB fabric analysis.

ibmgtsim: An IB fabric simulator. Useful for developing IB tools.

ibdiag:   This package provides 3 tools which provide the user interface
          to activate the above functionality:
            - ibdiagnet:  Performs various quality and health checks on the IB
                          fabric.
            - ibdiagpath: Performs various fabric quality and health checks on
                          the given links and nodes in a specific path.
            - ibdiagui:   A GUI wrapper for the above tools.


%package        devel
Group:          Development/Libraries/C and C++
Summary:        OpenIB Mellanox InfiniBand Diagnostic Tools
Requires:       %{name} = %{version}
Requires:       libibdm%{ibdm_major} = %{version}


%description    devel
ibutils provides IB network and path diagnostics.

%package        devel-static
Group:          Development/Libraries/C and C++
Summary:        OpenIB Mellanox InfiniBand Diagnostic Tools - static library
Requires:       %{name} = %{version} ibutils-devel = %{version}

%description devel-static
These are the static libraries for the OpenIB Mellanox InfiniBand Diagnostic
Tools.

%package     -n libibdm%{ibdm_major}
Group:          System/Libraries
Summary:        Shared libraries for ibutils

%description -n libibdm%{ibdm_major}
This package contains shared libraries for the IB utils.

%prep
%setup -q
%patch1
%patch2
%patch4
%patch5

%build
autoreconf -fi
./autogen.sh
export CFLAGS="%{optflags} -Wno-unused-but-set-variable"
export CXXFLAGS="%{optflags} -Wno-unused-but-set-variable"
%configure --with-graphviz-lib=%{_libdir}
#ibutil is missing some dependencies in its makefile so don't build in multiple jobs
#make %%{?_smp_mflags}
make 

%install
export NO_BRP_TCL_INDEX_CHECK=true
%makeinstall 
# It's empty, so just get rid of it
rm -f %{buildroot}%{_libdir}/libibdmcom.la
%fdupes -s %{buildroot}%{_libdir}

%post -n libibdm%{ibdm_major} -p /sbin/ldconfig
%postun -n libibdm%{ibdm_major} -p /sbin/ldconfig

%files
%defattr(-, root, root)
%doc COPYING
%_bindir/*
%_libdir/ibdiagnet%{version}
%_libdir/ibdiagpath%{version}
%_libdir/ibdiagui%{version}
%_libdir/ibdm%{version}
%_libdir/ibis%{version}
%_mandir/man1/*

%files -n libibdm%{ibdm_major}
%defattr(-, root, root)
%_libdir/libibdm.so.*
%_libdir/libibdmcom.so.*
%_libdir/libibsysapi.so.*

%files devel
%defattr(-, root, root)
%_includedir/ibdm
%_libdir/libibdm.so
%_libdir/libibdmcom.so
%_libdir/libibsysapi.so

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

%changelog
openSUSE Build Service is sponsored by