added community/hping

This commit is contained in:
Kevin Mihelich 2012-11-18 01:20:45 +00:00
parent 19aebaa4f4
commit 51fabc288e
3 changed files with 88 additions and 0 deletions

View file

@ -0,0 +1,30 @@
diff -Naur hping3-20051105/Makefile hping3-20051105-new/Makefile
--- hping3-20051105/Makefile 2005-11-05 05:31:41.000000000 -0500
+++ hping3-20051105-new/Makefile 2009-02-26 03:21:46.000000000 -0500
@@ -72,16 +72,18 @@
rm -rf hping3 *.o byteorder byteorder.h systype.h Makefile libars.a .depend
install: hping3
- cp -f hping3 /usr/sbin/
- chmod 755 /usr/sbin/hping3
- ln -s /usr/sbin/hping3 /usr/sbin/hping
- ln -s /usr/sbin/hping3 /usr/sbin/hping2
- @if [ -d ${INSTALL_MANPATH}/man8 ]; then \
- cp ./docs/hping3.8 ${INSTALL_MANPATH}/man8; \
- chmod 644 ${INSTALL_MANPATH}/man8/hping3.8; \
+ @[ ! -d ${DESTDIR}/usr/sbin ] && install -d ${DESTDIR}/usr/sbin
+ cp -f hping3 ${DESTDIR}/usr/sbin/
+ chmod 755 ${DESTDIR}/usr/sbin/hping3
+ ln -s /usr/sbin/hping3 ${DESTDIR}/usr/sbin/hping
+ ln -s /usr/sbin/hping3 ${DESTDIR}/usr/sbin/hping2
+ @[ ! -d ${DESTDIR}${INSTALL_MANPATH}/man8 ] && install -d ${DESTDIR}${INSTALL_MANPATH}/man8
+ @if [ -d ${DESTDIR}${INSTALL_MANPATH}/man8 ]; then \
+ cp ./docs/hping3.8 ${DESTDIR}${INSTALL_MANPATH}/man8; \
+ chmod 644 ${DESTDIR}${INSTALL_MANPATH}/man8/hping3.8; \
else \
echo "@@@@@@ WARNING @@@@@@"; \
- echo "Can't install the man page: ${INSTALL_MANPATH}/man8 does not exist"; \
+ echo "Can't install the man page: ${DESTDIR}${INSTALL_MANPATH}/man8 does not exist"; \
fi
strip: hping3

39
community/hping/PKGBUILD Normal file
View file

@ -0,0 +1,39 @@
# $Id: PKGBUILD 57877 2011-11-04 07:45:07Z lfleischer $
# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor: Kevin Piche <kevin@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - added ARM to bytesex.h.patch
pkgname=hping
pkgver=3.0.0
pkgrel=2
pkgdesc='A command-line oriented TCP/IP packet assembler/analyzer.'
arch=('i686' 'x86_64')
url='http://www.hping.org'
license=('GPL2' 'BSD')
depends=('libpcap')
source=("http://www.hping.org/hping3-20051105.tar.gz"
'Makefile.patch'
'bytesex.h.patch')
md5sums=('ca4ea4e34bcc2162aedf25df8b2d1747'
'3c6f920201fc980d377408917a28df93'
'e49b0297610b071bb66951dfb983816a')
build() {
cd "${srcdir}/hping3-20051105"
patch -Np1 -i ../bytesex.h.patch
MANPATH=/usr/share/man ./configure --no-tcl
make
}
package() {
cd "${srcdir}/hping3-20051105"
patch -p1 < ../Makefile.patch
make DESTDIR="${pkgdir}" install
install -Dm0644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

View file

@ -0,0 +1,19 @@
diff -urN a/bytesex.h b/bytesex.h
--- a/bytesex.h 2003-08-31 11:23:48.000000000 -0600
+++ b/bytesex.h 2012-11-17 13:19:37.316298605 -0700
@@ -9,11 +9,15 @@
#if defined(__i386__) \
|| defined(__alpha__) \
+ || defined(__x86_64__) \
+ || defined(__ia64__) \
+ || defined(__arm__) \
|| (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__)))
#define BYTE_ORDER_LITTLE_ENDIAN
#elif defined(__mc68000__) \
|| defined (__sparc__) \
|| defined (__sparc) \
+ || defined (__hppa__) \
|| defined (__PPC__) \
|| defined (__BIG_ENDIAN__) \
|| (defined(__mips__) && (defined(MIPSEB) || defined (__MIPSEB__)))