diff options
Diffstat (limited to 'community/netperf')
-rw-r--r-- | community/netperf/PKGBUILD | 48 | ||||
-rw-r--r-- | community/netperf/netperf.conf | 3 | ||||
-rw-r--r-- | community/netperf/netperf.install | 20 | ||||
-rw-r--r-- | community/netperf/netperf.rc | 41 | ||||
-rw-r--r-- | community/netperf/netperf.service | 8 |
5 files changed, 120 insertions, 0 deletions
diff --git a/community/netperf/PKGBUILD b/community/netperf/PKGBUILD new file mode 100644 index 000000000..9ff232229 --- /dev/null +++ b/community/netperf/PKGBUILD @@ -0,0 +1,48 @@ +# $Id: PKGBUILD 73456 2012-07-08 00:07:29Z seblu $ +# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org> +# Contributor: Kaiting Chen <kaitocracy@gmail.com> +# Contributor: Tilman Blumenbach <tilman (at) ax86 (dot) net> + +pkgname=netperf +pkgver=2.6.0 +pkgrel=1 +pkgdesc='Benchmarking tool for many different types of networking' +url='http://www.netperf.org/' +license=('custom') +arch=('i686' 'x86_64') +depends=('glibc' 'libsmbios' 'lksctp-tools') +install=$pkgname.install +source=( + "ftp://ftp.netperf.org/netperf/$pkgname-$pkgver.tar.bz2" + "$pkgname.rc" + "$pkgname.conf" + "$pkgname.service") +md5sums=('9654ffdfd4c4f2c93ce3733cd9ed9236' + '4f11bf24fcd7a44c17bbe27cdc7dae01' + '14836578ba49bbfa9e928feeca8346f1' + '9a8b47101fb2b0bf8fb9bbfb73ba6486') + +build() { + cd $pkgname-$pkgver + ./configure \ + --prefix=/usr \ + --enable-demo \ + --enable-unixdomain \ + --enable-dccp \ + --enable-sctp + make +} + +package() { + cd $pkgname-$pkgver + make DESTDIR="$pkgdir" install + # install license + install -D -m 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING" + # install initscripts & systemd files + install -D -m 755 ../$pkgname.rc "$pkgdir/etc/rc.d/$pkgname" + install -D -m 644 ../$pkgname.conf "$pkgdir/etc/conf.d/$pkgname" + install -D -m 644 ../$pkgname.service \ + "$pkgdir/usr/lib/systemd/system/$pkgname.service" +} + +# vim:set ts=2 sw=2 ft=sh et: diff --git a/community/netperf/netperf.conf b/community/netperf/netperf.conf new file mode 100644 index 000000000..b8e36c203 --- /dev/null +++ b/community/netperf/netperf.conf @@ -0,0 +1,3 @@ +# vim:set ts=2 sw=2 ft=sh noet: + +#DAEMON_OPTS='-d' diff --git a/community/netperf/netperf.install b/community/netperf/netperf.install new file mode 100644 index 000000000..fcb9ba6ae --- /dev/null +++ b/community/netperf/netperf.install @@ -0,0 +1,20 @@ +infodir=/usr/share/info +filelist=(netperf.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in "${filelist[@]}"; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in "${filelist[@]}"; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} diff --git a/community/netperf/netperf.rc b/community/netperf/netperf.rc new file mode 100644 index 000000000..f2a2de582 --- /dev/null +++ b/community/netperf/netperf.rc @@ -0,0 +1,41 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/${0##*/} + +DAEMON=/usr/bin/netserver +PID=$(pidof -o %PPID $DAEMON) + +case "$1" in + start) + stat_busy "Starting ${0##*/} daemon" + [[ ! $PID ]] && + </dev/null &>/dev/null $DAEMON $DAEMON_OPTS && + add_daemon ${0##*/} && + stat_done && + exit 0 + stat_fail + ;; + stop) + stat_busy "Stopping ${0##*/} daemon" + [[ $PID ]] && + kill $PID &> /dev/null && + rm_daemon ${0##*/} && + stat_done && + exit 0 + stat_fail + ;; + restart) + $0 stop + $0 start + exit 0 + ;; + *) + echo "usage: ${0##*/} {start|stop|restart}" >&2 + ;; +esac + +exit 1 + +# vim:set ts=2 sw=2 ft=sh et: diff --git a/community/netperf/netperf.service b/community/netperf/netperf.service new file mode 100644 index 000000000..ce3c9cab8 --- /dev/null +++ b/community/netperf/netperf.service @@ -0,0 +1,8 @@ +[Unit] +Description=Netperf Benchmark Server + +[Service] +ExecStart=/usr/bin/netserver -D + +[Install] +WantedBy=multi-user.target |