summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Sun2018-07-06 17:17:20 -0400
committerAndrew Sun2018-07-06 17:17:20 -0400
commit074d2523bdda1edbe684ff8f9d11dbe3ecd9541d (patch)
tree5a709dc6133ccbb6de574d4624d6b2c8eb4ae51d
downloadaur-074d2523bdda1edbe684ff8f9d11dbe3ecd9541d.tar.gz
add hexinject (version 1.6)
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD32
-rw-r--r--hexinject-1.6-fix-build-system.patch18
3 files changed, 66 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3ecdb70e4009
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = hexinject
+ pkgdesc = Network packet sniffer and injector
+ pkgver = 1.6
+ pkgrel = 1
+ url = http://hexinject.sourceforge.net/
+ arch = x86_64
+ license = BSD
+ depends = libpcap
+ depends = tcl
+ source = hexinject-1.6.tar.gz::http://downloads.sourceforge.net/project/hexinject/hexinject-1.6/hexinject-1.6.tar.gz
+ source = hexinject-1.6-fix-build-system.patch
+ sha256sums = 06e64636923af593c742129d81b717667223bff39918f26bf56809ead9700e65
+ sha256sums = cb410b131fd447f8b18b2e69bd35a0ae79df1689eb32f8ff97365eb8e250e8c5
+
+pkgname = hexinject
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..adacf9282a5b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,32 @@
+# Maintainer: Andrew Sun <adsun701@gmail.com>
+
+pkgname=hexinject
+pkgver=1.6
+pkgrel=1
+pkgdesc="Network packet sniffer and injector"
+arch=('x86_64')
+url="http://hexinject.sourceforge.net/"
+license=("BSD")
+depends=("libpcap" "tcl")
+source=("${pkgname}-${pkgver}.tar.gz"::"http://downloads.sourceforge.net/project/${pkgname}/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.gz"
+ "hexinject-1.6-fix-build-system.patch")
+sha256sums=('06e64636923af593c742129d81b717667223bff39918f26bf56809ead9700e65'
+ 'cb410b131fd447f8b18b2e69bd35a0ae79df1689eb32f8ff97365eb8e250e8c5')
+
+prepare() {
+ cd "${srcdir}/${pkgname}"
+ patch -Np1 -i "${srcdir}/hexinject-1.6-fix-build-system.patch"
+}
+
+build() {
+ cd "${srcdir}/${pkgname}"
+ make PREFIX=/usr
+}
+
+package() {
+ cd "${srcdir}/${pkgname}"
+ install -dm755 ${pkgdir}/usr/bin
+ for i in hexinject hex2raw prettypacket; do
+ install -m755 ${i} ${pkgdir}/usr/bin/${i}
+ done
+}
diff --git a/hexinject-1.6-fix-build-system.patch b/hexinject-1.6-fix-build-system.patch
new file mode 100644
index 000000000000..fbe91199bbfa
--- /dev/null
+++ b/hexinject-1.6-fix-build-system.patch
@@ -0,0 +1,18 @@
+Author: holgersson <holgersson@posteo.de>
+Date: Fri Oct 20 18:30:00 2017 +0200
+
+Don’t call gcc directly, and respect CFLAGS. As this project
+is plain C I don’t care fore CXXFLAGS here.
+
+--- a/Makefile 2017-10-20 18:15:11.743805540 +0200
++++ b/Makefile 2017-10-20 18:24:55.120009439 +0200
+@@ -1,6 +1,6 @@
+-CC = gcc
+-CFLAGS = -Wall
+-LDFLAGS = -lpcap
++CC ?= gcc
++CFLAGS += -Wall
++LDFLAGS = -lpcap
+
+ all:
+ $(CC) $(CFLAGS) $(LDFLAGS) -o hexinject hexinject.c