diff options
author | root <root@rshg054.dnsready.net> | 2013-08-13 01:33:19 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-08-13 01:33:19 -0700 |
commit | 7a65a910b77ad191d69881098c47f9b0c852d92e (patch) | |
tree | 9564e611af1442f8952a8cbddb3b0ad25ed71aab /community/iperf | |
parent | 60da6abff6c9577a783d72865f11de7a585e912e (diff) |
Tue Aug 13 01:31:08 PDT 2013
Diffstat (limited to 'community/iperf')
-rw-r--r-- | community/iperf/PKGBUILD | 45 | ||||
-rw-r--r-- | community/iperf/client.cpp.patch | 17 | ||||
-rw-r--r-- | community/iperf/iperf-tcp.service | 9 | ||||
-rw-r--r-- | community/iperf/iperf-udp.service | 9 | ||||
-rw-r--r-- | community/iperf/iperf.install | 11 |
5 files changed, 91 insertions, 0 deletions
diff --git a/community/iperf/PKGBUILD b/community/iperf/PKGBUILD new file mode 100644 index 000000000..fb4539a72 --- /dev/null +++ b/community/iperf/PKGBUILD @@ -0,0 +1,45 @@ +# $Id: PKGBUILD 82783 2013-01-24 12:34:05Z seblu $ +# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org> +# Contributor: Giovanni Scafora <giovanni@archlinux.org> +# Contributor: Dale Blount <dale@archlinux.org> + +pkgname=iperf +pkgver=2.0.5 +pkgrel=7 +pkgdesc='A tool to measure maximum TCP bandwidth' +arch=('i686' 'x86_64') +license=('custom') +url='http://iperf.sourceforge.net' +depends=('gcc-libs') +install=iperf.install +source=("http://downloads.sourceforge.net/iperf/iperf-$pkgver.tar.gz" + 'iperf-tcp.service' + 'iperf-udp.service' + 'client.cpp.patch') +md5sums=('44b5536b67719f4250faed632a3cd016' + '1d8660b540aa0db2e627d3d400cb8de4' + 'a27a8d27b1585bc999a04a2f082e2726' + '82ce63c87cc8bb2f0f94069857ac14a9') + +build() { + cd $pkgname-$pkgver + # fix FS#25159 + patch -Np1 -i "$srcdir/client.cpp.patch" + ./configure --prefix=/usr \ + --enable-ipv6 \ + --enable-multicast \ + --enable-threads + make +} + +package() { + pushd $pkgname-$pkgver + make DESTDIR="$pkgdir" install + install -Dm644 COPYING "$pkgdir/usr/share/licenses/iperf/LICENSE" + popd + # systemd + install -Dm644 iperf-tcp.service "$pkgdir/usr/lib/systemd/system/iperf-tcp.service" + install -Dm644 iperf-udp.service "$pkgdir/usr/lib/systemd/system/iperf-udp.service" +} + +# vim:set ts=2 sw=2 et: diff --git a/community/iperf/client.cpp.patch b/community/iperf/client.cpp.patch new file mode 100644 index 000000000..85f89e765 --- /dev/null +++ b/community/iperf/client.cpp.patch @@ -0,0 +1,17 @@ +--- a/src/Client.cpp 2010-04-01 22:23:17.000000000 +0200 ++++ b/src/Client.cpp 2011-07-19 11:03:42.000000000 +0200 +@@ -212,10 +212,10 @@ + char* readAt = mBuf; + + #if HAVE_THREAD +- if ( !isUDP( mSettings ) ) { +- RunTCP(); +- return; +- } ++// if ( !isUDP( mSettings ) ) { ++// RunTCP(); ++// return; ++// } + #endif + + // Indicates if the stream is readable diff --git a/community/iperf/iperf-tcp.service b/community/iperf/iperf-tcp.service new file mode 100644 index 000000000..ccb8401c8 --- /dev/null +++ b/community/iperf/iperf-tcp.service @@ -0,0 +1,9 @@ +[Unit] +Description=Iperf TCP Server +After=network.target + +[Service] +ExecStart=/usr/bin/iperf -s -V + +[Install] +WantedBy=multi-user.target diff --git a/community/iperf/iperf-udp.service b/community/iperf/iperf-udp.service new file mode 100644 index 000000000..b3c5d2686 --- /dev/null +++ b/community/iperf/iperf-udp.service @@ -0,0 +1,9 @@ +[Unit] +Description=Iperf UDP Server +After=network.target + +[Service] +ExecStart=/usr/bin/iperf -u -s -V + +[Install] +WantedBy=multi-user.target diff --git a/community/iperf/iperf.install b/community/iperf/iperf.install new file mode 100644 index 000000000..2fa553d52 --- /dev/null +++ b/community/iperf/iperf.install @@ -0,0 +1,11 @@ +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() { + if [ "$(vercmp $2 2.0.5-6)" -lt 0 ]; then + cat << EOF +===> iperf.service unit has been moved to iperf-udp.service and iperf-tcp.service. +EOF + fi +} + +# vim:set ts=2 sw=2 ft=sh et: |