summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c98ef84da181d718ba6986af705f7b5bbbe49d45 (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
# Maintainer: Amin Vakil <info at aminvakil dot com>

_pkgname=tsunami-security-scanner
pkgname=google-tsunami-security-scanner-git
pkgver=r181.c3827bc
pkgrel=1
pkgdesc="A general purpose network security scanner with an extensible plugin system for detecting high severity vulnerabilities with high confidence"
arch=(any)
conflicts=('google-tsunami-security-scanner')
url="https://github.com/google/tsunami-security-scanner"
license=('Apache')
makedepends=("git")
depends=('nmap>=7.80' 'ncrack>=0.7' 'java-runtime<12')
source=("git+${url}.git")

sha256sums=('SKIP')

pkgver() {
  cd "${_pkgname}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd ${srcdir}/${_pkgname}
    ./gradlew shadowJar
}
package() {
    appdir="${pkgdir}/opt/${_pkgname}"
    jar=$(find ${srcdir} -name 'tsunami-main-*-cli.jar')
    jar_filename=$(basename -- "${jar}")

    mkdir -p "${appdir}"
    install ${jar} "${appdir}/${jar_filename}"
    install "${srcdir}/${_pkgname}/tsunami.yaml" "${appdir}"
}