replace lots of manual install commands with INSTALL_* variables
[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 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/fping
25 SECTION:=net
26 CATEGORY:=Network
27 TITLE:=A program to ping multiple hosts in parallel
28 DESCRIPTION:=\
29 fping is a ping(1) like program which uses the Internet Control Message Protocol \\\
30 (ICMP) echo request to determine if a host is up. fping is different from ping in \\\
31 that you can specify any number of hosts on the command line, or specify a file \\\
32 containing the lists of hosts to ping. Instead of trying one host until it timeouts \\\
33 or replies, fping will send out a ping packet and move on to the next host in a \\\
34 round-robin fashion. If a host replies, it is noted and removed from the list of \\\
35 hosts to check. If a host does not respond within a certain time limit and/or retry \\\
36 limit it will be considered unreachable.
37 URL:=http://www.fping.com
38 endef
39
40 # uses Build/Configure/Default
41
42 define Build/Compile
43 $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" -C $(PKG_BUILD_DIR) clean $(PKG_NAME)
44 mv $(PKG_BUILD_DIR)/$(PKG_NAME) $(PKG_BUILD_DIR)/$(PKG_NAME)4
45 $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS) -DIPV6=1" -C $(PKG_BUILD_DIR) clean $(PKG_NAME)
46 mv $(PKG_BUILD_DIR)/$(PKG_NAME) $(PKG_BUILD_DIR)/$(PKG_NAME)6
47 endef
48
49 define Package/fping/install
50 $(INSTALL_DIR) $(1)/usr/bin
51 $(CP) $(PKG_BUILD_DIR)/fping4 $(1)/usr/bin/
52 $(CP) $(PKG_BUILD_DIR)/fping6 $(1)/usr/bin/
53 ln -sf fping4 $(1)/usr/bin/fping
54 endef
55
56 $(eval $(call BuildPackage,fping))