summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2b5738d5713e4843da80f72e45374c9bfce7b670 (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: Joris Coenen (joris.coenen @ domain of package url)
pkgname=secrethub-cli
pkgver=0.44.0
pkgrel=1
pkgdesc='Command Line Interface for SecretHub'
arch=('x86_64')
url="https://secrethub.io/"
license=('Apache')
makedepends=('go-pie')
optdepends=('xclip: Clipboard support' 'less: Improved pagination experience')
source=("$pkgname::git+https://github.com/secrethub/secrethub-cli.git#tag=v$pkgver")
sha256sums=('SKIP')

build() {
  cd $pkgname
  go build \
       -ldflags "-s -w -X "github.com/secrethub/secrethub-cli/internals/secrethub.Commit=$(git rev-parse --short HEAD)" -X "github.com/secrethub/secrethub-cli/internals/secrethub.Version=v$pkgver" -extldflags ${LDFLAGS}" \
       -tags=production \
       -trimpath \
       -o $pkgname \
       ./cmd/secrethub
}

check() {
  cd $pkgname
  go test ./...
}

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