bettercap: fix build error in docker image

This commit is contained in:
Henrik Grimler 2019-07-21 11:36:41 +02:00 committed by Yaksh Bariya
parent 3698b96d38
commit e46107874e
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
2 changed files with 21 additions and 3 deletions

View File

@ -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 .

View File

@ -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
}