summaryrefslogtreecommitdiff
path: root/community/iperf/PKGBUILD
blob: 7c98b4f7af4c79f2f6d3179cb3cb85cf53e5700f (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
# $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' 'mips64el')
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: