File opensm.spec of Package opensm

#
# spec file for package opensm (Version 3.2.2)
#
# 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:           opensm
Summary:        Infiniband Subnet Manager
Version:        3.2.2
Release:        5
License:        BSD 3-Clause; GPL v2 or later
Group:          System/Libraries
Source0:        %{name}-%{version}.tar.bz2
Source1:        conf.sysconfig
Source2:        sldd.sh
Source3:        opensmd
# Patch0:         opensm-automake_foreign.patch
# Patch1:         opensm-configure.patch
# Patch2:         opensm-no_srcdir_in_rpath.patch
Url:            http://www.openfabrics.org
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  bison flex gcc-c++ libibumad-devel libibverbs-devel
ExcludeArch:    s390 s390x
PreReq:         %fillup_prereq

%description
OpenSM provides an implementation for an InfiniBand Subnet Manager and
Administration. Such a software entity is required to run for in order
to initialize the InfiniBand hardware (at least one per each InfiniBand
subnet).



Authors:
--------
    Steve King
    Anil Keshavamurthy
    Eitan Zahavi <eitan@mellanox.co.il>
    Yael Kalka <yael@mellanox.co.il>
    Shahar Frank
    HalRosenstock <halr@voltaire.com>
    Sasha Khapyorsky <sashak@voltaire.com>

%package devel
License:        BSD 3-Clause; GPL v2 or later
Group:          Development/Libraries/Other
Summary:        Development files for OpenSM
Requires:       %{name} = %{version} libibumad-devel

%description devel
Static libraries and header files for OpenSM.



Authors:
--------
    Steve King
    Anil Keshavamurthy
    Eitan Zahavi <eitan@mellanox.co.il>
    Yael Kalka <yael@mellanox.co.il>
    Shahar Frank
    HalRosenstock <halr@voltaire.com>
    Sasha Khapyorsky <sashak@voltaire.com>

%prep
%setup -q
# %patch0
# %patch1
# %patch2
cp %{S:1} %{S:2} %{S:3} .

%build
./autogen.sh
export CFLAGS="%optflags"
%configure
make

%install
export NO_BRP_STALE_LINK_ERROR=yes
make DESTDIR=$RPM_BUILD_ROOT install
# get rid of the included init script because we bring our own one
rm $RPM_BUILD_ROOT%_sysconfdir/init.d/opensmd
install -m 755 opensmd $RPM_BUILD_ROOT%_sysconfdir/init.d/
install -D sldd.sh $RPM_BUILD_ROOT/%_bindir/sldd.sh
# install the sysconfig configuration file
install -m 700 -D conf.sysconfig ${RPM_BUILD_ROOT}/var/adm/fillup-templates/sysconfig.%name
# and make a compat link
ln -s %_sysconfdir/sysconfig/opensm ${RPM_BUILD_ROOT}/%_sysconfdir/opensm.conf
sed -i -e 's$-L/usr/src/packages/BUILD/%{name}-%{version}/complib$$g' %{buildroot}%{_libdir}/libosmvendor.la

%clean
rm -rf ${RPM_BUILD_ROOT}

%post
%{fillup_only}
/sbin/ldconfig

%preun
%stop_on_removal opensmd

%postun
/sbin/ldconfig
%restart_on_update opensmd
%insserv_cleanup

%files
%defattr(-, root, root)
%_sysconfdir/opensm.conf
%_sysconfdir/init.d/opensmd
%_bindir/*
%_sbindir/*
%_libdir/libopensm.so.*
%_libdir/libosmcomp.so.*
%_libdir/libosmvendor.so.*
%_mandir/man8/opensm.8.gz
%_mandir/man8/osmtest.8.gz
/var/adm/fillup-templates/sysconfig.%name

%files devel
%defattr(-,root,root)
%_includedir/infiniband/complib/
%_includedir/infiniband/iba/
%_includedir/infiniband/opensm/
%_includedir/infiniband/vendor/
%_libdir/libopensm.a
%_libdir/libopensm.la
%_libdir/libopensm.so
%_libdir/libosmcomp.a
%_libdir/libosmcomp.la
%_libdir/libosmcomp.so
%_libdir/libosmvendor.a
%_libdir/libosmvendor.la
%_libdir/libosmvendor.so

%changelog
* Thu Nov 06 2008 ihno@suse.de
- Adding baselibs.conf
- Adding ExcludeArch s390 s390x
* Fri Oct 24 2008 jjolly@suse.de
- Updated to version from the OFED 1.4 RC3
* Thu Sep 11 2008 jjolly@suse.de
- Update to 3.2.2 from the OFED 1.4 RC1
* Tue Mar 04 2008 jjolly@suse.de
- Update to 3.1.10 from the OFED 1.3 GA release
- Added bison and flex to the BuildRequires list
* Wed Feb 13 2008 pth@suse.de
- Remove references to $srcdir from RPATH.
- Add Short-Description to opensm init script
- Add AM_PROG_CC_C_O to configure
- Run autoreconf
- Pass [foreign] to AM_INIT_AUTOMAKE
- Update to 3.1.8:
  Number of changes far too long, see NEWS for a detailed list
* Tue Oct 02 2007 dbahi@suse.de
- Added %%preun to stop opensmd
* Mon Aug 20 2007 hvogel@suse.de
- Update to version from OFED 1.2.5
- readd the init scripts from OFED instead of the default opensm
  one
* Tue Aug 07 2007 hvogel@suse.de
- Update to version from OFED 1.2c
* Thu Jul 12 2007 hvogel@suse.de
- Install a missing script
- Install configuration as sysconfig file
- Include init script
* Wed Jul 04 2007 hvogel@suse.de
- Add GPL COPYING file [#289225]
* Tue Jul 03 2007 hvogel@suse.de
- Use 3.0.3 which is the correct version included in
  OFED 1.2
* Wed Jun 20 2007 hvogel@suse.de
- Initial Package, Version 2.2.0
openSUSE Build Service is sponsored by