File: ibutils.spec.in

package info (click to toggle)
ibutils 1.5.7+0.2.gbd7e502-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 38,728 kB
  • sloc: cpp: 159,552; ansic: 74,818; tcl: 13,816; sh: 13,204; makefile: 431; yacc: 333; lex: 169; awk: 53; perl: 49
file content (166 lines) | stat: -rw-r--r-- 5,000 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#--
# Copyright (c) 2004-2010 Mellanox Technologies LTD. All rights reserved.
#
# This software is available to you under a choice of one of two
# licenses.  You may choose to be licensed under the terms of the GNU
# General Public License (GPL) Version 2, available from the file
# COPYING in the main directory of this source tree, or the
# OpenIB.org BSD license below:
#
#     Redistribution and use in source and binary forms, with or
#     without modification, are permitted provided that the following
#     conditions are met:
#
#      - Redistributions of source code must retain the above
#        copyright notice, this list of conditions and the following
#        disclaimer.
#
#      - Redistributions in binary form must reproduce the above
#        copyright notice, this list of conditions and the following
#        disclaimer in the documentation and/or other materials
#        provided with the distribution.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#--

%{!?build_ibmgtsim: %define build_ibmgtsim 0}
%{?build_ibmgtsim: %define ibmgtsim --enable-ibmgtsim}

Summary: OpenIB Mellanox InfiniBand Diagnostic Tools
Name: ibutils
Version: @VERSION@
Release: 1%{?dist}
License: GPL/BSD
Url: http://openfabrics.org/downloads/%{name}-%{version}.tar.gz
Group: System Environment/Libraries
Source: %{name}-%{version}.tar.gz
BuildRoot: %{?build_root:%{build_root}}%{!?build_root:%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)}
Requires: opensm-libs, libibumad, tk
BuildRequires: opensm-devel, libibumad-devel
Vendor: Mellanox Technologies Ltd.
%description
ibutils provides IB network and path diagnostics.


%prep
%setup -n %{name}-%{version}

%build
%configure %{?configure_options} %{?ibmgtsim}
%{__make} %{?mflags}

%install
rm -rf $RPM_BUILD_ROOT
%{__make} install DESTDIR=$RPM_BUILD_ROOT %{?mflags_install}
/bin/rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
/bin/rm -f $RPM_BUILD_ROOT/%{_prefix}/bin/git_version.tcl

install -d $RPM_BUILD_ROOT/etc/profile.d
cat > $RPM_BUILD_ROOT/etc/profile.d/ibutils.sh << EOF
if ! echo \${PATH} | grep -q %{_prefix}/bin ; then
        PATH=\${PATH}:%{_prefix}/bin
fi
EOF
cat > $RPM_BUILD_ROOT/etc/profile.d/ibutils.csh << EOF
if ( "\${path}" !~ *%{_prefix}/bin* ) then
        set path = ( \$path %{_prefix}/bin )
endif
EOF

touch ibutils-files
case %{_prefix} in
        /usr | /usr/)
        ;;
        *)
        install -d $RPM_BUILD_ROOT/etc/ld.so.conf.d
        echo "%{_libdir}" >> $RPM_BUILD_ROOT/etc/ld.so.conf.d/ibutils.conf
        echo "/etc/ld.so.conf.d/ibutils.conf" >> ibutils-files
        ;;
esac


%clean
#Remove installed driver after rpm build finished
rm -rf $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_DIR/%{name}-%{version}

%post
/sbin/ldconfig

###
### Files
###
%files -f ibutils-files
%defattr(-,root,root)
%{_prefix}/bin/ibis
%{_prefix}/bin/ibdmsh
%{_prefix}/bin/ibtopodiff
%{_prefix}/bin/ibnlparse
%{_prefix}/bin/ibdmtr
%{_prefix}/bin/ibdmchk
%{_prefix}/bin/ibdiagui
%{_prefix}/bin/ibdiagnet
%{_prefix}/bin/ibdiagpath
%{_libdir}/libibdmcom.so*
%{_libdir}/libibdmcom.a
%{_libdir}/libibdm.so*
%{_libdir}/libibdm.a
%{_libdir}/ibis1.5.7
%{_libdir}/ibdm1.5.7
%{_libdir}/ibdiagnet1.5.7
%{_libdir}/ibdiagpath1.5.7
%{_libdir}/ibdiagui1.5.7
%{_prefix}/include/ibdm
%{_mandir}/man1/ibdiagnet.1*
%{_mandir}/man1/ibdiagpath.1*
%{_mandir}/man1/ibdiagui.1*
%{_mandir}/man1/ibis.1*
%{_mandir}/man1/ibtopodiff.1*
%{_mandir}/man1/ibdmtr.1*
%{_mandir}/man1/ibdmsh.1*
%{_mandir}/man1/ibdmchk.1*
%{_mandir}/man1/ibdm-topo-file.1*
%{_mandir}/man1/ibdm-ibnl-file.1*
/etc/profile.d/ibutils.sh
/etc/profile.d/ibutils.csh
%{_prefix}/bin/dump2slvl.pl
%{_prefix}/bin/dump2psl.pl
%{_libdir}/libibsysapi.so*
%{_libdir}/libibsysapi.a

# These are only installed when ibmgtsim is built
%if %{build_ibmgtsim}
%{_prefix}/bin/mkSimNodeDir
%{_prefix}/bin/ibmssh
%{_prefix}/bin/ibmsquit
%{_prefix}/bin/RunSimTest
%{_prefix}/bin/IBMgtSim
%{_libdir}/libibmscli.so*
%{_libdir}/libibmscli.a
%{_prefix}/include/ibmgtsim
%{_prefix}/share/ibmgtsim
%{_mandir}/man1/ibmssh.1*
%{_mandir}/man1/ibmsquit.1*
%{_mandir}/man1/mkSimNodeDir.1*
%{_mandir}/man1/RunSimTest.1*
%{_mandir}/man1/IBMgtSim.1*
%endif

# END Files

%changelog
* Tue Aug 21 2006 Vladimir Sokolovsky <vlad@mellanox.co.il>
- Added ibmgtsim to the rpm
* Sun Jul 30 2006 Vladimir Sokolovsky <vlad@mellanox.co.il>
- Added man pages and share/ibmgtsim
* Tue May 16 2006 Vladimir Sokolovsky <vlad@mellanox.co.il>
- Added ibutils sh, csh and conf to update environment
* Sun Apr  2 2006 Vladimir Sokolovsky <vlad@mellanox.co.il>
- Initial packaging for openib gen2 stack