pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

micro: Embed version info



Module Name:	pkgsrc-wip
Committed By:	Sijmen J. Mulder <sjmulder%NetBSD.org@localhost>
Pushed By:	sjmulder
Date:		Sat May 30 04:05:09 2020 +0200
Changeset:	3a5d71d92f9aaaeb7e71601bee99ed2f6aa07f8f

Modified Files:
	micro/Makefile

Log Message:
micro: Embed version info

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=3a5d71d92f9aaaeb7e71601bee99ed2f6aa07f8f

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 micro/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diffs:
diff --git a/micro/Makefile b/micro/Makefile
index 130e857a03..414118e0b9 100644
--- a/micro/Makefile
+++ b/micro/Makefile
@@ -13,6 +13,9 @@ LICENSE=	mit
 INSTALLATION_DIRS+=	${PKGMANDIR}/man1
 
 GO_BUILD_PATTERN=	./cmd/micro
+GO_LDFLAGS+=		-X github.com/zyedidia/micro/v2/internal/util.Version=${PKGVERSION_NOREV}
+GO_LDFLAGS+=		-X github.com/zyedidia/micro/v2/internal/util.CommitHash=${GITHUB_TAG}
+GO_ARGS+=		-ldflags ${GO_LDFLAGS:Q}
 
 GO_MODULE_FILES+=	gopkg.in/yaml.v2/@v/v2.2.4.mod
 GO_MODULE_FILES+=	gopkg.in/yaml.v2/@v/v2.2.7.mod
@@ -82,6 +85,9 @@ GO_MODULE_FILES+=	github.com/mattn/go-runewidth/@v/v0.0.7.zip
 GO_MODULE_FILES+=	github.com/yuin/gopher-lua/@v/v0.0.0-20191220021717-ab39c6098bdb.zip
 GO_MODULE_FILES+=	layeh.com/gopher-luar/@v/v1.0.7.zip
 
+do-build:
+	${RUN} cd ${WRKSRC} && ${_ULIMIT_CMD} ${PKGSRC_SETENV} ${MAKE_ENV} ${GO} install -v ${GO_ARGS} ${GO_BUILD_PATTERN}
+
 post-install:
 	${INSTALL_MAN} ${WRKSRC}/assets/packaging/micro.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
 


Home | Main Index | Thread Index | Old Index