summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 302f01536b917ffc5fce445fd2305af25ff3cc10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Maintainer: taotieren <admin@taotieren.com>

pkgname=turbo-attack-git
pkgver=0.1.0
pkgrel=3
pkgdesc="A turbo traffic generator pentesting tool to generate random traffic with random mac and ip addresses in addition to random sequence numbers to a particular ip and port."
arch=(aarch64
    riscv64
    x86_64)
url="https://github.com/mytechnotalent/turbo-attack"
license=('Apache-2.0')
provides=(${pkgname%-git})
conflicts=(${pkgname%-git})
#replaces=(${pkgname})
depends=(glibc
    sudo)
optdepends=("turbo-scanner: A port scanner and service detection tool that uses 1000 goroutines at once to scan any hosts's ip or fqdn with the sole purpose of testing your own network to ensure there are no malicious services running.")
makedepends=(git
    go)
checkdepends=()
backup=()
options=()
#install=${pkgname}.install
source=("${pkgname}::git+${url}.git")
sha256sums=('SKIP')

pkgver() {
    cd "${srcdir}/${pkgname}"
    git describe --tags --always | sed 's/^v//;s/-/./g'
}

prepare()
{
    git -C "${srcdir}/${pkgname}" clean -dfx
}

build() {
    cd "${srcdir}/${pkgname}"
    export CGO_CPPFLAGS="${CPPFLAGS}"
    export CGO_CFLAGS="${CFLAGS}"
    export CGO_CXXFLAGS="${CXXFLAGS}"
    export CGO_LDFLAGS="${LDFLAGS}"
    export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"

    mkdir -pv build/
    go build -o build
}

# check() {
#     cd "${srcdir}/${pkgname}"
#     go test -v -cover ./...
#     go test -coverprofile=coverage.out ./...
#     go tool cover -html=coverage.out
# }

package() {
    cd "${srcdir}/${pkgname}"

    install -Dm755 build/${pkgname%-git} -t ${pkgdir}/usr/bin/
}