svn commit: r452050 - head/www/gitea
Thomas Zander
riggs at FreeBSD.org
Sat Oct 14 09:28:42 UTC 2017
Author: riggs
Date: Sat Oct 14 09:28:41 2017
New Revision: 452050
URL: https://svnweb.freebsd.org/changeset/ports/452050
Log:
Fix version number in resulting binary
Details:
Gitea releases don't supply the release version number;
the automatic method to obtain the version number in
the Gitea build system only works when sources are checked
out from git.
PR: 222885
Submitted by: stb at lassitu.de (maintainer)
MFH: 2017Q4
Modified:
head/www/gitea/Makefile
Modified: head/www/gitea/Makefile
==============================================================================
--- head/www/gitea/Makefile Sat Oct 14 09:11:13 2017 (r452049)
+++ head/www/gitea/Makefile Sat Oct 14 09:28:41 2017 (r452050)
@@ -3,6 +3,7 @@
PORTNAME= gitea
PORTVERSION= 1.1.4
+PORTREVISION= 1
DISTVERSIONPREFIX= v
CATEGORIES= www
@@ -39,6 +40,15 @@ OPTIONS_DEFAULT= ${OPTIONS_DEFINE}
CERT_VARS= GO_TAGS+=cert
PAM_VARS= GO_TAGS+=pam
SQLITE_VARS= GO_TAGS+=sqlite
+
+post-patch:
+ # Gitea releases don't supply the release version number; the
+ # automatic method to obtain the version number in the Gitea build
+ # system only works when sources are checked out from git.
+ # See https://github.com/go-gitea/gitea/issues/1136#issuecomment-311622745
+ ${SED} -Ei .orig \
+ -e 's#^(var Version = )"[^"]+"#\1"${PORTVERSION}"#' \
+ ${GO_WRKSRC}/main.go
do-install:
${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin
More information about the svn-ports-head
mailing list