Added support for SSL
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 13 Feb 2006 12:58:34 +0000 (12:58 +0000)
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 13 Feb 2006 12:58:34 +0000 (12:58 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3232 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/httping/Config.in
package/httping/Makefile
package/httping/patches/01-honor_includes_lib-paths.patch [new file with mode: 0644]

index a818905..2b8ef02 100644 (file)
@@ -1,11 +1,21 @@
+menu "httping........................... Httping is like 'ping' but for http-requests."
+
 config BR2_PACKAGE_HTTPING
-       prompt "httping........................... Httping is like 'ping' but for http-requests."
+       prompt "httping.............................. Httping is like 'ping' but for http-requests."
        tristate
        default m if CONFIG_DEVEL
        help
-         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!
+               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!
+
+               http://www.vanheusden.com/httping/
+
+config BR2_PACKAGE_HTTPING_WITH_SSL
+       prompt "Enable SSL support"
+       bool
+       default y
+       select BR2_PACKAGE_HTTPING
 
-         http://www.vanheusden.com/httping/
+endmenu
index 05dd1c1..027aac9 100644 (file)
@@ -13,6 +13,12 @@ PKG_CAT:=zcat
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 
+PKG_DEPEND=libopenssl
+ifneq ($(BR2_PACKAGE_HTTPING_WITH_SSL),y)
+SSL_ENABLE:=".nossl"
+PKG_DEPEND:=""
+endif
+
 include $(TOPDIR)/package/rules.mk
 
 $(eval $(call PKG_template,HTTPING,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
@@ -21,13 +27,14 @@ $(PKG_BUILD_DIR)/.configured:
        touch $@
 
 $(PKG_BUILD_DIR)/.built:
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               CC=$(TARGET_CC)
+       $(MAKE) -C $(PKG_BUILD_DIR) -f $(PKG_BUILD_DIR)/Makefile$(SSL_ENABLE) \
+               CC=$(TARGET_CC) STAGING_DIR=$(STAGING_DIR)
        touch $@
 
 $(IPKG_HTTPING): 
        mkdir -p $(IDIR_HTTPING)/usr/sbin
-       $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_HTTPING)/usr/sbin/
+       echo "Depends: $(PKG_DEPEND)" >> $(IDIR_HTTPING)/CONTROL/control
+       cp $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_HTTPING)/usr/sbin/
        $(STRIP) $(IDIR_HTTPING)/usr/sbin/*
        $(IPKG_BUILD) $(IDIR_HTTPING) $(PACKAGE_DIR)
 
diff --git a/package/httping/patches/01-honor_includes_lib-paths.patch b/package/httping/patches/01-honor_includes_lib-paths.patch
new file mode 100644 (file)
index 0000000..92817c7
--- /dev/null
@@ -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
This page took 0.026495 seconds and 4 git commands to generate.