[packages] nuttcp: add nuttcp, a network perf tool
[openwrt/svn-archive/archive.git] / net / nuttcp / Makefile
1 #
2 # Copyright (C) 2011 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=nuttcp
11 PKG_VERSION:=6.1.2
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=ftp://ftp.lcp.nrl.navy.mil/pub/nuttcp
16 PKG_MD5SUM:=a16d4d6d5def02cea980e57feaf30500
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/nuttcp/Default
21 SECTION:=net
22 CATEGORY:=Network
23 TITLE:=Network performance measurement tool
24 URL:=http://lcp.nrl.navy.mil/nuttcp/nuttcp.html
25 endef
26
27 define Package/nuttcp/Default/description
28 nuttcp is a network performance measurement tool intended for use by network
29 and system managers. Its most basic usage is to determine the raw TCP (or UDP)
30 network layer throughput by transferring memory buffers from a source system
31 across an interconnecting network to a destination system, either transferring
32 data for a specified time interval, or alternatively transferring a specified
33 number of bytes. In addition to reporting the achieved network throughput in
34 Mbps, nuttcp also provides additional useful information related to the data
35 transfer such as user, system, and wall-clock time, transmitter and receiver
36 CPU utilization, and loss percentage (for UDP transfers).
37 endef
38
39 define Package/nuttcp
40 $(call Package/nuttcp/Default)
41 endef
42
43 define Package/nuttcp/description
44 $(call Package/nuttcp/Default/description)
45 endef
46
47 define Package/nuttcp-xinetd
48 $(call Package/nuttcp/Default)
49 TITLE+= xinetd service files
50 DEPENDS:=+nuttcp +xinetd
51 endef
52
53 define Package/nuttcp-xinetd/description
54 $(call Package/nuttcp/Default/description)
55 This package contains the nuttcp xinetd service files.
56 endef
57
58 MAKE_FLAGS += \
59 APP="nuttcp" \
60 OPT="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -Wall"
61
62 define Package/nuttcp/install
63 $(INSTALL_DIR) $(1)/usr/bin
64 $(INSTALL_BIN) $(PKG_BUILD_DIR)/nuttcp $(1)/usr/bin/
65 endef
66
67 define Package/nuttcp-xinetd/install
68 $(INSTALL_DIR) $(1)/etc/xinetd.d
69 $(INSTALL_DATA) $(PKG_BUILD_DIR)/xinetd.d/nuttcp* $(1)/etc/xinetd.d/
70 $(SED) 's,/local,,' $(1)/etc/xinetd.d/nuttcp*
71 endef
72
73 $(eval $(call BuildPackage,nuttcp))
74 $(eval $(call BuildPackage,nuttcp-xinetd))