51 lines
1.2 KiB
Plaintext
Executable File
51 lines
1.2 KiB
Plaintext
Executable File
#!/usr/bin/env modbuild
|
|
|
|
|
|
|
|
pbuild::prep() {
|
|
: ${CUDA_VERSION:?No CUDA_VERSION set}
|
|
#local cuda="${CUDA_VERSION%.*}" IF the cua version matches the cuda version in the filename
|
|
local cuda="${CUDA_VERSION%.*}"
|
|
#otherwise:
|
|
local cuda="12.0"
|
|
local filename="imod_${V_PKG}_RHEL8-64_CUDA${cuda}.sh"
|
|
# beta release link for Merlin7 ( RH8 for Opensuse)
|
|
local url="https://bio3d.colorado.edu/ftp/latestIMOD/RHEL8-64_CUDA${cuda}/$filename"
|
|
local dst="$PMODULES_DISTFILESDIR/${filename}"
|
|
if [ -f "$dst" ]; then
|
|
echo "Found cached $dst" >&2
|
|
else
|
|
${curl:-curl} \
|
|
--location \
|
|
--fail \
|
|
--output "$dst" \
|
|
"$url"
|
|
fi
|
|
}
|
|
|
|
pbuild::configure() {
|
|
:
|
|
}
|
|
|
|
pbuild::compile() {
|
|
:
|
|
}
|
|
|
|
pbuild::install() {
|
|
: ${CUDA_VERSION:?No CUDA_VERSION set}
|
|
#local cuda="${CUDA_VERSION%.*}"
|
|
#(if cuda version matches the file name) if not:
|
|
local cuda="12.0"
|
|
|
|
local filename="imod_${V_PKG}_RHEL8-64_CUDA${cuda}.sh"
|
|
local dst="$PMODULES_DISTFILESDIR/${filename}"
|
|
|
|
mkdir -p "$PREFIX/profile.d"
|
|
sh "$dst" \
|
|
-yes \
|
|
-dir "$PREFIX" \
|
|
-script "$PREFIX/profile.d"
|
|
|
|
}
|
|
|