summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD25
1 files changed, 14 insertions, 11 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 75c1b8d7695b..0be663011141 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}"
}