summaryrefslogtreecommitdiff
path: root/net/hping3
diff options
context:
space:
mode:
authorpettai <pettai@pkgsrc.org>2010-03-14 18:37:58 +0000
committerpettai <pettai@pkgsrc.org>2010-03-14 18:37:58 +0000
commit0d2ddca7f8eb296782b272486d72c6061cedfe02 (patch)
treef2c972220e3a06fac7e4b4b049e6a6e17af18110 /net/hping3
parente97156a9bda4975bbba74f56c34e1ee7630a35e2 (diff)
downloadpkgsrc-0d2ddca7f8eb296782b272486d72c6061cedfe02.tar.gz
hping3 is a command-line oriented TCP/IP packet assembler/analyzer.
The interface is inspired to the ping(8) unix command, but hping isn't only able to send ICMP echo requests. It supports TCP, UDP, ICMP and RAW-IP protocols, has a traceroute mode, the ability to send files between a covered channel, and many other features.
Diffstat (limited to 'net/hping3')
-rw-r--r--net/hping3/DESCR6
-rw-r--r--net/hping3/Makefile36
-rw-r--r--net/hping3/PLIST3
-rw-r--r--net/hping3/distinfo8
-rw-r--r--net/hping3/options.mk16
-rw-r--r--net/hping3/patches/patch-aa48
-rw-r--r--net/hping3/patches/patch-ab21
-rw-r--r--net/hping3/patches/patch-ac12
8 files changed, 150 insertions, 0 deletions
diff --git a/net/hping3/DESCR b/net/hping3/DESCR
new file mode 100644
index 00000000000..987e29d0938
--- /dev/null
+++ b/net/hping3/DESCR
@@ -0,0 +1,6 @@
+hping is a command-line oriented TCP/IP packet assembler/analyzer.
+
+The interface is inspired to the ping(8) unix command, but hping isn't
+only able to send ICMP echo requests. It supports TCP, UDP, ICMP and RAW-IP
+protocols, has a traceroute mode, the ability to send files between a
+covered channel, and many other features.
diff --git a/net/hping3/Makefile b/net/hping3/Makefile
new file mode 100644
index 00000000000..d0f49f66c24
--- /dev/null
+++ b/net/hping3/Makefile
@@ -0,0 +1,36 @@
+# $NetBSD: Makefile,v 1.1.1.1 2010/03/14 18:37:58 pettai Exp $
+#
+
+DISTNAME= hping3-alpha-2
+PKGNAME= hping3-3a2
+CATEGORIES= net
+MASTER_SITES= http://wiki.hping.org/uploadedfiles/101/
+
+MAINTAINER= pancake@phreaker.net
+HOMEPAGE= http://wiki.hping.org/
+COMMENT= Command-line oriented TCP/IP packet assembler/analyzer
+LICENSE= gnu-gpl-v2
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+SUBST_CLASSES+= paths
+SUBST_FILES.paths= ${WRKSRC}/configure
+SUBST_FILES.paths+= ${WRKSRC}/Makefile.in
+SUBST_STAGE.paths= post-patch
+SUBST_SED.paths= -e 's,@PREFIX@,${PREFIX},g'
+
+USE_TOOLS= gmake
+USE_PKGLOCALEDIR= yes
+HAS_CONFIGURE= yes
+
+CONFIGURE_ENV+= INSTALL_MANPATH=${PKGMANDIR}
+
+INSTALLATION_DIRS= sbin ${PKGMANDIR}/man8
+
+.include "options.mk"
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/hping3 ${DESTDIR}${PREFIX}/sbin/
+ ${INSTALL_MAN} ${WRKSRC}/docs/hping3.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/net/hping3/PLIST b/net/hping3/PLIST
new file mode 100644
index 00000000000..2afd39ab444
--- /dev/null
+++ b/net/hping3/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2010/03/14 18:37:58 pettai Exp $
+man/man8/hping3.8
+sbin/hping3
diff --git a/net/hping3/distinfo b/net/hping3/distinfo
new file mode 100644
index 00000000000..0f322e96aa6
--- /dev/null
+++ b/net/hping3/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1.1.1 2010/03/14 18:37:58 pettai Exp $
+
+SHA1 (hping3-alpha-2.tar.gz) = 4115f74f234730e1bd6470f4ffb0f30e3759e56d
+RMD160 (hping3-alpha-2.tar.gz) = a1e43a2e4be64657dd7aa49a8211692d6b1673c3
+Size (hping3-alpha-2.tar.gz) = 573396 bytes
+SHA1 (patch-aa) = 25c2d447d8cc0374a27fa3de4e8bc0c1cfa2ce6c
+SHA1 (patch-ab) = 1e180dc738365757103316d8b00f81873db28e9b
+SHA1 (patch-ac) = cef340ccd49c676093d920797c65ce2ece7eb577
diff --git a/net/hping3/options.mk b/net/hping3/options.mk
new file mode 100644
index 00000000000..a941362b083
--- /dev/null
+++ b/net/hping3/options.mk
@@ -0,0 +1,16 @@
+# $NetBSD: options.mk,v 1.1.1.1 2010/03/14 18:37:58 pettai Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.hping3
+PKG_SUPPORTED_OPTIONS= tcl
+PKG_SUGGESTED_OPTIONS=
+
+.include "../../mk/bsd.options.mk"
+
+###
+### TCL scripting support
+###
+.if !empty(PKG_OPTIONS:Mtcl)
+.include "../../lang/tcl/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --no-tcl
+.endif
diff --git a/net/hping3/patches/patch-aa b/net/hping3/patches/patch-aa
new file mode 100644
index 00000000000..0e54c5337f1
--- /dev/null
+++ b/net/hping3/patches/patch-aa
@@ -0,0 +1,48 @@
+$NetBSD: patch-aa,v 1.1.1.1 2010/03/14 18:37:58 pettai Exp $
+
+--- configure.orig 2004-06-04 08:39:10.000000000 +0200
++++ configure 2010-01-26 23:07:03.000000000 +0100
+@@ -20,7 +20,7 @@
+
+ INSTALL_MANPATH=`echo $MANPATH|cut -f1 -d:`
+ if [ "$INSTALL_MANPATH" = "" ]; then
+- INSTALL_MANPATH="/usr/local/man"
++ INSTALL_MANPATH="@PREFIX@/man"
+ fi
+ BYTEORDER=`./byteorder -m`
+
+@@ -61,7 +61,7 @@
+ #
+ # TCL detection
+ #
+-for TCLPATH_TRY in "/usr/bin/" "/usr/local/bin/" "/bin/"
++for TCLPATH_TRY in "/usr/bin/" "@PREFIX@/bin/" "/bin/"
+ do
+ for TCLVER_TRY in "8.4" "8.3" "8.2" "8.1" "8.0"
+ do
+@@ -84,12 +84,12 @@
+ if [ -e /usr/include/tcl${TCL_VER} ]
+ then
+ TCL_INC="-I/usr/include/tcl${TCL_VER}"
+- elif [ -e /usr/include/tcl.h ]
++ elif [ -e @PREFIX@/include/tcl.h ]
+ then
+- TCL_INC=""
+- elif [ -e /usr/local/include/tcl${TCL_VER} ]
++ TCL_INC="-I@PREFIX@/include"
++ elif [ -e @PREFIX@/include/tcl${TCL_VER} ]
+ then
+- TCL_INC="-I/usr/local/include/tcl${TCL_VER}"
++ TCL_INC="-I@PREFIX@/include/tcl${TCL_VER}"
+ else
+ USE_TCL=""
+ TCL_LIB=""
+@@ -98,7 +98,7 @@
+ fi
+ if [ -n $USE_TCL ]
+ then
+- LIBPOSTFIX=`ls -1 /usr/local/lib/ /usr/lib | grep 'libtcl[0-9]' | grep so | sed -e 's/\.so.*//g' -e 's/libtcl//g' | sort -r | head -1`
++ LIBPOSTFIX=`ls -1 @PREFIX@/lib/ /usr/lib | grep 'libtcl[0-9]' | grep so | sed -e 's/\.so.*//g' -e 's/libtcl//g' | sort -r | head -1`
+ TCL_LIB="-ltcl${LIBPOSTFIX} -lm -lpthread"
+ fi
+
diff --git a/net/hping3/patches/patch-ab b/net/hping3/patches/patch-ab
new file mode 100644
index 00000000000..ca337963030
--- /dev/null
+++ b/net/hping3/patches/patch-ab
@@ -0,0 +1,21 @@
+$NetBSD: patch-ab,v 1.1.1.1 2010/03/14 18:37:58 pettai Exp $
+
+--- Makefile.in.orig 2004-04-10 01:38:56.000000000 +0200
++++ Makefile.in 2010-01-26 23:35:22.000000000 +0100
+@@ -50,14 +50,14 @@
+ $(RANLIB) $@
+
+ hping3: byteorder.h $(OBJ)
+- $(CC) -o hping3 $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@
++ $(CC) -o hping3 $(CCOPT) $(DEBUG) $(OBJ) -L@PREFIX@/lib -R@PREFIX@/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@
+ @echo
+ ./hping3 -v
+ @echo "use \`make strip' to strip hping3 binary"
+ @echo "use \`make install' to install hping3"
+
+ hping3-static: byteorder.h $(OBJ)
+- $(CC) -static -o hping3-static $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@ -ldl
++ $(CC) -static -o hping3-static $(CCOPT) $(DEBUG) $(OBJ) -L@PREFIX@/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@ -ldl
+
+ byteorder.h:
+ ./configure
diff --git a/net/hping3/patches/patch-ac b/net/hping3/patches/patch-ac
new file mode 100644
index 00000000000..f4d9f6515cf
--- /dev/null
+++ b/net/hping3/patches/patch-ac
@@ -0,0 +1,12 @@
+$NetBSD: patch-ac,v 1.1.1.1 2010/03/14 18:37:58 pettai Exp $
+
+--- bytesex.h.orig 2010-01-26 22:26:08.000000000 +0100
++++ bytesex.h 2010-01-26 22:26:39.000000000 +0100
+@@ -8,6 +8,7 @@
+ #define ARS_BYTESEX_H
+
+ #if defined(__i386__) \
++ || defined(__amd64__) \
+ || defined(__alpha__) \
+ || (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__)))
+ #define BYTE_ORDER_LITTLE_ENDIAN