File libibmad.spec of Package libibmad

#
# spec file for package libibmad (Version 1.3.6)
#
# Copyright (c) 2009-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 mad_so 5

Name:           libibmad
Summary:        Low layer Infiniband diagnostic and management programs
Version:        1.3.11
Release:        0
License:        GPL-2.0 or BSD-2-Clause
Group:          Productivity/Networking/System
Source0:        libibmad-%{version}.tar.gz
Url:            http://www.openfabrics.org
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  automake autoconf libtool

%description
Libibmad provides low layer IB functions for use by the IB diagnostic
and management programs. These include MAD, SA, SMP, and other basic IB
functions

%package -n     %{name}%{mad_so}
Summary:        Libibamd runtime library
Group:          System/Libraries
BuildRequires:  libibumad-devel

%description -n %{name}%{mad_so}
Libibmad provides low layer IB functions for use by the IB diagnostic
and management programs. These include MAD, SA, SMP, and other basic IB
functions. This package contains the runtime library.

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

%description    devel
Development files for the libibmad library.

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

%description    devel-static
This package contains the static libibmad library.

%prep
%setup -q
./autogen.sh

%build
%configure
make %{?_smp_mflags}

%install
%makeinstall

%post -n %{name}%{mad_so} -p /sbin/ldconfig

%postun -n %{name}%{mad_so} -p /sbin/ldconfig

%files -n %{name}%{mad_so}
%defattr(-, root, root)
%doc COPYING
%_libdir/libibmad.so.%{mad_so}*

%files devel
%defattr(-,root,root)
%_includedir/infiniband/mad.h
%_includedir/infiniband/mad_osd.h
%_libdir/libibmad.so

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

%changelog