summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7fce2ac271dc0b275dcda1ab5923b6464fc6deb2 (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: Nikolay Arhipovs <nikolajs.arhipovs@gmail.com>

pkgname=wuzz-git
_pkgname=wuzz
pkgver=0.4.0.r0.gef041bc
pkgrel=1
pkgdesc="Interactive cli tool for HTTP inspection"
arch=('x86_64' 'i686')
url="https://github.com/asciimoo/wuzz"
license=('AGPL3')
makedepends=('go' 'git')
provides=('wuzz')
conflicts=('wuzz')
options=('!strip' '!emptydirs')
source=("git+https://github.com/asciimoo/wuzz.git")
sha256sums=("SKIP")
_goname="github.com/asciimoo/wuzz"

pkgver() {
    cd "$SRCDEST/$_pkgname"
    git describe --long --tags 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    rm -rf gopath
    mkdir -p gopath/src/$_goname
    mv "$srcdir/$_pkgname/"* "gopath/src/$_goname"
    cd "gopath/src/$_goname"
    env GOPATH="$srcdir/gopath" go get -v
}

package() {
    mkdir -p "$pkgdir/usr/bin"
    install -D -m 755 "$srcdir/gopath/bin/$_pkgname" "$pkgdir/usr/bin"
}