summaryrefslogtreecommitdiff
path: root/package/netperf
diff options
context:
space:
mode:
authorwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
committerwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
commit219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch)
treeb9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/netperf
Initial import
Diffstat (limited to 'package/netperf')
-rw-r--r--package/netperf/Config.in6
-rw-r--r--package/netperf/Makefile34
-rw-r--r--package/netperf/files/netserver.init26
-rw-r--r--package/netperf/ipkg/netperf.control4
-rw-r--r--package/netperf/ipkg/netperf.postinst3
-rw-r--r--package/netperf/patches/01-netperf-2.3pl1-openwrt.patch39
6 files changed, 112 insertions, 0 deletions
diff --git a/package/netperf/Config.in b/package/netperf/Config.in
new file mode 100644
index 000000000..54b96db58
--- /dev/null
+++ b/package/netperf/Config.in
@@ -0,0 +1,6 @@
+config ADK_PACKAGE_NETPERF
+ prompt "netperf........................... network performance measurement tool"
+ tristate
+ default n
+ help
+ Program and service to do network performance measurement.
diff --git a/package/netperf/Makefile b/package/netperf/Makefile
new file mode 100644
index 000000000..6563c60e1
--- /dev/null
+++ b/package/netperf/Makefile
@@ -0,0 +1,34 @@
+# $Id$
+#-
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include ${TOPDIR}/rules.mk
+
+PKG_NAME:= netperf
+PKG_VERSION:= 2.3pl1
+PKG_RELEASE:= 8
+PKG_MD5SUM:= b74314d78af31cb13516fb9a372d2e86
+MASTER_SITES:= ftp://ftp.netperf.org/netperf/archive/ \
+ ftp://ftp.cup.hp.com/dist/networking/benchmarks/netperf/
+
+include ${TOPDIR}/mk/package.mk
+
+$(eval $(call PKG_template,NETPERF,netperf,${PKG_VERSION}${PKG_RELEASE},${ARCH}))
+
+BUILD_STYLE:= auto
+MAKE_FLAGS+= TARGET_NETPERF_HOME="/etc/netperf.conf" \
+ TARGET_CC=${TARGET_CROSS}gcc \
+ TARGET_CFLAGS="${TCFLAGS}" \
+ TARGET_LIBS=""
+MAKE_FILE:= makefile
+
+do-install:
+ ${INSTALL_DIR} ${IDIR_NETPERF}/etc/init.d
+ ${INSTALL_DIR} ${IDIR_NETPERF}/usr/bin
+ ${INSTALL_BIN} ./files/netserver.init \
+ ${IDIR_NETPERF}/etc/init.d/netserver
+ ${INSTALL_BIN} ${WRKBUILD}/netperf ${IDIR_NETPERF}/usr/bin/
+ ${INSTALL_BIN} ${WRKBUILD}/netserver ${IDIR_NETPERF}/usr/bin/
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/netperf/files/netserver.init b/package/netperf/files/netserver.init
new file mode 100644
index 000000000..36a18de81
--- /dev/null
+++ b/package/netperf/files/netserver.init
@@ -0,0 +1,26 @@
+#!/bin/sh
+#FWINIT 70
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${netserver:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ netserver
+ ;;
+stop)
+ killall netserver
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?
diff --git a/package/netperf/ipkg/netperf.control b/package/netperf/ipkg/netperf.control
new file mode 100644
index 000000000..254f28a66
--- /dev/null
+++ b/package/netperf/ipkg/netperf.control
@@ -0,0 +1,4 @@
+Package: netperf
+Priority: optional
+Section: net
+Description: Program and service to do network performance measurement.
diff --git a/package/netperf/ipkg/netperf.postinst b/package/netperf/ipkg/netperf.postinst
new file mode 100644
index 000000000..36ef9c140
--- /dev/null
+++ b/package/netperf/ipkg/netperf.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf netserver netserver NO
diff --git a/package/netperf/patches/01-netperf-2.3pl1-openwrt.patch b/package/netperf/patches/01-netperf-2.3pl1-openwrt.patch
new file mode 100644
index 000000000..b83ca1167
--- /dev/null
+++ b/package/netperf/patches/01-netperf-2.3pl1-openwrt.patch
@@ -0,0 +1,39 @@
+--- netperf-2.3pl1.orig/makefile 2004-09-21 23:33:40.000000000 +0200
++++ netperf-2.3pl1/makefile 2005-12-30 15:35:08.924238576 +0100
+@@ -15,8 +15,7 @@
+ # for the rest of the world, it is probably better to put the binaries
+ # in /usr/local/netperf or /opt/netperf
+ #
+-#NETPERF_HOME = /usr/local/netperf
+-NETPERF_HOME = /opt/netperf
++NETPERF_HOME = $(TARGET_NETPERF_HOME)
+
+ # The compiler on your system might be somewhere else, and/or have
+ # a different name.
+@@ -40,7 +39,7 @@
+ # You may safely ignore that warning.
+ #
+
+-CC = cc
++CC = $(TARGET_CC)
+
+ # Adding flags to CFLAGS enables some non-mainline features. For
+ # more information, please consult the source code.
+@@ -113,7 +112,7 @@
+ # netserver via the netperf command line with -T
+
+ LOG_FILE=DEBUG_LOG_FILE="\"/tmp/netperf.debug\""
+-CFLAGS = -O -D$(LOG_FILE) -DNEED_MAKEFILE_EDIT
++CFLAGS = -D$(LOG_FILE) $(TARGET_CFLAGS)
+
+ # Some platforms, and some options, require additional libraries.
+ # you can add to the "LIBS =" line to accomplish this. if you find
+@@ -136,7 +135,7 @@
+ # -lresolv - required for -DDO_DNS on RedHat 7.1
+ # -lsocket -lbind - required for Zeta OS
+
+-LIBS= -lm
++LIBS= -lm $(TARGET_LIBS)
+
+ # ---------------------------------------------------------------
+ # it should not be the case that anything below this line needs to