aboutsummaryrefslogtreecommitdiffstats
path: root/testing/bettercap/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/bettercap/APKBUILD')
-rw-r--r--testing/bettercap/APKBUILD18
1 files changed, 14 insertions, 4 deletions
diff --git a/testing/bettercap/APKBUILD b/testing/bettercap/APKBUILD
index 23aefaed0c9..4e01eab74e6 100644
--- a/testing/bettercap/APKBUILD
+++ b/testing/bettercap/APKBUILD
@@ -2,13 +2,23 @@
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=bettercap
pkgver=2.32.0
-pkgrel=1
+pkgrel=19
pkgdesc="The Swiss Army knife for 802.11, BLE and Ethernet networks reconnaissance and MITM attacks"
url="https://www.bettercap.org"
arch="all"
license="GPL-3.0-only"
makedepends="libusb-dev libnetfilter_queue-dev libpcap-dev linux-headers go"
-source="$pkgname-$pkgver.tar.gz::https://github.com/bettercap/bettercap/archive/refs/tags/v$pkgver.tar.gz"
+source="https://github.com/bettercap/bettercap/archive/refs/tags/v$pkgver/bettercap-v$pkgver.tar.gz"
+
+export GOFLAGS="$GOFLAGS -modcacherw -trimpath"
+
+# github.com/chifflier/nfqueue-go/nfqueue 2017-02-22 does not include
+# <sys/types.h> for these types, this is the easiest patch
+export CGO_CFLAGS="$CFLAGS -Du_int32_t=uint32_t -Du_int16_t=uint16_t -Du_int8_t=uint8_t"
+
+export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
+export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
+export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
build() {
go build -o "$builddir/bettercap" .
@@ -19,9 +29,9 @@ check() {
}
package() {
- install -Dm755 "$builddir/bettercap" "$pkgdir/usr/bin/bettercap"
+ install -Dm755 "$builddir"/bettercap -t "$pkgdir"/usr/bin
}
sha512sums="
-0728d2dab0c0a07fdfd91490f450be46b004ae994024bfdb6ef1b7ecac8044c4c70da9fdf986b9b31033c9698fb63e4f619604095727fb26d9ba2abc233b27d1 bettercap-2.32.0.tar.gz
+0728d2dab0c0a07fdfd91490f450be46b004ae994024bfdb6ef1b7ecac8044c4c70da9fdf986b9b31033c9698fb63e4f619604095727fb26d9ba2abc233b27d1 bettercap-v2.32.0.tar.gz
"