aboutsummaryrefslogtreecommitdiffstats
path: root/main/iperf
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2016-08-14 14:04:45 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2016-08-14 14:04:45 +0000
commitcc0c73a712b37d1c28f11d7e990a683e83607e6d (patch)
treeb19ccdf8291ebe1f56b8d630165e5591f019f822 /main/iperf
parent027f806ca57cbaed7871676df21ce978b8c21a3f (diff)
downloadaports-cc0c73a712b37d1c28f11d7e990a683e83607e6d.tar.bz2
aports-cc0c73a712b37d1c28f11d7e990a683e83607e6d.tar.xz
main/iperf: add back iperf v2 and upgrade to 2.0.9
Diffstat (limited to 'main/iperf')
-rw-r--r--main/iperf/APKBUILD54
-rw-r--r--main/iperf/iperf.confd3
-rw-r--r--main/iperf/iperf.initd18
3 files changed, 75 insertions, 0 deletions
diff --git a/main/iperf/APKBUILD b/main/iperf/APKBUILD
new file mode 100644
index 0000000000..da08f2b7db
--- /dev/null
+++ b/main/iperf/APKBUILD
@@ -0,0 +1,54 @@
+# Contributor: Michael Mason <ms13sp@gmail.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=iperf
+pkgver=2.0.9
+pkgrel=0
+pkgdesc="A tool to measure IP bandwidth using UDP or TCP"
+url="http://iperf.sourceforge.net/"
+arch="all"
+license="BSD"
+depends=""
+makedepends=""
+install=""
+subpackages="$pkgname-doc"
+source="http://sourceforge.net/projects/iperf2/files/iperf-$pkgver.tar.gz
+ iperf.initd
+ iperf.confd
+ "
+
+builddir="$srcdir/$pkgname-$pkgver"
+
+prepare() {
+ cd "$builddir"
+ update_config_sub || return 1
+}
+
+build() {
+ cd "$builddir"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ install -D -m0755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -D -m0644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+}
+
+md5sums="1bb3a1d98b1973aee6e8f171933c0f61 iperf-2.0.9.tar.gz
+291084a99bc42217bf20a3f9f479e4d0 iperf.initd
+baf349898c6d08eaa3883d7e6802745c iperf.confd"
+sha256sums="a5350777b191e910334d3a107b5e5219b72ffa393da4186da1e0a4552aeeded6 iperf-2.0.9.tar.gz
+b109c524d71a9da0db18c271b74238ef5f85b270d2f60dc6ae8f097a3342d00d iperf.initd
+2063bd3defe0e58d43741ed6067f3f5552e579385620d0e0f5aa2b8e96b21151 iperf.confd"
+sha512sums="ff75e51af9d368eedb1e1dc4621f7575219525f0e438f1c8fa896aa7e990a6812a9a351db9004952057d81127f52b67350820e85c9ae1d8db2e6a60c1f2534d2 iperf-2.0.9.tar.gz
+339fb04b41cce11e8ea8694d95c13af9c88e0d1143356d913ec810c9b11efa27212d585b5dcc49cc2eb860a6d8bc557092c8659d7d5cfe532c5afdb36f8eedf8 iperf.initd
+fb5e155fff568a72488cc1511d30358835a48bcce309f8f46d040160932b4a4ccb85040c27c60dee477900a25bd34c50eac21d1d0bea984b40faa401be2ba7e8 iperf.confd"
diff --git a/main/iperf/iperf.confd b/main/iperf/iperf.confd
new file mode 100644
index 0000000000..1f425faa67
--- /dev/null
+++ b/main/iperf/iperf.confd
@@ -0,0 +1,3 @@
+# Default option for iperf: --server (runs in TCP/5001 mode)
+# For further server options check --help flag
+command_args=""
diff --git a/main/iperf/iperf.initd b/main/iperf/iperf.initd
new file mode 100644
index 0000000000..a135bafc92
--- /dev/null
+++ b/main/iperf/iperf.initd
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+
+command="/usr/bin/iperf"
+pidfile="/var/run/$SVCNAME/$SVCNAME.pid"
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting $SVCNAME"
+ start-stop-daemon --start --make-pid --user ${exec_user:-nobody} \
+ --pidfile ${pidfile} --background --exec $command \
+ -- --server ${command_args}
+ eend
+}
+