mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-09 00:17:31 +00:00
added community/netperf
This commit is contained in:
parent
3ae9117c95
commit
10b2ded819
4 changed files with 111 additions and 0 deletions
32
community/netperf/001-fix-inlining.patch
Normal file
32
community/netperf/001-fix-inlining.patch
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Copyright Seblu 2015
|
||||
--- a/src/netlib.c 2015-08-04 20:30:43.449468815 +0200
|
||||
+++ b/src/netlib.c 2015-08-04 20:31:40.317792002 +0200
|
||||
@@ -3997,11 +3997,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
-#ifdef WIN32
|
||||
-__forceinline void demo_interval_display(double actual_interval)
|
||||
-#else
|
||||
- inline void demo_interval_display(double actual_interval)
|
||||
-#endif
|
||||
+void demo_interval_display(double actual_interval)
|
||||
{
|
||||
static int count = 0;
|
||||
struct timeval now;
|
||||
@@ -4060,15 +4056,7 @@
|
||||
important compilers have supported such a construct so it should
|
||||
not be a big deal. raj 2012-01-23 */
|
||||
|
||||
-#ifdef WIN32
|
||||
-/* It would seem that the Microsoft compiler will not inline across
|
||||
- source files. So there is little point in having an inline
|
||||
- directive in that situation. Of course that makes me wonder if an
|
||||
- inline directive has to appear in netlib.h... */
|
||||
void demo_interval_tick(uint32_t units)
|
||||
-#else
|
||||
- inline void demo_interval_tick(uint32_t units)
|
||||
-#endif
|
||||
{
|
||||
double actual_interval = 0.0;
|
||||
|
50
community/netperf/PKGBUILD
Normal file
50
community/netperf/PKGBUILD
Normal file
|
@ -0,0 +1,50 @@
|
|||
# $Id$
|
||||
# Maintainer: Sébastien Luttringer <seblu@archlinux.org>
|
||||
# Contributor: Kaiting Chen <kaitocracy@gmail.com>
|
||||
# Contributor: Tilman Blumenbach <tilman (at) ax86 (dot) net>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - remove libsmbios depend
|
||||
|
||||
pkgname=netperf
|
||||
pkgver=2.7.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' 'lksctp-tools')
|
||||
install=$pkgname.install
|
||||
source=("ftp://ftp.netperf.org/netperf/$pkgname-$pkgver.tar.bz2"
|
||||
"$pkgname.service"
|
||||
'001-fix-inlining.patch')
|
||||
md5sums=('ad1c5342d61f297c417a93133aeba65a'
|
||||
'7bce5056b2a24d76fcc0c20e4b527416'
|
||||
'0160c47c86ff1fca8df64cfb4cd4d9f2')
|
||||
|
||||
prepare() {
|
||||
patch -d $pkgname-$pkgver -p1 < 001-fix-inlining.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd $pkgname-$pkgver
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--enable-demo \
|
||||
--enable-unixdomain \
|
||||
--enable-dccp \
|
||||
--enable-sctp
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $pkgname-$pkgver
|
||||
make DESTDIR="$pkgdir" install
|
||||
# license
|
||||
install -D -m 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
|
||||
# systemd
|
||||
install -D -m 644 ../$pkgname.service \
|
||||
"$pkgdir/usr/lib/systemd/system/$pkgname.service"
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
20
community/netperf/netperf.install
Normal file
20
community/netperf/netperf.install
Normal file
|
@ -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
|
||||
}
|
9
community/netperf/netperf.service
Normal file
9
community/netperf/netperf.service
Normal file
|
@ -0,0 +1,9 @@
|
|||
[Unit]
|
||||
Description=Netperf Benchmark Server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/netserver -D
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in a new issue