#!/usr/bin/env modbuild # Download happens in the default prep via urls: in files/config.yaml. # unpacker: none because BINARY.setup patches paths relative to its final # location — we untar once, directly into $PREFIX, instead of unpacking # ~20 GB into the build tmp and copying it over. pbuild::configure() { : } pbuild::compile() { : } pbuild::install() { cd "${PREFIX}" tar -xzf "${SRC_DIR}/ccp4-${V}-shelx-arp-x86_64.tar.gz" # Pre-agree the CCP4 licence so BINARY.setup skips its interactive prompt # (downloading from ccp4.ac.uk already required accepting it). The printf # answers any prompt a newer BINARY.setup might still ask; printf instead # of `yes` because modbuild runs with pipefail and yes dies by SIGPIPE. touch "${PREFIX}/.agree2ccp4v6" "${HOME}/.agree2ccp4v6" printf 'y\ny\ny\n' | "./ccp4-${V_MAJOR}.${V_MINOR}/BINARY.setup" # version-independent symlink so the modulefile survives 9.0.xxx updates ln -sfn "ccp4-${V_MAJOR}.${V_MINOR}" ccp4 }