archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / iperf / trunk / PKGBUILD
blob0e08cdaebec78fe1fdcf8d69eab6973f70b2be18
1 # Maintainer: Sébastien Luttringer
2 # Contributor: Giovanni Scafora <giovanni@archlinux.org>
3 # Contributor: Dale Blount <dale@archlinux.org>
5 pkgname=iperf
6 pkgver=2.1.9
7 pkgrel=1
8 pkgdesc='A tool to measure maximum TCP bandwidth'
9 arch=('x86_64')
10 license=('custom')
11 url='https://sourceforge.net/projects/iperf2/'
12 depends=('glibc' 'gcc-libs')
13 install=iperf.install
14 source=("https://downloads.sourceforge.net/iperf2/iperf-$pkgver.tar.gz"
15         'iperf-tcp.service'
16         'iperf-udp.service')
17 sha256sums=('5c0771aab00ef14520013aef01675977816e23bb8f5d9fde016f90eb2f1be788'
18             '5bfeaf4b7fc9bcc424cfc2257c6eefd21ed491bd140e9ae5562b270dcf84d794'
19             'fec34a6f352619caaf4ed3bc23f75a3ffb6b3ab5c2947cd2c24c6be36851738c')
20 prepare() {
21   cd $pkgname-$pkgver
22   # apply patch from the source array (should be a pacman feature)
23   local src
24   for src in "${source[@]}"; do
25     src="${src%%::*}"
26     src="${src##*/}"
27     [[ $src = *.patch ]] || continue
28     echo "Applying patch $src..."
29     patch -Np1 < "../$src"
30   done
31   :
34 build() {
35   cd $pkgname-$pkgver
36   ./configure --prefix=/usr \
37               --enable-ipv6 \
38               --enable-multicast \
39               --enable-threads \
40               --enable-fastsampling
41   make
44 package() {
45   pushd $pkgname-$pkgver
46   make DESTDIR="$pkgdir" install
47   install -Dm644 COPYING "$pkgdir/usr/share/licenses/iperf/LICENSE"
48   popd
49   # systemd
50   install -Dm644 iperf-tcp.service "$pkgdir/usr/lib/systemd/system/iperf-tcp.service"
51   install -Dm644 iperf-udp.service "$pkgdir/usr/lib/systemd/system/iperf-udp.service"
54 # vim:set ts=2 sw=2 et: