summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a1e43c205889f2c85e871e8e6a312451c27a347e (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=analyticsrelationships-git
_pkgname=${pkgname%-git}
pkgver=r14.c920eed
pkgrel=1
pkgdesc='Get related domains / subdomains by looking at Google Analytics IDs'
arch=('x86_64')
url="https://github.com/Josue87/AnalyticsRelationships"
license=('GPL-3.0')
makedepends=('go>=1.13')
source=("${pkgname}::git+${url}.git")
sha256sums=('SKIP')

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

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"
}