mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
Framework: stop guessing build parameters
Either we can figure them out at runtime or they were passed by the build system previously. Out of band builds are no longer supported, but can be fixed by specifying the relevant variables like the build would.
This commit is contained in:
+12
-3
@@ -51,6 +51,13 @@ PLUGIN_FLAVOUR?= Base
|
||||
.endif
|
||||
.endif
|
||||
|
||||
VERSIONBIN= ${LOCALBASE}/sbin/opnsense-version
|
||||
|
||||
.if exists(${VERSIONBIN})
|
||||
_PLUGIN_ABI!= ${VERSIONBIN} -a
|
||||
PLUGIN_ABI?= ${_PLUGIN_ABI}
|
||||
.endif
|
||||
|
||||
PHPBIN= ${LOCALBASE}/bin/php
|
||||
|
||||
.if exists(${PHPBIN})
|
||||
@@ -65,9 +72,11 @@ _PLUGIN_PYTHON!=${PYTHONLINK} -V
|
||||
PLUGIN_PYTHON?= ${_PLUGIN_PYTHON:[2]:S/./ /g:[1..2]:tW:S/ //}
|
||||
.endif
|
||||
|
||||
PLUGIN_ABI?= 21.1
|
||||
PLUGIN_PHP?= 74
|
||||
PLUGIN_PYTHON?= 37
|
||||
.for REPLACEMENT in ABI PHP PYTHON
|
||||
. if empty(PLUGIN_${REPLACEMENT})
|
||||
. error Cannot build without PLUGIN_${REPLACEMENT} set
|
||||
. endif
|
||||
.endfor
|
||||
|
||||
REPLACEMENTS= PLUGIN_ABI \
|
||||
PLUGIN_ARCH \
|
||||
|
||||
Reference in New Issue
Block a user