# This file is part of BlackArch Linux ( https://www.blackarch.org/ ). # See COPYING for license details. pkgname=gobuster pkgver=367.308cf9f pkgrel=1 epoch=2 pkgdesc='Directory/file & DNS busting tool written in Go.' arch=('x86_64' 'aarch64') url='https://github.com/OJ/gobuster' groups=('blackarch' 'blackarch-webapp' 'blackarch-scanner') license=('Apache') makedepends=('git' 'go') source=("git+https://github.com/OJ/$pkgname.git") sha512sums=('SKIP') pkgver() { cd $pkgname echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD) } build() { cd $pkgname GOPATH="$srcdir" go mod download GOPATH="$srcdir" go build \ -trimpath \ -buildmode=pie \ -mod=readonly \ -modcacherw \ -ldflags "-s -w" \ -o $pkgname . } package() { cd $pkgname install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname" install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" }