[arch-commits] Commit in step-cli/trunk (PKGBUILD)

Jelle van der Waa jelle at archlinux.org
Wed Sep 9 15:31:54 UTC 2020


    Date: Wednesday, September 9, 2020 @ 15:31:53
  Author: jelle
Revision: 701608

step-cli initial commit

Added:
  step-cli/trunk/PKGBUILD

----------+
 PKGBUILD |   39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

Added: PKGBUILD
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2020-09-09 15:31:53 UTC (rev 701608)
@@ -0,0 +1,39 @@
+# Maintainer: Jelle van der Waa <jelle at archlinux.org>
+
+pkgname=step-cli
+pkgver=0.15.2
+pkgrel=1
+pkgdesc="A zero trust swiss army knife for working with X509, OAuth, JWT, OATH OTP, etc."
+url="https://github.com/smallstep/cli"
+arch=(x86_64)
+license=(Apache)
+depends=(glibc)
+makedepends=(go)
+source=(https://github.com/smallstep/cli/releases/download/v${pkgver}/step-cli_${pkgver}.tar.gz)
+sha512sums=('de1f78835984a8b80edfa0e684ece51ca0c7779395771ca32168c2844b07e8e03f72b1d6aa663ea8f326d02170db6b4cfa0ffad4b8eed6dd494e2bfb6d730212')
+
+prepare() {
+  sed -i "s/step/${pkgname}/g" "autocomplete/zsh_autocomplete"
+}
+
+build() {
+  BUILD_DATE="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d)"
+
+  go build \
+      -trimpath \
+      -buildmode=pie \
+      -mod=readonly \
+      -modcacherw \
+      -ldflags "-linkmode external -extldflags \"${LDFLAGS}\" -X \"main.Version=${pkgver}\" -X \"main.BuildTime=${BUILD_DATE}\"" \
+      -o step-cli cmd/step/main.go
+}
+
+check() {
+  go test ./...
+}
+
+package() {
+  install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname
+  install -Dm644 "autocomplete/bash_autocomplete" "$pkgdir/usr/share/bash-completion/completions/$pkgname"
+  install -Dm644 "autocomplete/zsh_autocomplete" "$pkgdir/usr/share/zsh/site-functions/_${pkgname}"
+}


More information about the arch-commits mailing list