# Maintainer: Jesus E. pkgname=iperf pkgver=2.1.8 _debver=$pkgver _debrel=1 pkgrel=1 pkgdesc="A tool to measure maximum TCP bandwidth" arch=('i686' 'x86_64') license=('custom:GPL-2-WithACException' 'custom:GPL-3-WithACException' 'Modified-BSD' 'Simplified-BSD' 'Expat' 'ISC' 'LGPL-2' 'GPL-2') url='https://sourceforge.net/projects/iperf2/' makedepends=('quilt') source=("https://downloads.sourceforge.net/iperf2/${pkgname}-${pkgver}.tar.gz" "https://deb.debian.org/debian/pool/main/i/iperf/iperf_${_debver}+dfsg-${_debrel}.debian.tar.xz") sha512sums=('0b5c3dbb493d6663e7ea8621489aa92d2996c48c19499878b33b5e114a57b2c0184bd56624ab935f259c34ee63842a4a89710a91c249e2f4fb7bb37fb7572df8' 'ea334e105f473c9642ca7b72a57a7c866e4a62dd270674dc864285f91e1158db18e4ae30f406c0652a285da3aa5a661ff9cda398a71c530a3c52ab95909de547') prepare() { cd "$pkgname-$pkgver" if [[ ${pkgver%.*} = ${_debver%.*} ]]; then # Debian patches export QUILT_PATCHES=debian/patches export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index' export QUILT_DIFF_ARGS='--no-timestamps' mv "$srcdir"/debian . # Doesn't apply rm -v debian/patches/013-delete-service.patch || true quilt push -av fi } build() { cd "$pkgname-$pkgver" ./configure \ --prefix=/usr \ --enable-ipv6 \ --enable-multicast \ --enable-threads \ --enable-fastsampling make } package() { cd "$pkgname-$pkgver" make DESTDIR="$pkgdir" install install -Dm644 COPYING debian/copyright -t "$pkgdir/usr/share/licenses/$pkgname" }