summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 740b3a0b4437454b10dd96e51e91e0b6d792de38 (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
40
41
42
43
44
45
# Maintainer: Dasith Gunawardhana <dasith@dg10a.com>

_pkgname=waypoint
pkgname=${_pkgname}-git
pkgver=42efa540
pkgrel=1
pkgdesc="Waypoint allows developers to define their application build, deploy, and release lifecycle as code, reducing the time to deliver deployments through a consistent and repeatable workflow."
arch=('x86_64')
url="https://www.waypointproject.io"
license=('MPL2')
depends=('glibc')
makedepends=('go' 'git' 'go-bindata')
conflicts=("${_pkgname}")
provides=("${_pkgname}")
source=("git+https://github.com/hashicorp/waypoint.git")
sha256sums=('SKIP')

pkgver() {
  cd ${_pkgname}
  git describe --always | sed 's/[- ]/_/g'
}

prepare() {
  mkdir -p gopath/src/github.com/hashicorp
  mkdir -p gopath/bin

  ln -rTsf ${_pkgname} gopath/src/github.com/hashicorp/${_pkgname}
  export GOPATH="$srcdir"/gopath
  export PATH="$PATH:$GOPATH/bin"
}

build() {
  export GOFLAGS="-gcflags=all=-trimpath=${PWD} -asmflags=all=-trimpath=${PWD} -ldflags=-extldflags=-zrelro -ldflags=-extldflags=-znow"

  cd gopath/src/github.com/hashicorp/${_pkgname}
  make bin

  unset GOFLAGS
}

package() {
  cd gopath/src/github.com/hashicorp/${_pkgname}
  install -Dm755 waypoint "$pkgdir"/usr/bin/waypoint
  install -m644 -D LICENSE "$pkgdir/usr/share/licenses/${_pkgname}/LICENSE"
}