aboutsummaryrefslogtreecommitdiffstats
path: root/main/iperf/APKBUILD
blob: cd43d08fb89082574b1776230bebcd6ae0d035b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Contributor: Michael Mason <ms13sp@gmail.com>
# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=iperf
pkgver=2.0.13
pkgrel=1
pkgdesc="A tool to measure IP bandwidth using UDP or TCP"
url="http://iperf2.sourceforge.net/"
arch="all"
license="BSD"
depends="!iperf3" # openrc services conflict
subpackages="$pkgname-doc $pkgname-openrc"
source="https://sourceforge.net/projects/iperf2/files/iperf-$pkgver.tar.gz
	iperf.initd
	iperf.confd
	"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info
	make
}

check() {
	cd "$builddir"
	# iperf -v returns 1
	./src/iperf -v || test $? = 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
}

sha512sums="40fcfb8f4d27887f53a743ac07396511fb2a7ac59f4b300fe36896bd0241e191945fa253705990711772ee776d5e4227ed62760fc92abebdfebcedd11c27c0ea  iperf-2.0.13.tar.gz
339fb04b41cce11e8ea8694d95c13af9c88e0d1143356d913ec810c9b11efa27212d585b5dcc49cc2eb860a6d8bc557092c8659d7d5cfe532c5afdb36f8eedf8  iperf.initd
fb5e155fff568a72488cc1511d30358835a48bcce309f8f46d040160932b4a4ccb85040c27c60dee477900a25bd34c50eac21d1d0bea984b40faa401be2ba7e8  iperf.confd"