[arch-commits] Commit in hcloud/repos (community-x86_64 community-x86_64/PKGBUILD)
Christian Rebischke
shibumi at archlinux.org
Tue Jan 30 19:05:43 UTC 2018
Date: Tuesday, January 30, 2018 @ 19:05:43
Author: shibumi
Revision: 288334
archrelease: copy trunk to community-x86_64
Added:
hcloud/repos/community-x86_64/
hcloud/repos/community-x86_64/PKGBUILD
(from rev 288333, hcloud/trunk/PKGBUILD)
----------+
PKGBUILD | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
Copied: hcloud/repos/community-x86_64/PKGBUILD (from rev 288333, hcloud/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD (rev 0)
+++ community-x86_64/PKGBUILD 2018-01-30 19:05:43 UTC (rev 288334)
@@ -0,0 +1,46 @@
+# Maintainer: Christian Rebischke <chris.rebischke at archlinux.org>
+# Contributor: Konrad Tegtmeier <konrad.tegtmeier+aur at gmail.com>
+
+pkgname='hcloud'
+pkgver='1.2.0'
+pkgrel='5'
+pkgdesc="CLI for Hetzner Cloud"
+arch=('x86_64')
+url='https://github.com/hetznercloud/cli'
+license=('MIT')
+optdepends=(
+ 'bash-completion: tab auto-completion'
+ 'zsh: tab auto-completion')
+makedepends=('go' 'git')
+provides=('hcloud')
+_hcloud_commit='56fa3db24bafede2616a6d2c3b1e5cdca1cb851d'
+source=("git+https://github.com/hetznercloud/cli#commit=${_hcloud_commit}")
+sha512sums=('SKIP')
+
+prepare(){
+ export GOPATH="${srcdir}"
+ export PATH="$PATH:$GOPATH/bin"
+ mkdir -p src/github.com/hetznercloud
+ mv cli src/github.com/hetznercloud
+}
+
+build(){
+ cd src/github.com/hetznercloud/cli
+ go build \
+ -ldflags "-w -X github.com/hetznercloud/cli.Version=${pkgver}" \
+ github.com/hetznercloud/cli/cmd/hcloud
+ chmod +x ./hcloud
+ ./hcloud completion bash > "$pkgname-completion.bash"
+}
+
+check(){
+ cd src/github.com/hetznercloud/cli
+ go test -v -x
+}
+
+package(){
+ cd src/github.com/hetznercloud/cli
+ install -Dsm755 hcloud "${pkgdir}/usr/bin/hcloud"
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -Dm644 "${pkgname}-completion.bash" "$pkgdir/usr/share/bash-completion/completions/$pkgname"
+}
More information about the arch-commits
mailing list