From 072d9673b9371fdb9d678967a286d523be93a2b2 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Wed, 15 Apr 2020 19:11:59 +0200 Subject: [PATCH] pkg: useless overrides ARCH and FLAVOUR --- Makefile | 3 --- Mk/defaults.mk | 13 +++++++++---- README.md | 5 ++++- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 886fbb7c5..2068bb204 100644 --- a/Makefile +++ b/Makefile @@ -39,9 +39,6 @@ CORE_PKGVERSION= ${CORE_VERSION} .endif CORE_ABI?= 20.1 -CORE_ARCH?= ${ARCH} -CORE_FLAVOUR?= ${FLAVOUR} - CORE_PHP?= 72 CORE_PYTHON?= 37 CORE_RADVD?= # empty diff --git a/Mk/defaults.mk b/Mk/defaults.mk index 8fdfd8bf9..f1c99812b 100644 --- a/Mk/defaults.mk +++ b/Mk/defaults.mk @@ -28,7 +28,6 @@ PAGER?= less PKG!= which pkg || echo true GIT!= which git || echo true -ARCH!= uname -p GITVERSION= ${.CURDIR}/Scripts/version.sh @@ -38,6 +37,9 @@ CORE_COMMIT!= ${GITVERSION} CORE_COMMIT= unknown 0 undefined .endif +_CORE_ARCH!= uname -p +CORE_ARCH?= ${_CORE_ARCH} + .if exists(${PKG}) _CORE_UPDATE!= ${PKG} query -g %n 'opnsense-update*' CORE_UPDATE?= ${_CORE_UPDATE:S/opnsense-update//g} @@ -48,11 +50,14 @@ CORE_SYSLOGD?= ${_CORE_SYSLOGD:S/syslogd//g} OPENSSL= ${LOCALBASE}/bin/openssl +.if ! defined(CORE_FLAVOUR) .if exists(${OPENSSL}) -_FLAVOUR!= ${OPENSSL} version -FLAVOUR?= ${_FLAVOUR:[1]} +_CORE_FLAVOUR!= ${OPENSSL} version +CORE_FLAVOUR?= ${_CORE_FLAVOUR:[1]} .else -FLAVOUR?= Base # not supported without OpenSSL port +.warning "Detected 'Base' flavour is not currently supported" +CORE_FLAVOUR?= Base +.endif .endif PHPBIN= ${LOCALBASE}/bin/php diff --git a/README.md b/README.md index e10ca92b5..668bbad9d 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ Several OPTIONS exist to customise the package, e.g.: * CORE_DEPENDS: a list of required dependencies for the package * CORE_DEPENDS_ARCH: a list of special -required packages * CORE_ORIGIN: sets a HardenedBSD compatible package/ports origin -* FLAVOUR: can be set to "OpenSSL" (default) or "LibreSSL" +* CORE_FLAVOUR: can be set to "OpenSSL" or "LibreSSL" * CORE_COMMENT: a short description of the package * CORE_MAINTAINER: email of the package maintainer * CORE_WWW: web url of the package @@ -71,6 +71,9 @@ Options are passed in the following form: # make package CORE_NAME=my_new_name +In general, options are either set to sane defaults or automatically +detected at runtime. + make update -----------