#
-# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=httping
-PKG_VERSION:=1.4.4
+PKG_VERSION:=1.5.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=http://www.vanheusden.com/httping
-PKG_MD5SUM:=e36bb30bd758c766d7260bdde6fe6450
+PKG_MD5SUM:=49f72b124afb8a60f152ec674a162ad6
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
-define Package/httping
+define Package/httping/Default
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+libopenssl
TITLE:=Httping is like 'ping' but for http-requests
URL:=http://www.vanheusden.com/httping/
endef
-define Package/httping/description
+define Package/httping/Default/description
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!
endef
+define Package/httping
+ $(call Package/httping/Default)
+ DEPENDS+= +libopenssl
+ TITLE+= (with SSL support)
+ VARIANT:=ssl
+endef
+
+define Package/httping/description
+ $(call Package/httping/Default/description)
+ This package is built with SSL support.
+endef
+
+define Package/httping-nossl
+ $(call Package/httping/Default)
+ TITLE+= (without SSL support)
+ VARIANT:=nossl
+endef
+
+define Package/httping-nossl/description
+ $(call Package/httping/Default/description)
+ This package is built without SSL support.
+endef
+
MAKE_FLAGS += \
- CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
+ CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)"
+
+ifeq ($(BUILD_VARIANT),nossl)
+ MAKE_FLAGS += \
+ SSL="no" \
+ CFLAGS+="-DNO_SSL"
+endif
define Package/httping/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/httping $(1)/usr/bin/
endef
+Package/httping-nossl/install = $(Package/httping/install)
+
$(eval $(call BuildPackage,httping))
+$(eval $(call BuildPackage,httping-nossl))
+++ /dev/null
---- a/Makefile
-+++ b/Makefile
-@@ -18,7 +18,7 @@ TARGET=httping
-
- WFLAGS=-Wall -W
- OFLAGS=-O2
--CFLAGS+=$(WFLAGS) $(OFLAGS) -DVERSION=\"$(VERSION)\"
-+CFLAGS+=$(EXTRA_CFLAGS) $(WFLAGS) $(OFLAGS) -DVERSION=\"$(VERSION)\"
-
- PACKAGE=$(TARGET)-$(VERSION)
- PREFIX=/usr
-@@ -47,7 +47,7 @@ ifeq ($(SSL),no)
- CFLAGS+=-DNO_SSL
- else
- OBJS+=mssl.o
--LDFLAGS+=-lssl -lcrypto
-+LDFLAGS+=$(EXTRA_LDFLAGS) -lssl -lcrypto
- endif
-
- ifeq ($(DEBUG),yes)
#include "utils.h"
#include "error.h"
-+#define VERSION "1.4.4"
++#define VERSION "1.5.2"
+
static volatile int stop = 0;
void version(void)
{
-- fprintf(stderr, "HTTPing v" VERSION ", (C) 2003-2010 folkert@vanheusden.com\n");
-+ fprintf(stderr, "HTTPing v%s (C) 2003-2010 folkert@vanheusden.com\n", VERSION);
+- fprintf(stderr, "HTTPing v" VERSION ", (C) 2003-2011 folkert@vanheusden.com\n");
++ fprintf(stderr, "HTTPing v%s (C) 2003-2011 folkert@vanheusden.com\n", VERSION);
#ifndef NO_SSL
fprintf(stderr, "SSL support included\n");
#endif
-@@ -606,7 +608,7 @@ int main(int argc, char *argv[])
+@@ -639,7 +641,7 @@ int main(int argc, char *argv[])
if (useragent)
sprintf(&request[strlen(request)], "User-Agent: %s\r\n", useragent);
else