Port netperf to -ng
git-svn-id: svn://svn.openwrt.org/openwrt/packages@4478 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
50
net/netperf/Makefile
Normal file
50
net/netperf/Makefile
Normal file
@ -0,0 +1,50 @@
|
||||
#
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
# $Id$
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=netperf
|
||||
PKG_VERSION:=2.3pl1
|
||||
PKG_RELEASE:=1
|
||||
PKG_MD5SUM:=b74314d78af31cb13516fb9a372d2e86
|
||||
|
||||
PKG_SOURCE_URL:=ftp://ftp.netperf.org/netperf/archive/ \
|
||||
ftp://ftp.cup.hp.com/dist/networking/benchmarks/netperf/
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_CAT:=zcat
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/netperf
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=network performance measurement tool
|
||||
DESCRIPTION:=Program and service to do network performance measurement.
|
||||
URL:=http://www.netperf.org
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
TARGET_NETPERF_HOME="/etc/netperf.conf" \
|
||||
TARGET_CC=$(TARGET_CROSS)gcc \
|
||||
TARGET_CFLAGS="$(TARGET_CFLAGS)" \
|
||||
TARGET_LIBS="" \
|
||||
all
|
||||
endef
|
||||
|
||||
define Package/netperf/install
|
||||
install -d -m0755 $(1)/etc/init.d
|
||||
install -m0755 ./files/netserver.init $(1)/etc/init.d/S51netserver
|
||||
install -d -m0755 $(1)/usr/bin
|
||||
install -m0755 $(PKG_BUILD_DIR)/netperf $(1)/usr/bin/
|
||||
install -m0755 $(PKG_BUILD_DIR)/netserver $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,netperf))
|
3
net/netperf/files/netserver.init
Normal file
3
net/netperf/files/netserver.init
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
test -n "$FAILSAFE" && exit
|
||||
/usr/bin/netserver
|
39
net/netperf/patches/01-netperf-2.3pl1-openwrt.patch
Normal file
39
net/netperf/patches/01-netperf-2.3pl1-openwrt.patch
Normal file
@ -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
|
Reference in New Issue
Block a user