aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLewis Cook <lcook@FreeBSD.org>2021-05-27 15:22:36 +0000
committerLewis Cook <lcook@FreeBSD.org>2021-05-27 15:24:50 +0000
commit7364bc76868d0a3592b5a3bc0d9d81c714f0ff05 (patch)
treeccb1e3b2f80f1f342b0c3e244336950eb0e659ff
parentec82c98536cf13791f30544f1976299b038e566c (diff)
downloadports-7364bc76868d0a3592b5a3bc0d9d81c714f0ff05.tar.gz
ports-7364bc76868d0a3592b5a3bc0d9d81c714f0ff05.zip
textproc/ov: Display version/revision in (-v) flag
-rw-r--r--textproc/ov/Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/textproc/ov/Makefile b/textproc/ov/Makefile
index 5e40d2f99d46..6421e61a3806 100644
--- a/textproc/ov/Makefile
+++ b/textproc/ov/Makefile
@@ -11,7 +11,14 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
USES= go:modules
+_BUILD_VERSION= ${DISTVERSIONFULL}
+_BUILD_REVISION= 5ea83bc
+
GO_MODULE= github.com/noborus/${PORTNAME}
+GO_BUILDFLAGS= -ldflags "\
+ -s -w \
+ -X main.Version=${_BUILD_VERSION} \
+ -X main.Revision=${_BUILD_REVISION}"
PLIST_FILES= bin/${PORTNAME}
PORTDOCS= README.md