2
# Copyright (c) 2006 Mellanox Technologies. All rights reserved.
4
# This Software is licensed under one of the following licenses:
6
# 1) under the terms of the "Common Public License 1.0" a copy of which is
7
# available from the Open Source Initiative, see
8
# http://www.opensource.org/licenses/cpl.php.
10
# 2) under the terms of the "The BSD License" a copy of which is
11
# available from the Open Source Initiative, see
12
# http://www.opensource.org/licenses/bsd-license.php.
14
# 3) under the terms of the "GNU General Public License (GPL) Version 2" a
15
# copy of which is available from the Open Source Initiative, see
16
# http://www.opensource.org/licenses/gpl-license.php.
18
# Licensee has the right to choose one of the above licenses.
20
# Redistributions of source code must retain the above copyright
21
# notice and one of the license notices.
23
# Redistributions in binary form must reproduce both the above copyright
24
# notice, one of the license notices in the documentation
25
# and/or other materials provided with the distribution.
28
%{?build_ibmgtsim: %define ibmgtsim --enable-ibmgtsim}
30
Summary: OpenIB Mellanox InfiniBand Diagnostic Tools
35
Url: http://openib.org/downloads/%{name}-%{version}.tar.gz
36
Group: System Environment/Libraries
37
Source: %{name}-%{version}.tar.gz
38
BuildRoot: %{?build_root:%{build_root}}%{!?build_root:%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)}
40
Vendor: Mellanox Technologies Ltd.
42
ibutils provides IB network and path diagnostics.
46
%setup -n %{name}-%{version}
49
%configure %{?configure_options} %{?ibmgtsim}
53
rm -rf $RPM_BUILD_ROOT
54
%{__make} install DESTDIR=$RPM_BUILD_ROOT %{?mflags_install}
55
/bin/rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
56
/bin/rm -f $RPM_BUILD_ROOT/%{_prefix}/bin/git_version.tcl
58
install -d $RPM_BUILD_ROOT/etc/profile.d
59
cat > $RPM_BUILD_ROOT/etc/profile.d/ibutils.sh << EOF
60
if ! echo \${PATH} | grep -q %{_prefix}/bin ; then
61
PATH=\${PATH}:%{_prefix}/bin
64
cat > $RPM_BUILD_ROOT/etc/profile.d/ibutils.csh << EOF
65
if ( "\${path}" !~ *%{_prefix}/bin* ) then
66
set path = ( \$path %{_prefix}/bin )
75
install -d $RPM_BUILD_ROOT/etc/ld.so.conf.d
76
echo "%{_libdir}" >> $RPM_BUILD_ROOT/etc/ld.so.conf.d/ibutils.conf
77
echo "/etc/ld.so.conf.d/ibutils.conf" >> ibutils-files
83
#Remove installed driver after rpm build finished
84
rm -rf $RPM_BUILD_DIR/%{name}-%{version}
85
rm -rf $RPM_BUILD_ROOT
93
%files -f ibutils-files
97
%{_prefix}/bin/ibtopodiff
98
%{_prefix}/bin/ibnlparse
100
%{_prefix}/bin/ibdmchk
101
%{_prefix}/bin/ibdiagui
102
%{_prefix}/bin/ibdiagnet
103
%{_prefix}/bin/ibdiagpath
104
%{_libdir}/libibdmcom.so*
105
%{_libdir}/libibdmcom.a
106
%{_libdir}/libibdm.so*
110
%{_libdir}/ibdiagnet1.2
111
%{_libdir}/ibdiagpath1.2
112
%{_libdir}/ibdiagui1.2
113
%{_prefix}/include/ibdm
114
%{_mandir}/man1/ibdiagnet.1*
115
%{_mandir}/man1/ibdiagpath.1*
116
%{_mandir}/man1/ibdiagui.1*
117
%{_mandir}/man1/ibis.1*
118
%{_mandir}/man1/ibtopodiff.1*
119
%{_mandir}/man1/ibdmtr.1*
120
%{_mandir}/man1/ibdmsh.1*
121
%{_mandir}/man1/ibdmchk.1*
122
%{_mandir}/man1/ibdm-topo-file.1*
123
%{_mandir}/man1/ibdm-ibnl-file.1*
124
/etc/profile.d/ibutils.sh
125
/etc/profile.d/ibutils.csh
126
%{_prefix}/bin/mkSimNodeDir
127
%{_prefix}/bin/ibmssh
128
%{_prefix}/bin/ibmsquit
129
%{_prefix}/bin/RunSimTest
130
%{_prefix}/bin/IBMgtSim
131
%{_libdir}/libibmscli.so*
132
%{_libdir}/libibmscli.a
133
%{_prefix}/include/ibmgtsim
134
%{_prefix}/share/ibmgtsim
135
%{_mandir}/man1/ibmssh.1*
136
%{_mandir}/man1/ibmsquit.1*
137
%{_mandir}/man1/mkSimNodeDir.1*
138
%{_mandir}/man1/RunSimTest.1*
139
%{_mandir}/man1/IBMgtSim.1*
143
* Tue Aug 21 2006 Vladimir Sokolovsky <vlad@mellanox.co.il>
144
- Added ibmgtsim to the rpm
145
* Sun Jul 30 2006 Vladimir Sokolovsky <vlad@mellanox.co.il>
146
- Added man pages and share/ibmgtsim
147
* Tue May 16 2006 Vladimir Sokolovsky <vlad@mellanox.co.il>
148
- Added ibutils sh, csh and conf to update environment
149
* Sun Apr 2 2006 Vladimir Sokolovsky <vlad@mellanox.co.il>
150
- Initial packaging for openib gen2 stack