# fping package # David Rowe - March 1 2011 # # usage: make -f fping.mk fping-package # # include rules.mk FPING_NAME=fping FPING_VERSION=2.4b2_to FPING_SOURCE=fping.tar.gz FPING_SITE=http://fping.sourceforge.net/download FPING_DIR=$(BUILD_DIR)/$(FPING_NAME)-$(FPING_VERSION) TARGET_DIR=$(TOPDIR)/tmp/$(FPING_NAME)/ipkg/$(FPING_NAME) FPING_CC=bfin-linux-uclibc-gcc FPING_CF=-DENABLE_DEBUG -Wall -mfdpic -D__adjtimex=adjtimex PKG_NAME=fping PKG_VERSION=$(FPING_VERSION) PKG_RELEASE=1 PKG_BUILD_DIR:=$(TOPDIR)/tmp/fping $(DL_DIR)/$(FPING_SOURCE): mkdir -p $(DL_DIR) $(WGET) -P $(DL_DIR) $(FPING_SITE)/$(FPING_SOURCE) $(FPING_DIR)/.unpacked: $(DL_DIR)/$(FPING_SOURCE) tar -xzvf $(DL_DIR)/$(FPING_SOURCE) touch $(FPING_DIR)/.unpacked $(FPING_DIR)/fping: $(FPING_DIR)/.unpacked cd $(FPING_DIR); ./configure --host=bfin-linux-uclibc cd $(FPING_DIR); make fping: $(FPING_DIR)/fping mkdir -p $(TARGET_DIR)/bin cp $(FPING_DIR)/fping $(TARGET_DIR)/bin/ touch $(PKG_BUILD_DIR)/.built all: fping # PACKAGE DEFINITION define Package/fping SECTION=net CATEGORY=Network TITLE=fpng DESCRIPTION=\ ping(1) like program which uses the Internet Control Message \\\ Protocol (ICMP) echo request to determine if a host is up. fping \\\ is different from ping in that you can specify any number of \\\ hosts on the command line, or specify a file containing the lists \\\ of hosts to ping. Instead of trying one host until it timeouts or \\\ replies, fping will send out a ping packet and move on to the \\\ next host in a round-robin fashion. If a host replies, it is \\\ noted and removed from the list of hosts to check. If a host does \\\ not respond within a certain time limit and/or retry limit it \\\ will be considered unreachable. \\\ \\\ Unlike ping, fping is meant to be used in scripts and its output \\\ is easy to parse. endef # PACKAGE POST-INST define Package/$(PKG_NAME)/postinst endef # PACKAGE PRE-REMOVE define Package/$(PKG_NAME)/prerm endef $(eval $(call BuildPackage,fping)) fping-package: fping $(PACKAGE_DIR)/$(PKG_NAME)_$(VERSION)_$(PKGARCH).ipk