# Maintainer: CodingKoala # Contributor: architekton pkgname=amass pkgver=3.21.2 pkgrel=1 pkgdesc="In-depth Attack Surface Mapping and Asset Discovery" arch=('any') url="https://github.com/OWASP/Amass" license=('Apache') makedepends=('go' 'git') source=(Amass-$pkgver.tar.gz::https://github.com/OWASP/Amass/archive/v${pkgver}.tar.gz) sha512sums=('0b3aa2822c19598c8ff0826ff98a1915d260f5f5d7bd7310fd57e35dea2424ebad0b76e1ec0895f2e95fff67f6fcdc9de3ec93961d3e7b402b5db33a6a2efd36') build() { cd "Amass-$pkgver" mkdir bin go build \ -trimpath \ -ldflags "-extldflags $LDFLAGS" \ -v -o bin/ ./cmd/... } check() { cd "Amass-$pkgver" go test ./... # Remove golang mod cache otherwise makepkg clean doesn't work due to perms go clean -modcache } package() { cd "Amass-$pkgver" install -dm 755 "${pkgdir}/usr/share/${pkgname}" install -Dm 755 "bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" cp -a --no-preserve=ownership "examples/" "${pkgdir}/usr/share/${pkgname}" find "${pkgdir}/usr/share/${pkgname}/examples" -type d -exec chmod 755 {} \; find "${pkgdir}/usr/share/${pkgname}/examples" -type f -exec chmod 644 {} \; }