summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 63821e287cb0e011c2b9fbdcc04997b81324067f (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
# Maintainer: theguy147 <yakamoz147 (at) protonmail (dot) com>
pkgname=cariddi-git
_pkgname=${pkgname%-git}
pkgver=v1.1.2.r0.g24e120d
pkgrel=1
pkgdesc='A web reconnaissance tool'
arch=('x86_64')
url="https://github.com/edoardottt/cariddi"
license=('GPL-3.0')
makedepends=('go>=1.13')
source=("${pkgname}::git+${url}.git")
sha256sums=('SKIP')

pkgver() {
  cd "${pkgname}"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cd "${pkgname}"
    go build \
        -trimpath \
        -buildmode=pie \
        -mod=readonly \
        -modcacherw \
        -ldflags "-s -w -linkmode external -extldflags \"${LDFLAGS}\"" \
        .
}

package() {
    cd "${pkgname}"
    install -Dm755 "${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
}