diff options
author | Franklin Yu | 2023-04-10 23:28:29 -0700 |
---|---|---|
committer | Franklin Yu | 2023-04-10 23:28:29 -0700 |
commit | f19f1564ca68d21d4261bc1ad8a4fc73af790989 (patch) | |
tree | 269d8ea2f00098cc9cef0cc90027c942b282ecd1 /PKGBUILD | |
download | aur-f19f1564ca68d21d4261bc1ad8a4fc73af790989.tar.gz |
Initial upload: cloudprober 0.12.6-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..51c75d9c6173 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: Franklin Yu <franklinyu@google.com> +pkgname=cloudprober +pkgver=0.12.6 +pkgrel=1 +pkgdesc='An active monitoring software to detect failures before your customers do.' +arch=(x86_64) +url="https://cloudprober.org" +license=(Apache) +makedepends=(go) +_commit='e441335ed11f4aec93becee7d8d290b1d80ef781' # v0.12.6 +source=("git+https://github.com/cloudprober/$pkgname#commit=$_commit" 'service') +sha256sums=(SKIP SKIP) + +build() { + cd "$pkgname" + local ld_flags=( + -X main.version=$pkgver + -X main.buildTimestamp=$SOURCE_DATE_EPOCH + ) + local go_flags=( + --buildmode=pie + --mod=readonly + --modcacherw + --trimpath + + # The values are used in the binary; see the upstream Makefile. + --ldflags="${ld_flags[*]}" + ) + CGO_ENABLED=0 go build "${go_flags[@]}" "./cmd/$pkgname.go" +} + +check() { + cd "$pkgname" + # See https://github.com/cloudprober/cloudprober/issues/324 + # TODO: remove “TestK8STokenSource” in next release + go test --skip='TestConnectFailures|TestK8STokenSource' ./... +} + +package() { + install -D --mode=755 "$pkgname/$pkgname" "$pkgdir/usr/bin/$pkgname" + install -D --mode=644 ../service \ + "$pkgdir/usr/lib/systemd/system/$pkgname.service" +} |