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