From 45672a4735533484439a04825f9accd35137591f Mon Sep 17 00:00:00 2001 From: Dennis Terhorst Date: Fri, 11 Nov 2022 16:46:59 +0100 Subject: [PATCH 1/3] add plan files for builder itself :) --- plans/Builder/0.1/default | 38 ++++++++++++++++++++++++++++++++ plans/Builder/0.1/default.module | 24 ++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 plans/Builder/0.1/default create mode 100644 plans/Builder/0.1/default.module diff --git a/plans/Builder/0.1/default b/plans/Builder/0.1/default new file mode 100644 index 0000000..c066282 --- /dev/null +++ b/plans/Builder/0.1/default @@ -0,0 +1,38 @@ +#!/bin/bash +# +# Builder – Compile scripts for local installs of software packages. +# Copyright (C) 2020 Forschungszentrum Jülich GmbH, INM-6 +# +# Builder is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Builder is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Builder. If not, see . +# +# SPDX-License-Identifier: GPL-3.0-or-later +# +URL="https://github.com/INM-6/Builder/archive/v${VERSION}.tar.gz" +MD5SUM="d00f46d1ed303ef0585d4f5877a0881b" +SHA256SUM="c0c31bf219a655437064e61e6185b2e09dd40f961d695d0dbba59c9c58045985" + +build_prepare() { + log_status ">>> nothing to prepare" +} +build_package() { + log_status ">>> nothing to build" +} +build_install () { + log_status ">>> installing..." + mkdir -pv "${LOG}" + cd "${SOURCE}" + mkdir -pv "${TARGET}" + cp -rv build_functions.sh plans "${TARGET}" 2>&1 | tee "${LOG}/make-install.log" + cp -rv build.sh "${TARGET}/build" 2>&1 | tee "${LOG}/make-install.log" +} diff --git a/plans/Builder/0.1/default.module b/plans/Builder/0.1/default.module new file mode 100644 index 0000000..1d9af88 --- /dev/null +++ b/plans/Builder/0.1/default.module @@ -0,0 +1,24 @@ +#%Module1.0##################################################################### +# +# ${AUTOMATIC_BUILD_WARNING} +# +set INSTALLDIR "${TARGET}" + +proc ModulesHelp { } { + puts stderr " + Collection of tools and scripts to install software on a system. + + In contrast to usual packaging systems, the aim is to equally help users and + admins. Many aspects are inspired by Portage, which is used by the Gentoo + Linux distribution. + + See https://github.com/INM-6/Builder +" +} + +module-whatis "Bash testing framework (${VERSION})" + +conflict ${PACKAGE} +${PREREQ_DEPENDS} + +prepend-path PATH \$INSTALLDIR From 56596e6a75d95a5d5eb02713a360058c1548c317 Mon Sep 17 00:00:00 2001 From: Dennis Terhorst Date: Thu, 12 Jan 2023 11:17:40 +0100 Subject: [PATCH 2/3] add `build Builder` hint in README --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 5d278e8..4f67eef 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,11 @@ To set up the defaults for Builder run the configure command once: Then you can configure all relevant paths in `~/.buildrc`. A more complete description is in the [configuration details](doc/Configuration.md). +**Hint:** *You can also use Builder to install itself, which has the benefit of +installing a suitable modulefile automatically. See [Install](doc/Install.md) +for details.* + + ### Optional To make best use of the installed packages, you likely also want to install a From cb55d281625a707f79014319d596f7551dee4841 Mon Sep 17 00:00:00 2001 From: Dennis Terhorst Date: Mon, 16 Jan 2023 17:20:27 +0100 Subject: [PATCH 3/3] code-style fixes --- plans/nest-simulator/3.1/default | 1 + plans/nest-simulator/common | 2 +- plans/nest-simulator/master/default | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plans/nest-simulator/3.1/default b/plans/nest-simulator/3.1/default index 0d9edd3..195de0c 100644 --- a/plans/nest-simulator/3.1/default +++ b/plans/nest-simulator/3.1/default @@ -25,4 +25,5 @@ SHA256SUM=5c11dd6b451c4c6bf93037bf29d5231c6c75a0e1a8863344f6fb9bb225f279ca CMAKEFLAGS+=" -Dwith-boost=ON -Dwith-python=ON -Dwith-mpi=ON -Dwith-detailed-timers=ON -Dwith-ltdl=OFF" +# shellcheck source=plans/nest-simulator/common source "$(dirname "${PLAN}")/../common" diff --git a/plans/nest-simulator/common b/plans/nest-simulator/common index d7eb5d0..a1b1d25 100755 --- a/plans/nest-simulator/common +++ b/plans/nest-simulator/common @@ -62,7 +62,7 @@ module_install () { log_status ">>> installing module file to ${module_path}" mkdir -pv "$(dirname "${module_path}")" module="$(cat "${PLAN}.module")" - if version_gt $BASH_VERSION 4.4; then + if version_gt "${BASH_VERSION}" "4.4"; then echo -e "${module@P}" >"${module_path}" else # this is a bad substitute for the power of the bash>4.4 notation. diff --git a/plans/nest-simulator/master/default b/plans/nest-simulator/master/default index a91d7e6..936b8cf 100644 --- a/plans/nest-simulator/master/default +++ b/plans/nest-simulator/master/default @@ -23,4 +23,5 @@ URL="https://github.com/nest/nest-simulator/archive/${VERSION}.tar.gz" CMAKEFLAGS+=" -Dwith-boost=ON -Dwith-python=ON -Dwith-mpi=ON -Dwith-detailed-timers=ON -Dwith-ltdl=OFF" +# shellcheck source=plans/nest-simulator/common source "$(dirname "${PLAN}")/../common"