diff --git a/Makefile b/Makefile index fbc8473377..8d213d25f7 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,24 @@ all: .include "Mk/defaults.mk" +CORE_ABI?= 20.1 +CORE_PHP?= 72 +CORE_PYTHON?= 37 +CORE_SURICATA?= -devel +CORE_SYSLOGD?= # empty +CORE_SYSLOGNG?= 3.27 +CORE_UPDATE?= # empty + +.if exists(${GIT}) && exists(${GITVERSION}) +. if ${CORE_ABI} == "20.1" +CORE_COMMIT!= ${GITVERSION} --exclude=20.7.r\* +. else +CORE_COMMIT!= ${GITVERSION} +. endif +.else +CORE_COMMIT= unknown 0 undefined +.endif + CORE_VERSION?= ${CORE_COMMIT:[1]} CORE_REVISION?= ${CORE_COMMIT:[2]} CORE_HASH?= ${CORE_COMMIT:[3]} @@ -38,14 +56,6 @@ CORE_PKGVERSION= ${CORE_VERSION}_${CORE_REVISION} CORE_PKGVERSION= ${CORE_VERSION} .endif -CORE_ABI?= 20.1 -CORE_PHP?= 72 -CORE_PYTHON?= 37 -CORE_SURICATA?= -devel -CORE_SYSLOGD?= # empty -CORE_SYSLOGNG?= 3.27 -CORE_UPDATE?= # empty - CORE_PYTHON_DOT= ${CORE_PYTHON:C/./&./1} .if "${CORE_FLAVOUR}" == OpenSSL diff --git a/Mk/defaults.mk b/Mk/defaults.mk index 321de681a8..4d0e95a3a1 100644 --- a/Mk/defaults.mk +++ b/Mk/defaults.mk @@ -31,12 +31,6 @@ GIT!= which git || echo true GITVERSION= ${.CURDIR}/Scripts/version.sh -.if exists(${GIT}) && exists(${GITVERSION}) -CORE_COMMIT!= ${GITVERSION} -.else -CORE_COMMIT= unknown 0 undefined -.endif - _CORE_ARCH!= uname -p CORE_ARCH?= ${_CORE_ARCH} diff --git a/Scripts/version.sh b/Scripts/version.sh index 3258078fe8..402d840839 100755 --- a/Scripts/version.sh +++ b/Scripts/version.sh @@ -27,7 +27,7 @@ set -e -VERSION=$(git describe --abbrev=0 --always) +VERSION=$(git describe --abbrev=0 --always ${1}) REVISION=$(git rev-list ${VERSION}.. --count) HASH=$(git rev-list HEAD --max-count=1 | cut -c1-9)