[sockperf] simplify spec; build fix

Michal Schmidt michich at fedoraproject.org
Mon Sep 8 14:50:11 UTC 2014


commit 69b0c9c99d31ddeefcaa4eeb60048c79bb035481
Author: Michal Schmidt <mschmidt at redhat.com>
Date:   Mon Sep 8 16:29:29 2014 +0200

    simplify spec; build fix
    
    Simplify svnversion substitution.
    Build fix. Make sure config/m4 exists.

 sockperf.spec |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/sockperf.spec b/sockperf.spec
index e14839f..a67245f 100644
--- a/sockperf.spec
+++ b/sockperf.spec
@@ -1,5 +1,7 @@
 Name:           sockperf
-Version:        2.5.244
+%global mainversion 2.5
+%global svnversion 244
+Version:        %{mainversion}.%{svnversion}
 Release:        1%{?dist}
 Summary:        Network benchmarking utility for testing latency and throughput
 
@@ -9,7 +11,7 @@ URL:            https://code.google.com/p/sockperf/
 #Source archive generated from upstream SVN checkout:
 # svn export -r 244 http://sockperf.googlecode.com/svn/branches/sockperf_v2/ sockperf-2.5.244
 # tar -cJvf sockperf-2.5.244.tar.xz sockperf-2.5.244/
-Source0:        sockperf-2.5.244.tar.xz
+Source0:        %{name}-%{version}.tar.xz
 Patch1:         0001-Don-t-throw-away-Fedora-s-CXXFLAGS.patch
 Patch2:         0002-drop-the-sockperf_-version-copy-of-the-binary.patch
 Patch3:         0003-doc-installation-fixes.patch
@@ -54,11 +56,10 @@ following:
 
 %build
 # configure.ac invokes 'svnversion' to detect the exact version number.
-# It wouldn't work with the tarball. Let's replace it with the part of
-# the known version number after the last dot.
-VER_SVN=%{version}
-VER_SVN=${VER_SVN##*.}
-sed -i -e "s/svnversion \./echo $VER_SVN/" configure.ac
+# It wouldn't work with the tarball. Let's replace it with the SVN version
+# known at build time.
+sed -i -e "s/svnversion \./echo %{svnversion}/" configure.ac
+mkdir -p config/m4
 autoreconf -fi
 %configure --enable-doc
 # --enable-tool --enable-test
@@ -77,8 +78,9 @@ make %{?_smp_mflags}
 
 %changelog
 * Mon Sep 08 2014 Michal Schmidt <mschmidt at redhat.com> - 2.5.244-1
-- Update to current upstream from SVN.
-- Has aarch64 and ppc64 support.
+- Update to current upstream from SVN. Has aarch64 and ppc64 support.
+- Simplify svnversion substitution.
+- Build fix. Make sure config/m4 exists.
 
 * Mon Aug 18 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.5.241-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild


More information about the scm-commits mailing list