Add gw6c and make it link against uclibcxx (#2125)
[openwrt/svn-archive/archive.git] / net / fping / 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:=fping
12 PKG_VERSION:=2.4b2_to-ipv6
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.fping.com/download/
17 PKG_MD5SUM:=3ad516765514249a40d3c5b6caab812a
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/fping
24 SECTION:=net
25 CATEGORY:=Network
26 TITLE:=A program to ping multiple hosts in parallel
27 URL:=http://www.fping.com
28 endef
29
30 define Package/fping/description
31 fping is a ping(1) like program which uses the Internet Control Message Protocol
32 (ICMP) echo request to determine if a host is up. fping is different from ping in
33 that you can specify any number of hosts on the command line, or specify a file
34 containing the lists of hosts to ping. Instead of trying one host until it timeouts
35 or replies, fping will send out a ping packet and move on to the next host in a
36 round-robin fashion. If a host replies, it is noted and removed from the list of
37 hosts to check. If a host does not respond within a certain time limit and/or retry
38 limit it will be considered unreachable.
39 endef
40
41 define Build/Configure
42 (cd $(PKG_BUILD_DIR); touch \
43 configure \
44 stamp-h.in \
45 config.h.in \
46 );
47 $(call Build/Configure/Default,)
48 endef
49
50 define Build/Compile
51 $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" -C $(PKG_BUILD_DIR) clean $(PKG_NAME)
52 mv $(PKG_BUILD_DIR)/$(PKG_NAME) $(PKG_BUILD_DIR)/$(PKG_NAME)4
53 $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS) -DIPV6=1" -C $(PKG_BUILD_DIR) clean $(PKG_NAME)
54 mv $(PKG_BUILD_DIR)/$(PKG_NAME) $(PKG_BUILD_DIR)/$(PKG_NAME)6
55 endef
56
57 define Package/fping/install
58 $(INSTALL_DIR) $(1)/usr/bin
59 $(CP) $(PKG_BUILD_DIR)/fping4 $(1)/usr/bin/
60 $(CP) $(PKG_BUILD_DIR)/fping6 $(1)/usr/bin/
61 ln -sf fping4 $(1)/usr/bin/fping
62 endef
63
64 $(eval $(call BuildPackage,fping))