summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c7fe640a355e7f0e11831ad470f5e143072d6de3 (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
# Maintainer : adytzu2007 <adybac at gmail {dot} com>

pkgname=serf-git
_pkgver=0.5
pkgver=0.6.4.r12.g320787d
pkgrel=1
pkgdesc="Service discovery and orchestration"
arch=('i686' 'x86_64')
url=("http://www.serfdom.io/")
license=('MPL')
makedepends=('go')
_gitroot='https://github.com/hashicorp/serf.git'
_gitname='serf'
_gitbranch='master'
source=("${_gitname}::git+${_gitroot}#branch=${_gitbranch}")
sha256sums=("SKIP")

build()
{
    cd "${srcdir}"

    # create a temporary go workspace
    mkdir -p src bin
    export GOPATH="${PWD}"

    cd "${srcdir}/src/${_gitname}"
    make
}

package()
{
  install -D -m755 "${srcdir}/bin/serf" "${pkgdir}/usr/bin/serf"
}

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