diff --git a/Makefile.inc1 b/Makefile.inc1 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -557,19 +557,21 @@ .endif .if !defined(PKG_VERSION) -.if ${_BRANCH:MSTABLE*} || ${_BRANCH:MCURRENT*} || ${_BRANCH:MPRERELEASE*} -TIMENOW= %Y%m%d%H%M%S -EXTRA_REVISION= .s${TIMENOW:gmtime} +_STRTIMENOW= %Y%m%d%H%M%S +_TIMENOW= ${_STRTIMENOW:gmtime} +.if ${_BRANCH:MCURRENT*} || ${_BRANCH:MSTABLE*} || ${_BRANCH:MPRERELEASE*} +_REVISION:= ${_REVISION:R} +EXTRA_REVISION= .snap${_TIMENOW} .elif ${_BRANCH:MALPHA*} -EXTRA_REVISION= _${_BRANCH:C/-ALPHA/.a/} +EXTRA_REVISION= .a${_BRANCH:C/ALPHA([0-9]+).*/\1/}.${_TIMENOW} .elif ${_BRANCH:MBETA*} -EXTRA_REVISION= _${_BRANCH:C/-BETA/.b/} +EXTRA_REVISION= .b${_BRANCH:C/BETA([0-9]+).*/\1/}.${_TIMENOW} .elif ${_BRANCH:MRC*} -EXTRA_REVISION= _${_BRANCH:C/-RC/.r/} +EXTRA_REVISION= .rc${_BRANCH:C/RC([0-9]+).*/\1/}.${_TIMENOW} .elif ${_BRANCH:M*-p*} -EXTRA_REVISION= _${_BRANCH:C/.*-p([0-9]+$)/\1/} +EXTRA_REVISION= p${_BRANCH:C/.*-p([0-9]+$)/\1/} .endif -PKG_VERSION:= ${_REVISION}${EXTRA_REVISION} +PKG_VERSION:= ${_REVISION}${EXTRA_REVISION:C/[[:space:]]//g} .endif .endif # !defined(PKG_VERSION)