From f304248a7fce31c90a1e71e3e943986146a57ed6 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Mon, 11 May 2015 17:57:49 +0200 Subject: [PATCH] build: expand all configs around the product name --- build/base.sh | 2 +- build/common.sh | 3 ++- build/core.sh | 2 +- build/kernel.sh | 2 +- build/ports.sh | 4 ++-- config/{current => OPNsense}/SMP | 0 config/{current => OPNsense}/make.conf | 0 config/{current => OPNsense}/ports.conf | 0 config/{current => OPNsense}/src.conf | 0 scripts/port_skim.sh | 2 +- 10 files changed, 8 insertions(+), 7 deletions(-) rename config/{current => OPNsense}/SMP (100%) rename config/{current => OPNsense}/make.conf (100%) rename config/{current => OPNsense}/ports.conf (100%) rename config/{current => OPNsense}/src.conf (100%) diff --git a/build/base.sh b/build/base.sh index a70c5ba..f2db8da 100755 --- a/build/base.sh +++ b/build/base.sh @@ -34,7 +34,7 @@ rm -f ${SETSDIR}/base-*-${ARCH}.txz git_clear ${SRCDIR} git_describe ${SRCDIR} -MAKEARGS="SRCCONF=${TOOLSDIR}/config/current/src.conf COMPILER_TYPE=clang __MAKE_CONF=" +MAKEARGS="SRCCONF=${PRODUCT_CONFIG}/src.conf COMPILER_TYPE=clang __MAKE_CONF=" make -C${SRCDIR} -j${CPUS} buildworld ${MAKEARGS} NO_CLEAN=yes make -C${SRCDIR}/release obj ${MAKEARGS} diff --git a/build/common.sh b/build/common.sh index 97a4b82..74e7389 100755 --- a/build/common.sh +++ b/build/common.sh @@ -30,7 +30,7 @@ set -e # important build settings export PRODUCT_VERSION=${PRODUCT_VERSION:-$(date '+%Y%m%d%H%M')} export PRODUCT_FLAVOUR=${PRODUCT_FLAVOUR:-"OpenSSL"} -export PRODUCT_NAME="OPNsense" +export PRODUCT_NAME=${PRODUCT_NAME:-"OPNsense"} # full name for easy use export PRODUCT_RELEASE="${PRODUCT_NAME}-${PRODUCT_VERSION}_${PRODUCT_FLAVOUR}" @@ -43,6 +43,7 @@ export SRCDIR="/usr/src" # misc. foo export CONFIG_PKG="/usr/local/etc/pkg/repos/${PRODUCT_NAME}.conf" +export PRODUCT_CONFIG="${TOOLSDIR}/config/${PRODUCT_NAME}" export CPUS=$(sysctl kern.smp.cpus | awk '{ print $2 }') export CONFIG_XML="/usr/local/etc/config.xml" export ARCH=${ARCH:-$(uname -m)} diff --git a/build/core.sh b/build/core.sh index 03c0085..844c9d0 100755 --- a/build/core.sh +++ b/build/core.sh @@ -62,7 +62,7 @@ while read PORT_NAME PORT_CAT PORT_OPT; do fi PORT_LIST="${PORT_LIST} ${PORT_NAME}" -done < ${TOOLSDIR}/config/current/ports.conf +done < ${PRODUCT_CONFIG}/ports.conf extract_packages ${STAGEDIR} opnsense install_packages ${STAGEDIR} ${PORT_LIST} diff --git a/build/kernel.sh b/build/kernel.sh index fe7f334..8a66838 100755 --- a/build/kernel.sh +++ b/build/kernel.sh @@ -37,7 +37,7 @@ git_describe ${SRCDIR} BUILD_KERNEL="SMP" # XXX move config to src.git -cp ${TOOLSDIR}/config/current/${BUILD_KERNEL} ${SRCDIR}/sys/${ARCH}/conf/${BUILD_KERNEL} +cp ${PRODUCT_CONFIG}/${BUILD_KERNEL} ${SRCDIR}/sys/${ARCH}/conf/${BUILD_KERNEL} MAKEARGS="TARGET_ARCH=${ARCH} KERNCONF=${BUILD_KERNEL}" diff --git a/build/ports.sh b/build/ports.sh index 9e3b7fa..8b5649f 100755 --- a/build/ports.sh +++ b/build/ports.sh @@ -29,7 +29,7 @@ set -e . ./common.sh -PORT_LIST=$(cat ${TOOLSDIR}/config/current/ports.conf) +PORT_LIST=$(cat ${PRODUCT_CONFIG}/ports.conf) git_clear ${PORTSDIR} git_clear ${SRCDIR} @@ -47,7 +47,7 @@ clean_packages ${STAGEDIR} echo ">>> Building packages..." -MAKE_CONF="${TOOLSDIR}/config/current/make.conf" +MAKE_CONF="${PRPDUCT_CONFIG}/make.conf" if [ -f ${MAKE_CONF} ]; then cp ${MAKE_CONF} ${STAGEDIR}/etc/make.conf fi diff --git a/config/current/SMP b/config/OPNsense/SMP similarity index 100% rename from config/current/SMP rename to config/OPNsense/SMP diff --git a/config/current/make.conf b/config/OPNsense/make.conf similarity index 100% rename from config/current/make.conf rename to config/OPNsense/make.conf diff --git a/config/current/ports.conf b/config/OPNsense/ports.conf similarity index 100% rename from config/current/ports.conf rename to config/OPNsense/ports.conf diff --git a/config/current/src.conf b/config/OPNsense/src.conf similarity index 100% rename from config/current/src.conf rename to config/OPNsense/src.conf diff --git a/scripts/port_skim.sh b/scripts/port_skim.sh index 5ba3a96..73fb0df 100755 --- a/scripts/port_skim.sh +++ b/scripts/port_skim.sh @@ -27,7 +27,7 @@ set -e -PORT_LIST=/usr/tools/config/current/ports.conf +PORT_LIST=/usr/tools/config/OPNsense/ports.conf FREEBSD=/usr/freebsd-ports OPNSENSE=/usr/ports