# Maintainer: Oleg Titov <oleg.titov@gmail.com>

pkgname=iperf
pkgver=2.0.13
pkgrel=1
pkgdesc='A tool to measure maximum TCP bandwidth'
arch=('i686' 'x86_64')
url="https://sourceforge.net/projects/iperf2/"
license=('custom')
depends=('gcc-libs')
source=("https://downloads.sourceforge.net/iperf2/iperf-$pkgver.tar.gz")
sha256sums=('c88adec966096a81136dda91b4bd19c27aae06df4d45a7f547a8e50d723778ad')

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  ./configure --build=${CHOST} \
              --prefix=/usr \
              --enable-ipv6 \
              --enable-multicast \
              --enable-threads

  make
}

check() {
  cd ${srcdir}/${pkgname}-${pkgver}
#  make check
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install
  install -Dm644 COPYING "$pkgdir/usr/share/licenses/iperf/LICENSE"
}
