git: ad3edd66d15e - releng/14.0 - pkgbase: use <major>.<minor> format for alpha, beta and release package versions

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Tue, 05 Dec 2023 18:27:36 UTC
The branch releng/14.0 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=ad3edd66d15e6af1bf7e393a01f1a126dfa55fff

commit ad3edd66d15e6af1bf7e393a01f1a126dfa55fff
Author:     Doug Rabson <dfr@FreeBSD.org>
AuthorDate: 2023-11-13 13:04:26 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-12-04 14:05:27 +0000

    pkgbase: use <major>.<minor> format for alpha, beta and release package versions
    
    This is consistent with version numbers used in releng/13.2.
    
    PR:             275051
    Reviewed by:    bapt
    MFC after:      3 days
    Differential Revision: https://reviews.freebsd.org/D42562
    Approved by:    so
    Security:       FreeBSD-EN-23:19.pkgbase
    
    (cherry picked from commit 21e9018ae19662db643a21064150da866bc7beb4)
    (cherry picked from commit da7e9601a99afd3f8777f6ae62fd51e601e15085)
---
 Makefile.inc1 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Makefile.inc1 b/Makefile.inc1
index 01d3328726bd..12397abeedb2 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -547,9 +547,11 @@ VERSION=	FreeBSD ${_REVISION}-${_BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDA
 MAJOR_REVISION=	${_REVISION:R}
 
 .if !defined(PKG_VERSION)
+_PKG_REVISION=	${_REVISION}
 _STRTIMENOW=	%Y%m%d%H%M%S
 _TIMENOW=	${_STRTIMENOW:gmtime}
 .if ${_BRANCH:MCURRENT*} || ${_BRANCH:MSTABLE*} || ${_BRANCH:MPRERELEASE*}
+_PKG_REVISION=	${MAJOR_REVISION}
 EXTRA_REVISION=	.snap${_TIMENOW}
 .elif ${_BRANCH:MALPHA*}
 EXTRA_REVISION=	.a${_BRANCH:C/ALPHA([0-9]+).*/\1/}.${_TIMENOW}
@@ -560,7 +562,7 @@ EXTRA_REVISION=	.rc${_BRANCH:C/RC([0-9]+).*/\1/}.${_TIMENOW}
 .elif ${_BRANCH:M*-p*}
 EXTRA_REVISION=	p${_BRANCH:C/.*-p([0-9]+$)/\1/}
 .endif
-PKG_VERSION:=	${MAJOR_REVISION}${EXTRA_REVISION:C/[[:space:]]//g}
+PKG_VERSION:=	${_PKG_REVISION}${EXTRA_REVISION:C/[[:space:]]//g}
 .endif
 .endif	# !defined(PKG_VERSION)