diff options
author | riggs <riggs@FreeBSD.org> | 2017-10-14 17:28:41 +0800 |
---|---|---|
committer | Koop Mast <kwm@rainbow-runner.nl> | 2018-02-04 05:44:31 +0800 |
commit | 1388904a62ec25e5b0699911741f76950d313fa8 (patch) | |
tree | 2e960e2d40f6f53a19d2071e44d2a50b8fc19b56 /www | |
parent | 263058d3ada4645f011ac07831c831ef1d15b05a (diff) | |
download | freebsd-ports-gnome-1388904a62ec25e5b0699911741f76950d313fa8.tar.gz freebsd-ports-gnome-1388904a62ec25e5b0699911741f76950d313fa8.tar.zst freebsd-ports-gnome-1388904a62ec25e5b0699911741f76950d313fa8.zip |
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@lassitu.de (maintainer)
MFH: 2017Q4
Diffstat (limited to 'www')
-rw-r--r-- | www/gitea/Makefile | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/www/gitea/Makefile b/www/gitea/Makefile index 6e9746fda4cd..8036271cfd9a 100644 --- a/www/gitea/Makefile +++ b/www/gitea/Makefile @@ -3,6 +3,7 @@ PORTNAME= gitea PORTVERSION= 1.1.4 +PORTREVISION= 1 DISTVERSIONPREFIX= v CATEGORIES= www @@ -40,6 +41,15 @@ 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 ${MKDIR} ${STAGEDIR}${ETCDIR}/conf |