File libibumad.spec of Package libibumad

#
# spec file for package libibumad
#
# Copyright (c) 2016 SUSE LINUX 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 umad_so 3
%define git_id -gitecda3a5

Name:           libibumad
Summary:        User MAD library functions for Infiniband diagnostic and management tools
License:        GPL-2.0 or BSD-2-Clause
Group:          Productivity/Networking/System
Version:        1.3.10.2
Release:        0
Source0:        %{name}-%{version}%{git_id}.tar.xz
Source1:        baselibs.conf
Url:            http://www.openfabrics.org
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  gcc-c++
BuildRequires:  libtool

%description
libibumad provides the user MAD library functions which sit on top of
the user MAD modules in the kernel. These are used by the IB diagnostic
and management tools, including OpenSM

%package     -n %{name}%{umad_so}
Summary:        Runtime User MAD library
License:        GPL-2.0 or BSD-2-Clause
Group:          System/Libraries
Url:            http://www.openfabrics.org
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description -n %{name}%{umad_so}
This package contains the User MAD runtime library.

%package        devel
Summary:        Development files for the libibumad library
License:        GPL-2.0 or BSD-2-Clause
Group:          Development/Libraries/C and C++
Requires:       %{name}%{umad_so} = %{version}

%description    devel
Development files for the libibumad library.

%package        devel-static
Summary:        The static libibumad library
License:        BSD-3-Clause
Group:          Development/Libraries/C and C++
Requires:       libibumad-devel = %{version}

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


%prep
%setup -q
./autogen.sh

%build
%configure --enable-static
make %{?_smp_mflags}

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

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

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

%files -n %{name}%{umad_so}
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog
%_libdir/libibumad.so.*
%_mandir/man3/*

%files devel
%defattr(-,root,root)
%dir %_includedir/infiniband
%_includedir/infiniband/*.h
%_libdir/libibumad.so

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

%changelog
openSUSE Build Service is sponsored by