Build HDFView module
Notations
$PMODULES_ROOT: root of Pmodules environment. At PSI this is /opt/psi.
$GRP: group the module is installed in, here 'Tools'
$P: package name, here HDFView.
$V: package version.
$PREFIX: prefix of module, this is $PMODULES_ROOT/$GRP/$P/$V which is at PSI /opt/psi/Tools/HDFView/$V.
$BUILDBLOCK_DIR: the directory of this file.
MODULEFILES_DIR: top-level directory where the modulefiles are installed relative to the group: $PMODULES_ROOT/$GRP/modulefiles.
$RELEASE: release of module either 'unstable', 'stable' or 'deprecated'
Download
Download the package from https://www.hdfgroup.org/downloads/hdfview/. The compressed tar-file contains a shell-script installer.
Install the package
- Unpack the downloaded tar-file
cd "$PMODULES_ROOT/Tools".- Run the installer script
- Accept the license
- Answer 'no' to the question "Do you want to include the subdirectory HDFView-$V-Linux?"
- HDFView will be installed into
$PREFIX
Post-install
mkdir "$PREFIX"/{bin,libexec}mv "$PREFIX/hdfview.sh" "$PREFIX/libexec"install --mode 0755 "$BUILDBLOCK_DIR/HDFView" "$PREFIX/bin"
Install files for Pmodules
install --mode 0644 "$BUILDBLOCK_DIR/modulefile" "$MODULEFILES_DIR/$P/$V"- `echo "$RELEASE" > "$MODULEFILES_DIR/$P/.release-$V"