aboutsummaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorSteven King <kingrst@gmail.com>2010-07-08 04:07:07 -0500
committerRobby Workman <rworkman@slackbuilds.org>2010-07-08 04:07:07 -0500
commit57f728e24f153365d3a42a95f5e771fb70d8bf88 (patch)
tree63860b76e5f32bc649210581718d557df6c93b2d /network
parent16fb03863432da273b553a9cdcf5cfeac37180fe (diff)
network/httping: Added (HTTP Request ping)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'network')
-rw-r--r--network/httping/README6
-rw-r--r--network/httping/httping.SlackBuild96
-rw-r--r--network/httping/httping.info10
-rw-r--r--network/httping/patches/str.c.patch23
-rw-r--r--network/httping/patches/str.h.patch9
-rw-r--r--network/httping/slack-desc19
6 files changed, 163 insertions, 0 deletions
diff --git a/network/httping/README b/network/httping/README
new file mode 100644
index 000000000000..d941a039cf0d
--- /dev/null
+++ b/network/httping/README
@@ -0,0 +1,6 @@
+Httping is like 'ping' but for http-requests.
+
+Give it a URL, and it will 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, so it measures the
+latency of the webserver plus network.
diff --git a/network/httping/httping.SlackBuild b/network/httping/httping.SlackBuild
new file mode 100644
index 000000000000..c078b1f1302f
--- /dev/null
+++ b/network/httping/httping.SlackBuild
@@ -0,0 +1,96 @@
+#!/bin/sh
+
+# Slackware build script for HTTPing
+
+# Copyright 2010, Steven King <kingrst@gmail.com>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=httping
+VERSION=${VERSION:-1.4.1}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar vxzf $CWD/${PRGNAM}-$VERSION.tgz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+patch str.h $CWD/patches/str.h.patch
+patch str.c $CWD/patches/str.c.patch
+
+make \
+ OFLAGS="$SLKCFLAGS" \
+ MANDIR=/usr/man \
+ DOCDIR=/usr/doc/$PRGNAM-$VERSION
+make install \
+ MANDIR=/usr/man \
+ DOCDIR=/usr/doc/$PRGNAM-$VERSION \
+ DESTDIR=$PKG
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/bin
+cp -a httping $PKG/usr/bin/
+
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/network/httping/httping.info b/network/httping/httping.info
new file mode 100644
index 000000000000..20f002979885
--- /dev/null
+++ b/network/httping/httping.info
@@ -0,0 +1,10 @@
+PRGNAM="httping"
+VERSION="1.4.1"
+HOMEPAGE="http://www.vanheusden.com/httping/"
+DOWNLOAD="http://www.vanheusden.com/httping/httping-1.4.1.tgz"
+MD5SUM="bde1ff3c01343d2371d8f34fbf8a1d9a"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Steven King"
+EMAIL="kingrst@gmail.com"
+APPROVED="rworkman"
diff --git a/network/httping/patches/str.c.patch b/network/httping/patches/str.c.patch
new file mode 100644
index 000000000000..ae476307546a
--- /dev/null
+++ b/network/httping/patches/str.c.patch
@@ -0,0 +1,23 @@
+--- httping-1.4.1/str.c 2010-01-10 15:35:22.000000000 -0500
++++ str.c 2010-07-08 00:20:04.633607710 -0400
+@@ -19,13 +19,13 @@
+ #include "utils.h"
+
+ #ifndef _GNU_SOURCE
+-char *strndup(char *in, int size)
+-{
+- char *out = mymalloc(size + 1, "strndup");
++//char *strndup(char *in, int size)
++//{
++// char *out = mymalloc(size + 1, "strndup");
+
+- memcpy(out, in, size);
+- out[size] = 0x00;
++// memcpy(out, in, size);
++// out[size] = 0x00;
+
+- return out;
+-}
++// return out;
++//}
+ #endif
diff --git a/network/httping/patches/str.h.patch b/network/httping/patches/str.h.patch
new file mode 100644
index 000000000000..e7339959c9eb
--- /dev/null
+++ b/network/httping/patches/str.h.patch
@@ -0,0 +1,9 @@
+--- httping-1.4.1/str.h 2010-01-10 15:35:22.000000000 -0500
++++ str.h 2010-07-08 00:20:04.633607710 -0400
+@@ -16,5 +16,5 @@
+ #include <string.h>
+
+ #ifndef _GNU_SOURCE
+-char *strndup(char *in, int size);
++//char *strndup(char *in, int size);
+ #endif
diff --git a/network/httping/slack-desc b/network/httping/slack-desc
new file mode 100644
index 000000000000..e6fad314c9de
--- /dev/null
+++ b/network/httping/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+httping: HTTPing (HTTP Request ping)
+httping:
+httping: HTTPing is like ping but for http-requests.
+httping:
+httping: Give it a URL, and it will show you how long it takes to connec, send
+httping: a request and receive the reply (only the headers). Be aware that the
+httping: transmission across the network also takes ! So it measures the
+httping: latency of the webserver + network.
+httping:
+httping: Homepage: http://www.vanheusden.com/httping/
+httping: