diff --git a/Makefile.inc1 b/Makefile.inc1 index 2242ca3be5b4..5a9eff870dd5 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -557,25 +557,21 @@ VERSION= FreeBSD ${_REVISION}-${_BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDA .endif .if !defined(PKG_VERSION) -_STRTIMENOW= %Y%m%d%H%M%S -_TIMENOW= ${_STRTIMENOW:gmtime} -.if ${_BRANCH:MCURRENT*} -_REVISION:= ${_REVISION:R} -EXTRA_REVISION= .s${_TIMENOW} -.elif ${_BRANCH:MSTABLE*} -EXTRA_REVISION= s${_TIMENOW} -.elif ${_BRANCH:MPRERELEASE*} -EXTRA_REVISION= .p +.if ${_BRANCH:MSTABLE*} || ${_BRANCH:MCURRENT*} +TIMENOW= %Y%m%d%H%M%S +EXTRA_REVISION= .s${TIMENOW:gmtime} .elif ${_BRANCH:MALPHA*} -EXTRA_REVISION= .a${_BRANCH:C/ALPHA([0-9]+).*/\1/} +EXTRA_REVISION= _${_BRANCH:C/-ALPHA/.a/} .elif ${_BRANCH:MBETA*} -EXTRA_REVISION= .b${_BRANCH:C/BETA([0-9]+).*/\1/} +EXTRA_REVISION= _${_BRANCH:C/-BETA/.b/} .elif ${_BRANCH:MRC*} -EXTRA_REVISION= .rc${_BRANCH:C/RC([0-9]+).*/\1/} +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:C/[[:space:]]//g} +PKG_VERSION:= ${_REVISION}${EXTRA_REVISION} .endif .endif # !defined(PKG_VERSION)