# This file is part of BlackArch Linux ( https://www.blackarch.org/ ). # See COPYING for license details. pkgname=cook pkgver=v2.2.1.r13.gbabf5ba pkgrel=1 epoch=1 groups=('blackarch' 'blackarch-automation') pkgdesc="Easily create word's permutation and combination to generate complex wordlists and passwords." arch=('x86_64' 'aarch64') url='https://github.com/giteshnxtlvl/cook' license=('MIT') makedepends=('git' 'go') source=("git+https://github.com/giteshnxtlvl/$pkgname.git") sha512sums=('SKIP') pkgver() { cd $pkgname git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' } build() { cd "$pkgname/v2/cmd/$pkgname" GOPATH="$srcdir" go mod init go.mod GOPATH="$srcdir" go mod tidy 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 "v2/cmd/$pkgname/$pkgname" "$pkgdir/usr/bin/$pkgname" install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md }