summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD25
2 files changed, 16 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d846198ce0f..c4b749c85b2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,12 @@
pkgbase = bettercap-git
pkgdesc = Swiss army knife for network attacks and monitoring
- pkgver = 2.21.1.1656.4713d25
+ pkgver = 2.27.1.1844.318029c
pkgrel = 1
url = https://github.com/bettercap/bettercap
arch = x86_64
license = GPL3
- makedepends = go-pie
+ makedepends = go
makedepends = git
- makedepends = dep
depends = libpcap
depends = libnetfilter_queue
depends = iproute2
diff --git a/PKGBUILD b/PKGBUILD
index 75c1b8d7695..0be66301114 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,14 +1,14 @@
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
pkgname=bettercap-git
-pkgver=2.21.1.1656.4713d25
+pkgver=2.27.1.1844.318029c
pkgrel=1
pkgdesc='Swiss army knife for network attacks and monitoring'
url='https://github.com/bettercap/bettercap'
arch=('x86_64')
license=('GPL3')
depends=('libpcap' 'libnetfilter_queue' 'iproute2' 'glibc' 'libnfnetlink')
-makedepends=('go-pie' 'git' 'dep')
+makedepends=('go' 'git')
optdepends=('bettercap-caplets: scripts (caplets) and proxy modules')
provides=('bettercap')
conflicts=('bettercap')
@@ -21,23 +21,26 @@ pkgver() {
"$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
-prepare(){
- export GOPATH="${srcdir}/go"
- mkdir -p go/src/github.com/bettercap
- ln -rTsf ${pkgname} go/src/github.com/bettercap/bettercap
- sed -E "s|(go build)|\\1 -ldflags -linkmode external -extldflags \"${LDFLAGS}\"|" -i ${pkgname}/Makefile
+prepare() {
+ cd ${pkgname}
+ find . -type f -exec sed 's|/usr/local|/usr|g' -i {} +
}
build() {
- cd go/src/github.com/bettercap/bettercap
- export GOPATH="${srcdir}/go"
- dep ensure
- go build -o bettercap
+ cd ${pkgname}
+ export GO11MODULE=on
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath"
+ go build
}
package() {
cd ${pkgname}
install -Dm 755 bettercap -t "${pkgdir}/usr/bin"
+ install -Dm 644 bettercap.service -t "${pkgdir}/usr/lib/systemd/system"
install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}