4573260
Name:           perftest
4573260
Summary:        IB Performance Tests
52b36c2
# Upstream uses a dash in the version. Not valid in the Version field, so we use a dot instead.
56bffef
# Issue "Please avoid dashes in version":
56bffef
#   https://github.com/linux-rdma/perftest/issues/18
e0d93f7
%global upstream_ver 23.07.0-0.27
2673b45
Version:        %{lua: print((string.gsub(rpm.expand("%{upstream_ver}"),"-",".")))}
bd6c7fa
Release:        %autorelease
c0c60c1
License:        GPL-2.0-only OR BSD-2-Clause
e0d93f7
Source:         https://github.com/linux-rdma/perftest/releases/download/23.07.0-0.27/perftest-23.07.0-0.27.g117a291.tar.gz
b2ba9b0
Url:            https://github.com/linux-rdma/perftest
4573260
14674d2
BuildRequires:  make
26df8d7
BuildRequires:  gcc
4573260
BuildRequires:  libibverbs-devel >= 1.2.0
4573260
BuildRequires:  librdmacm-devel >= 1.0.21
4573260
BuildRequires:  libibumad-devel >= 1.3.10.2
5066a37
BuildRequires:  pciutils-devel
4573260
Obsoletes:      openib-perftest < 1.3
6fa5c01
ExcludeArch:    s390 %{arm}
b616eec
b616eec
%description
b616eec
Perftest is a collection of simple test programs designed to utilize 
b616eec
RDMA communications and provide performance numbers over those RDMA
b616eec
connections.  It does not work on normal TCP/IP networks, only on
b616eec
RDMA networks.
b616eec
b616eec
%prep
56bffef
# The directory in the tarball has only the part before the dash.
2673b45
%global tarball_ver %{lua: _,_,v=string.find(rpm.expand("%{upstream_ver}"),"([^-]+)"); print(v)}
56bffef
0c12281
%setup -q -n %{name}-%{tarball_ver}
4573260
find src -type f -iname '*.[ch]' -exec chmod a-x '{}' ';'
b616eec
b616eec
%build
1fb1c3a
%configure
a2a0664
%make_build
b616eec
b616eec
%install
4573260
for file in ib_{atomic,read,send,write}_{lat,bw} raw_ethernet_{lat,bw}; do
1fb1c3a
	install -D -m 0755 $file %{buildroot}%{_bindir}/$file
1fb1c3a
done
b616eec
b616eec
%files
4573260
%doc README
4573260
%license COPYING
b616eec
%_bindir/*
b616eec
b616eec
%changelog
bd6c7fa
%autochangelog