[arch-commits] Commit in netperf/repos (5 files)

Evangelos Foutras foutrelis at archlinux.org
Tue Jul 7 21:22:02 UTC 2020


    Date: Tuesday, July 7, 2020 @ 21:22:02
  Author: foutrelis
Revision: 660366

archrelease: copy trunk to community-staging-x86_64

Added:
  netperf/repos/community-staging-x86_64/
  netperf/repos/community-staging-x86_64/001-fix-inlining.patch
    (from rev 660365, netperf/trunk/001-fix-inlining.patch)
  netperf/repos/community-staging-x86_64/PKGBUILD
    (from rev 660365, netperf/trunk/PKGBUILD)
  netperf/repos/community-staging-x86_64/netperf.install
    (from rev 660365, netperf/trunk/netperf.install)
  netperf/repos/community-staging-x86_64/netserver.service
    (from rev 660365, netperf/trunk/netserver.service)

------------------------+
 001-fix-inlining.patch |   32 ++++++++++++++++++++++++++
 PKGBUILD               |   56 +++++++++++++++++++++++++++++++++++++++++++++++
 netperf.install        |   14 +++++++++++
 netserver.service      |    9 +++++++
 4 files changed, 111 insertions(+)

Copied: netperf/repos/community-staging-x86_64/001-fix-inlining.patch (from rev 660365, netperf/trunk/001-fix-inlining.patch)
===================================================================
--- community-staging-x86_64/001-fix-inlining.patch	                        (rev 0)
+++ community-staging-x86_64/001-fix-inlining.patch	2020-07-07 21:22:02 UTC (rev 660366)
@@ -0,0 +1,32 @@
+# Copyright Seblu 2015
+--- a/src/netlib.c	2015-08-04 20:30:43.449468815 +0200
++++ b/src/netlib.c	2015-08-04 20:31:40.317792002 +0200
+@@ -3997,11 +3997,7 @@
+   }
+ }
+ 
+-#ifdef WIN32
+-__forceinline void demo_interval_display(double actual_interval)
+-#else
+-  inline void demo_interval_display(double actual_interval)
+-#endif
++void demo_interval_display(double actual_interval)
+ {
+   static int count = 0;
+   struct timeval now;
+@@ -4060,15 +4056,7 @@
+    important compilers have supported such a construct so it should
+    not be a big deal. raj 2012-01-23 */
+ 
+-#ifdef WIN32
+-/* It would seem that the Microsoft compiler will not inline across
+-   source files. So there is little point in having an inline
+-   directive in that situation.  Of course that makes me wonder if an
+-   inline directive has to appear in netlib.h... */
+ void demo_interval_tick(uint32_t units)
+-#else
+-  inline void demo_interval_tick(uint32_t units)
+-#endif
+ {
+   double actual_interval = 0.0;
+ 

Copied: netperf/repos/community-staging-x86_64/PKGBUILD (from rev 660365, netperf/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-07-07 21:22:02 UTC (rev 660366)
@@ -0,0 +1,56 @@
+# Maintainer: Sébastien Luttringer <seblu at archlinux.org>
+# Contributor: Kaiting Chen <kaitocracy at gmail.com>
+# Contributor: Tilman Blumenbach <tilman (at) ax86 (dot) net>
+
+pkgname=netperf
+pkgver=2.7.0
+pkgrel=6
+pkgdesc='Benchmarking tool for many different types of networking'
+url='https://github.com/HewlettPackard/netperf/'
+license=('custom')
+arch=('x86_64')
+depends=('glibc' 'libsmbios' 'lksctp-tools')
+install=netperf.install
+source=("https://github.com/HewlettPackard/netperf/archive/$pkgname-$pkgver.tar.gz"
+        'netserver.service'
+        '001-fix-inlining.patch')
+sha224sums=('6ab49c94d6231d4848bc43c8d56ad4a2611862f800a61009f3b2f2fe'
+            'c5c48a480d62e82d1e65cc3ef8472864bf12d2cc527d6a9c12dca613'
+            '7a30925a46ab5e40ccc2b966a5d7e57a15967b9116c8773cd75030f5')
+
+prepare() {
+  cd netperf-netperf-$pkgver
+  # apply patch from the source array (should be a pacman feature)
+  local src
+  for src in "${source[@]}"; do
+    src="${src%%::*}"
+    src="${src##*/}"
+    [[ $src = *.patch ]] || continue
+    msg2 "Applying patch $src..."
+    patch -Np1 < "../$src"
+  done
+  :
+}
+
+build() {
+  cd netperf-netperf-$pkgver
+  CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common
+  ./configure \
+    --prefix=/usr \
+    --enable-demo \
+    --enable-unixdomain \
+    --enable-dccp \
+    --enable-sctp
+  make
+}
+
+package() {
+  cd netperf-netperf-$pkgver
+  make DESTDIR="$pkgdir" install
+  # license
+  install -D -m 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+  # systemd
+  install -D -m 644 {..,"$pkgdir"/usr/lib/systemd/system}/netserver.service
+}
+
+# vim:set ts=2 sw=2 et:

Copied: netperf/repos/community-staging-x86_64/netperf.install (from rev 660365, netperf/trunk/netperf.install)
===================================================================
--- community-staging-x86_64/netperf.install	                        (rev 0)
+++ community-staging-x86_64/netperf.install	2020-07-07 21:22:02 UTC (rev 660366)
@@ -0,0 +1,14 @@
+#/bin/bash
+
+# arg 1:  the new package version
+# arg 2:  the old package version
+post_upgrade() {
+  # change
+  if (( $(vercmp $2 2.7.0-5) < 0 )); then
+    echo '==> netperf.service renamed to netserver.service'
+    echo '==> You have to enable the new unit manually'
+  fi
+  :
+}
+
+# vim:set ts=2 sw=2 ft=sh et:

Copied: netperf/repos/community-staging-x86_64/netserver.service (from rev 660365, netperf/trunk/netserver.service)
===================================================================
--- community-staging-x86_64/netserver.service	                        (rev 0)
+++ community-staging-x86_64/netserver.service	2020-07-07 21:22:02 UTC (rev 660366)
@@ -0,0 +1,9 @@
+[Unit]
+Description=Netperf Benchmark Server
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/netserver -D
+
+[Install]
+WantedBy=multi-user.target


More information about the arch-commits mailing list