2f623f1b76ec1b873e8770b807756d1a9ca7a8e2
[packages.git] / net / netperf / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=netperf
12 PKG_VERSION:=2.3pl1
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=b74314d78af31cb13516fb9a372d2e86
15
16 PKG_SOURCE_URL:=ftp://ftp.netperf.org/netperf/archive/ \
17         ftp://ftp.cup.hp.com/dist/networking/benchmarks/netperf/
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
19 PKG_CAT:=zcat
20
21 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/netperf
26   SECTION:=net
27   CATEGORY:=Network
28   TITLE:=network performance measurement tool
29   DESCRIPTION:=Program and service to do network performance measurement.
30   URL:=http://www.netperf.org
31 endef
32
33 define Build/Compile    
34         $(MAKE) -C $(PKG_BUILD_DIR) \
35             TARGET_NETPERF_HOME="/etc/netperf.conf" \
36             TARGET_CC=$(TARGET_CROSS)gcc \
37             TARGET_CFLAGS="$(TARGET_CFLAGS)" \
38                 TARGET_LIBS="" \
39                 all
40 endef
41
42 define Package/netperf/install  
43         install -d -m0755 $(1)/etc/init.d
44         install -m0755 ./files/netserver.init $(1)/etc/init.d/S51netserver
45         install -d -m0755 $(1)/usr/bin
46         install -m0755 $(PKG_BUILD_DIR)/netperf $(1)/usr/bin/
47         install -m0755 $(PKG_BUILD_DIR)/netserver $(1)/usr/bin/
48 endef
49
50 $(eval $(call BuildPackage,netperf))