summaryrefslogtreecommitdiff
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorRene Ladan <rene@FreeBSD.org>2019-06-16 11:53:22 +0000
committerRene Ladan <rene@FreeBSD.org>2019-06-16 11:53:22 +0000
commit0026fec57dfdaacd2b2bf2c6383afd6ffc118f49 (patch)
tree95a6436c0a757afba96ddfff88ccfa01882c9a3f /Makefile.inc1
parentff31ddeb111e951f2957460a7e4a24b6918fb259 (diff)
downloadsrc-test2-0026fec57dfdaacd2b2bf2c6383afd6ffc118f49.tar.gz
src-test2-0026fec57dfdaacd2b2bf2c6383afd6ffc118f49.zip
Differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases.
Currently APLHA packages are treated as CURRENT or STABLE versions, resulting in e.g. 13.0.s20190615125609. This version number is indeed different from the next version number but ALPHA2 would be nicer IMO. For the BETA, PRERELEASE and RC phases the packages are versioned the same as for releases, so 11.3-BETA1 is 11.3 and so is 11.3-RC1, meaning that pkg cannot easiliy upgrade from the former the next. This happened on my Raspberry Pi which runs pkgbase. Submitted by: rene Approved by: manu Event: Berlin hackathon 2019 Differential Revision: https://reviews.freebsd.org/D20651
Notes
Notes: svn path=/head/; revision=349104
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc115
1 files changed, 11 insertions, 4 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index b0044fd9895f..a007485d7845 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -553,16 +553,23 @@ VERSION= FreeBSD ${_REVISION}-${_BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDA
.endif
.if !defined(PKG_VERSION)
-.if ${_BRANCH:MSTABLE*} || ${_BRANCH:MCURRENT*} || ${_BRANCH:MALPHA*}
+.if ${_BRANCH:MSTABLE*} || ${_BRANCH:MCURRENT*}
TIMENOW= %Y%m%d%H%M%S
EXTRA_REVISION= .s${TIMENOW:gmtime}
-.endif
-.if ${_BRANCH:M*-p*}
+.elif ${_BRANCH:MALPHA*}
+EXTRA_REVISION= _${_BRANCH:C/-ALPHA/.a/}
+.elif ${_BRANCH:MBETA*}
+EXTRA_REVISION= _${_BRANCH:C/-BETA/.b/}
+.elif ${_BRANCH:MRC*}
+EXTRA_REVISION= _${_BRANCH:C/-RC/.r/}
+.elif ${_BRANCH:MPRERELEASE*}
+EXTRA_REVISION= _${_BRANCH:C/-PRERELEASE/.p/}
+.elif ${_BRANCH:M*-p*}
EXTRA_REVISION= _${_BRANCH:C/.*-p([0-9]+$)/\1/}
.endif
PKG_VERSION= ${_REVISION}${EXTRA_REVISION}
.endif
-.endif # !defined(_MKSHOWCONFIG)
+.endif # !defined(PKG_VERSION)
.if !defined(_MKSHOWCONFIG)
_CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} -f /dev/null \