Changeset View
Changeset View
Standalone View
Standalone View
net/concourse-fly/Makefile
- This file was added.
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
svn:keywords | null | FreeBSD=%H \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
# $FreeBSD$ | |||||
PORTNAME= concourse-fly | |||||
PORTVERSION= 2.0.2 | |||||
DISTNAME= concourse-${PORTVERSION} | |||||
mat: This is out of order, and in that case, better do:
PORTNAME=concourse
PKGNAMESUFFIX= -fly | |||||
dumbbellAuthorUnsubmitted Not Done Inline ActionsJust to be clear, this port is about the CLI only, not the entire Concourse. So if Concourse is packaged one day, they will not conflict, right? With your suggestion, this port will still be named "concourse-fly" but there will be no need to override DISTNAME, correct? dumbbell: Just to be clear, this port is about the CLI only, not the entire Concourse. So if Concourse is… | |||||
CATEGORIES= net sysutils | |||||
MASTER_SITES= LOCAL/dumbbell/concourse/ | |||||
Not Done Inline ActionsThis should be: PORTNAME= concourse PORTVERSION= 2.3.1 CATEGORIES= net sysutils MASTER_SITES= LOCAL/dumbbell/concourse/ PKGNAMESUFFIX= -fly mat: This should be:
PORTNAME= concourse
PORTVERSION= 2.3.1
CATEGORIES=… | |||||
MAINTAINER= dumbbell@FreeBSD.org | |||||
COMMENT= CLI for Concourse | |||||
LICENSE= APACHE20 | |||||
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. | |||||
matUnsubmitted Not Done Inline ActionsThis is a great description of what you are doing, but this is not how we do things, the way we do things is explained in the porter's handbook: mat: This is a great description of what you are doing, but this is not how we do things, the way we… | |||||
dumbbellAuthorUnsubmitted Not Done Inline ActionsI read that example before doing that. As far as I understand, the example only supports repositories hosted on GitHub. However, Concourse uses Git submodules hosted elsewhere too. I will add a comment about that to explain why the example from the Porter's handbook couldn't be applied here. dumbbell: I read that example before doing that. As far as I understand, the example only supports… | |||||
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*" -depth -exec rm -rf {} \; | |||||
${TAR} -cf - -C ${ARCHIVE_DIR:H} ${ARCHIVE_DIR:T} | ${XZ_CMD} > ${ARCHIVE_DIR}.tar.xz | |||||
${RM} -rf ${ARCHIVE_DIR} |
This is out of order, and in that case, better do:
PORTNAME=concourse
PKGNAMESUFFIX= -fly