aboutsummaryrefslogtreecommitdiffstats
path: root/net/concourse-fly
diff options
context:
space:
mode:
authordumbbell <dumbbell@FreeBSD.org>2016-10-30 18:24:09 +0800
committerdumbbell <dumbbell@FreeBSD.org>2016-10-30 18:24:09 +0800
commitc00bce07e7a5f42a18358bc3d8d40e4ce332c0a1 (patch)
tree41538eda437491ae46940334313b683f007658cf /net/concourse-fly
parent26a97a1d7739c4806f55152698d89112e7a4997c (diff)
downloadfreebsd-ports-gnome-c00bce07e7a5f42a18358bc3d8d40e4ce332c0a1.tar.gz
freebsd-ports-gnome-c00bce07e7a5f42a18358bc3d8d40e4ce332c0a1.tar.zst
freebsd-ports-gnome-c00bce07e7a5f42a18358bc3d8d40e4ce332c0a1.zip
net/concourse-fly: New port for Concourse's CLI
Approved by: mat Differential Revision: https://reviews.freebsd.org/D7819
Diffstat (limited to 'net/concourse-fly')
-rw-r--r--net/concourse-fly/Makefile68
-rw-r--r--net/concourse-fly/distinfo3
-rw-r--r--net/concourse-fly/pkg-descr7
3 files changed, 78 insertions, 0 deletions
diff --git a/net/concourse-fly/Makefile b/net/concourse-fly/Makefile
new file mode 100644
index 000000000000..a86c7487a935
--- /dev/null
+++ b/net/concourse-fly/Makefile
@@ -0,0 +1,68 @@
+# $FreeBSD$
+
+PORTNAME= concourse
+PORTVERSION= 2.3.1
+CATEGORIES= net sysutils
+MASTER_SITES= LOCAL/dumbbell/concourse/
+PKGNAMESUFFIX= -fly
+
+MAINTAINER= dumbbell@FreeBSD.org
+COMMENT= CLI for Concourse
+
+LICENSE= APACHE20
+
+CONFLICTS_INSTALL= fly
+
+GO_CMD= ${LOCALBASE}/bin/go
+GO_PKGNAME= github.com/concourse/fly
+
+USES= go tar:xz
+
+PLIST_FILES= bin/fly
+
+STRIP= # stripping can break go binaries
+
+# The build instructions for `fly` suggest to clone the global Concourse
+# repository, which contains many Git submodules, including fly, and
+# build from there. So basically:
+#
+# git clone --recursive http://github.com/concourse/concourse.gi
+# cd concourse
+# export GOPATH=$PWD
+# cd src/github.com/concourse/fly
+# go build
+#
+# Therefore, the source archive contains the Concourse top-level
+# repository and all its submodules. It's created using the
+# create-src-archive below:
+#
+# make create-src-archive
+#
+# Because it doesn't match the project layout USES=go expects, we
+# override the post-extract and do-build targets to adapt the commands.
+#
+# `fly` version is set by default to "0.0.0-dev" in version/Version.go.
+# Instead of patching the file, we use a linker flag to set the variable
+# to the port's version.
+
+post-extract:
+ ${LN} -sf ${WRKSRC}/src ${GO_WRKDIR_SRC}
+
+do-build:
+ (cd ${WRKDIR}; \
+ ${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} \
+ install -v -ldflags="-X github.com/concourse/fly/version.Version=${PORTVERSION}" ${GO_TARGET})
+
+.include <bsd.port.mk>
+
+.PHONY: create-src-archive
+ARCHIVE_DIR= ${DISTDIR}/concourse-${PORTVERSION}
+create-src-archive:
+ ${RM} -rf ${ARCHIVE_DIR}
+ git clone --recursive -b v${PORTVERSION} \
+ https://github.com/concourse/concourse.git \
+ ${ARCHIVE_DIR}
+ ${FIND} ${ARCHIVE_DIR} \( -name ".git*" -o -name "testdata" \) -depth -exec rm -rf {} \;
+ ${TAR} -cf - -C ${ARCHIVE_DIR:H} ${ARCHIVE_DIR:T} | ${XZ_CMD} > ${ARCHIVE_DIR}.tar.xz
+ ${RM} -rf ${ARCHIVE_DIR}
+ ${MAKE} makesum
diff --git a/net/concourse-fly/distinfo b/net/concourse-fly/distinfo
new file mode 100644
index 000000000000..b1438d123cb0
--- /dev/null
+++ b/net/concourse-fly/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1476452215
+SHA256 (concourse-2.3.1.tar.xz) = f5bbe289cd107da02795bb0e9fb0d6365be78ee8ffd3b35272afd5b0ce850ba7
+SIZE (concourse-2.3.1.tar.xz) = 8586184
diff --git a/net/concourse-fly/pkg-descr b/net/concourse-fly/pkg-descr
new file mode 100644
index 000000000000..e7865b6d060c
--- /dev/null
+++ b/net/concourse-fly/pkg-descr
@@ -0,0 +1,7 @@
+The `fly` tool is a command line interface to Concourse. It is used for
+a number of tasks from connecting to a shell in one of your build's
+containers to uploading new pipeline configuration into a running
+Concourse. Learning how to use `fly` will make using Concourse faster
+and more useful.
+
+WWW: http://concourse.ci/