Skip to content

Instantly share code, notes, and snippets.

@shibumi
Created September 24, 2019 12:47
Show Gist options
  • Save shibumi/6f3bee4e7f80efa52bef8669d595bd9c to your computer and use it in GitHub Desktop.
Save shibumi/6f3bee4e7f80efa52bef8669d595bd9c to your computer and use it in GitHub Desktop.
# Maintainer: Andrea 'alephZer0' Gómez <crypto.andrea at protonmail dot ch> -> https://github.com/da-edra
pkgname=arpfox
pkgver=0.9.9
pkgrel=1
pkgdesc="An arpspoof alternative written in Go that injects specially crafted ARP packets into a LAN."
arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64')
url="https://github.com/malfunkt/arpfox"
license=('MIT')
depends=('libpcap')
# We want to use go-pie for position-independend-code
makedepends=('go-pie')
provides=("arpfox")
conflicts=("arpfox")
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/malfunkt/arpfox/archive/v${pkgver}.tar.gz")
sha256sums=('50f151a0b8bcd309e77e7d9f83b1badaf14ba085f8fc85d5e23c0d1923c2550e')
prepare() {
# We use the new go modules, because we want reproducible builds
# This way we always get the same dependencies installed with the same arpfox
# version
export GO111MODULE=on
}
build() {
# We use Go modules, so we can just directly call `go build`
# We don't need to use $srcdir, because inside of a PKGBUILD we are already
# inside of $srcdir
cd "${pkgname}-${pkgver}"
go build
}
package() {
cd "${pkgname}-${pkgver}"
# We install the binary and license via install
# because the `make install` routine is not doing what we expect
# it's just creating an `install` script and is not actually installing it in
# the right path
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dsm755 arpfox "${pkgdir}/usr/bin/arpfox"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment