From df956d197232e57a93c055d06996ec38b2653ed5 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Tue, 21 Jan 2020 13:28:24 -0500 Subject: Add hstdp-2019.5 --- etc/hstdp-2019.5/tasks/001-packages.sh | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100755 etc/hstdp-2019.5/tasks/001-packages.sh (limited to 'etc/hstdp-2019.5/tasks/001-packages.sh') diff --git a/etc/hstdp-2019.5/tasks/001-packages.sh b/etc/hstdp-2019.5/tasks/001-packages.sh new file mode 100755 index 0000000..e948120 --- /dev/null +++ b/etc/hstdp-2019.5/tasks/001-packages.sh @@ -0,0 +1,43 @@ +#!/bin/bash +set -e +set -x + +prefix="${TOOLCHAIN}" +sysconfdir="${TOOLCHAIN_BUILD}/etc/${PIPELINE}" +reqdir=${sysconfdir}/pkgs +blddir=builds + +export PATH="${prefix}/bin:${PATH}" +export CFLAGS="-I${prefix}/include" +export LDFLAGS="-L${prefix}/lib -Wl,-rpath=${prefix}/lib" +export PREFIX="${prefix}" + +function pre() +{ + if [[ ! -d ${reqdir} ]]; then + # Nothing there, but maybe that's on purpose. + exit 0 + fi + mkdir -p "${blddir}" + pushd ${blddir} &>/dev/null +} + +function build() +{ + pre + # Iterate over binary package build scripts + for req in ${reqdir}/* + do + chmod +x "${req}" + "${req}" + done + post +} + +function post() +{ + popd &>/dev/null + [[ -d ${blddir} ]] && rm -rf "${blddir}" +} + +build -- cgit