From e46107874ee0fb8b122698550e5894a9a196cd72 Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Sun, 21 Jul 2019 11:36:41 +0200 Subject: [PATCH] bettercap: fix build error in docker image --- root-packages/bettercap/Makefile.patch | 13 +++++++++++++ root-packages/bettercap/build.sh | 11 ++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 root-packages/bettercap/Makefile.patch diff --git a/root-packages/bettercap/Makefile.patch b/root-packages/bettercap/Makefile.patch new file mode 100644 index 000000000..fb89f0b34 --- /dev/null +++ b/root-packages/bettercap/Makefile.patch @@ -0,0 +1,13 @@ +--- ../Makefile.orig 2019-07-21 08:51:17.175911022 +0000 ++++ ./Makefile 2019-07-21 09:35:21.844941292 +0000 +@@ -22,8 +22,8 @@ + @rm -rf build + + install: +- @mkdir -p /usr/local/share/bettercap/caplets +- @cp bettercap /usr/local/bin/ ++ @mkdir -p @TERMUX_PREFIX@/share/bettercap/caplets ++ @cp bettercap @TERMUX_PREFIX@/bin/ + + docker: + @docker build -t bettercap:latest . diff --git a/root-packages/bettercap/build.sh b/root-packages/bettercap/build.sh index b72c1bfd0..8feeb3d7b 100644 --- a/root-packages/bettercap/build.sh +++ b/root-packages/bettercap/build.sh @@ -2,20 +2,25 @@ TERMUX_PKG_HOMEPAGE=https://www.bettercap.org TERMUX_PKG_DESCRIPTION="The Swiss Army knife for 802.11, BLE and Ethernet networks reconnaissance and MITM attacks" TERMUX_PKG_LICENSE="GPL-3.0" TERMUX_PKG_VERSION=2.24.1 -TERMUX_PKG_REVISION=1 TERMUX_PKG_SRCURL=https://github.com/bettercap/bettercap/archive/v${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SHA256=590cef2b2b24fd9f67c57c8cb19ab8ff08b11d43bfc23b468013ddad907bb8b8 TERMUX_PKG_DEPENDS="libpcap, libusb" -TERMUX_PKG_BUILD_IN_SRC=yes termux_step_configure() { termux_setup_golang + export GOPATH=$TERMUX_PKG_BUILDDIR + + mkdir -p "$GOPATH"/src/github.com/bettercap/ + cp -a "$TERMUX_PKG_SRCDIR" "$GOPATH"/src/github.com/bettercap/bettercap + go get github.com/bettercap/recording } termux_step_make() { + cd src/github.com/bettercap/bettercap make build } termux_step_make_install() { - install bettercap $TERMUX_PREFIX/bin/ + cd src/github.com/bettercap/bettercap + make install }