httping: merge r27857, r27985
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 4 Feb 2012 20:00:32 +0000 (20:00 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 4 Feb 2012 20:00:32 +0000 (20:00 +0000)
SVN-Revision: 30097

net/httping/Makefile
net/httping/patches/001-extra_flags.patch [deleted file]
net/httping/patches/002-version.patch

index 0a11935adfdaec809acf1eb37f18ce9111e7e06c..a2c611819651fcfd12f12a07afa2ac8b1f544dac 100644 (file)
@@ -1,5 +1,5 @@
 #
-# 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.
@@ -8,37 +8,69 @@
 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))
diff --git a/net/httping/patches/001-extra_flags.patch b/net/httping/patches/001-extra_flags.patch
deleted file mode 100644 (file)
index c259dc9..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---- 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)
index ed5553bb91ff98f467ac3fba74ed77bfef5651a1..23c12e9380776d935e312419e79345f705aa51f1 100644 (file)
@@ -4,7 +4,7 @@
  #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