diff --git a/perftest.spec b/perftest.spec index 4cf3a42..b9fb2cb 100644 --- a/perftest.spec +++ b/perftest.spec @@ -1,10 +1,10 @@ Name: perftest Summary: IB Performance Tests # Upstream uses a dash in the version. Not valid in the Version field, so we use a dot instead. +# Issue "Please avoid dashes in version": +# https://github.com/linux-rdma/perftest/issues/18 %global upstream_ver 4.5-0.20 -# The directory in the tarball has only the part before the dash. -%global tarball_ver 4.5 -Version: 4.5.0.20 +Version: %{lua: v=string.gsub(rpm.expand("%{upstream_ver}"),"-","."); print(v)} Release: %autorelease License: GPLv2 or BSD Source: https://github.com/linux-rdma/perftest/releases/download/v4.5-0.20/perftest-4.5-0.20.gac7cca5.tar.gz @@ -26,6 +26,9 @@ connections. It does not work on normal TCP/IP networks, only on RDMA networks. %prep +# The directory in the tarball has only the part before the dash. +%global tarball_ver %{lua: uv=rpm.expand("%{upstream_ver}"); d=string.find(uv,"-"); print(string.sub(uv,1,d-1))} + %setup -q -n %{name}-%{tarball_ver} find src -type f -iname '*.[ch]' -exec chmod a-x '{}' ';'