Port httping to -ng

git-svn-id: svn://svn.openwrt.org/openwrt/packages@4392 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian 2006-08-02 09:13:41 +00:00
parent 0318be3c73
commit 4ae43d4859
2 changed files with 71 additions and 0 deletions

45
net/httping/Makefile Normal file
View File

@ -0,0 +1,45 @@
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=httping
PKG_VERSION:=1.0.10
PKG_RELEASE:=1
PKG_MD5SUM:=998b00b8babeb3196d28c20ad87d9c15
PKG_SOURCE_URL:=http://www.vanheusden.com/httping/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/httping
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libopenssl
TITLE:=Httping is like 'ping' but for http-requests
DESCRIPTION:=Httping is like 'ping' but for http-requests.\\\
Give it an url, and it'll show you how long it takes to connect, send a\\\
request and retrieve the reply (only the headers). Be aware that the\\\
transmission across the network also takes time!\\\
URL:=http://www.vanheusden.com/httping/
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) -f $(PKG_BUILD_DIR)/Makefile$(SSL_ENABLE) \
CC=$(TARGET_CC) STAGING_DIR=$(STAGING_DIR)
endef
define Package/httping/install
mkdir -p $(1)/usr/sbin
$(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,httping))

View File

@ -0,0 +1,26 @@
diff -urN httping-1.0.10.orig/io.c httping-1.0.10/io.c
--- httping-1.0.10.orig/io.c 2006-02-13 13:48:37.645232976 +0100
+++ httping-1.0.10/io.c 2006-02-13 13:48:24.083294704 +0100
@@ -37,7 +37,7 @@
struct timeval to;
fd_set rfds;
- FD_ZERO(&rfds);
+ //FD_ZERO(&rfds);
FD_SET(fd, &rfds);
to.tv_sec = timeout / 1000;
diff -urN httping-1.0.10.orig/Makefile httping-1.0.10/Makefile
--- httping-1.0.10.orig/Makefile 2006-01-02 17:07:29.000000000 +0100
+++ httping-1.0.10/Makefile 2006-02-13 13:44:45.066590304 +0100
@@ -15,8 +15,8 @@
VERSION=1.0.10
DEBUG=-g
-LDFLAGS+=-lssl -lcrypto $(DEBUG)
-CFLAGS+=-O2 -Wall -DVERSION=\"$(VERSION)\" $(DEBUG)
+LDFLAGS+=-lssl -lcrypto $(DEBUG) -L$(STAGING_DIR)/usr/lib
+CFLAGS+=-O2 -Wall -DVERSION=\"$(VERSION)\" $(DEBUG) -I$(STAGING_DIR)/usr/include
OBJS=http.o io.o str.o error.o utils.o main.o tcp.o mssl.o res.o