svn commit: r512686 - head/www/gitea
Dmitri Goutnik
dmgk at FreeBSD.org
Mon Sep 23 22:57:28 UTC 2019
Author: dmgk
Date: Mon Sep 23 22:57:28 2019
New Revision: 512686
URL: https://svnweb.freebsd.org/changeset/ports/512686
Log:
www/gitea: Use linker flags to set version instead of patching the source.
PR: 240744
Submitted by: stb at lassitu.de (maintainer)
Reported by: Ivan <bsd at abinet.ru>
Approved by: araujo (mentor)
Differential Revision: https://reviews.freebsd.org/D21771
Modified:
head/www/gitea/Makefile
Modified: head/www/gitea/Makefile
==============================================================================
--- head/www/gitea/Makefile Mon Sep 23 22:56:21 2019 (r512685)
+++ head/www/gitea/Makefile Mon Sep 23 22:57:28 2019 (r512686)
@@ -4,6 +4,7 @@
PORTNAME= gitea
DISTVERSIONPREFIX= v
DISTVERSION= 1.9.3
+PORTREVISION= 1
CATEGORIES= www
MAINTAINER= stb at lassitu.de
@@ -19,7 +20,7 @@ USE_GITHUB= yes
GH_ACCOUNT= go-gitea
USE_RC_SUBR= gitea
-GO_BUILDFLAGS= -tags "${GO_TAGS}"
+GO_BUILDFLAGS= -tags "${GO_TAGS}" -ldflags '-X "main.Version=${PORTVERSION}"'
SUB_FILES+= app.ini.sample
SUB_LIST+= GITUSER=${USERS}
@@ -46,15 +47,6 @@ DAEMONARGS= -f
.endif
SUB_LIST+= DAEMONARGS="${DAEMONARGS}"
-
-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-all
mailing list