Mail archive
alpine-aports

[alpine-aports] [PATCH] community/cf-cli: new aport

From: Thomas Boerger <thomas_at_webhippie.de>
Date: Thu, 12 May 2016 12:22:51 +0000

https://github.com/cloudfoundry/cli
A CLI for Cloud Foundry written in Go
---
 community/cf-cli/APKBUILD | 67 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100644 community/cf-cli/APKBUILD
diff --git a/community/cf-cli/APKBUILD b/community/cf-cli/APKBUILD
new file mode 100644
index 0000000..b0b0e1d
--- /dev/null
+++ b/community/cf-cli/APKBUILD
_at_@ -0,0 +1,67 @@
+# Contributor: Thomas Boerger <thomas_at_webhippie.de>
+# Maintainer: Thomas Boerger <thomas_at_webhippie.de>
+pkgname=cf-cli
+pkgver=6.18.0
+pkgrel=0
+pkgdesc="A CLI for Cloud Foundry written in Go"
+url="https://github.com/cloudfoundry/cli"
+arch="all"
+license="Apache 2.0"
+depends=""
+depends_dev=""
+makedepends="$depends_dev go bash"
+install=""
+subpackages=""
+source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz"
+
+_disturl="dev.alpinelinux.org:/archive/$pkgname/"
+_gourl="github.com/cloudfoundry/cli"
+_builddir="$srcdir"/src/$_gourl
+
+prepare() {
+	local i
+	cd "$_builddir"
+	for i in $source; do
+		case $i in
+		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		esac
+	done
+}
+
+snapshot() {
+  abuild clean && abuild deps
+  export GOPATH="$srcdir"
+
+  msg "Checking out v${pkgver} tag"
+  # go get will not checkout a specific tag
+	# so we run our own git checkout branch
+	git clone --quiet --branch v${pkgver} \
+		https://$_gourl $_builddir || return 1
+
+  # fetch deps
+  cd $_builddir
+  go get -v -d ./... || return 1
+
+  cd "$srcdir"
+  tar zcf $pkgname-$pkgver.tar.gz src || return 1
+
+  rsync --progress -La $pkgname-$pkgver.tar.gz \
+    $_disturl || return 1
+
+  cd $startdir && abuild undeps
+}
+
+build() {
+  cd "$_builddir" || return 1
+  export GOPATH="$srcdir"
+	./bin/build
+}
+
+package() {
+	cd "$_builddir"
+  install -Dm755 out/cf "$pkgdir"/usr/bin/cf || return 1
+}
+
+md5sums="947bcea7939dd9152188a7e9e8164090  cf-cli-6.18.0.tar.gz"
+sha256sums="ec62f0a7b181d7e25b10948f56f4de95bfef8ea225e340ceb1fa1bbe6c351ece  cf-cli-6.18.0.tar.gz"
+sha512sums="4e1f799da851b01711dad2b52e3d9ae33a6d71108dad42ad11f0c3057bb514504336c9266d4a492b5f237e677bee334248633fea32af02b3de7e909209793bb4  cf-cli-6.18.0.tar.gz"
-- 
2.8.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Thu May 12 2016 - 12:22:51 GMT