From d9542438229dbc4c94df29cf72488defd38d2be7 Mon Sep 17 00:00:00 2001 From: Dennis Heimbigner Date: Wed, 20 Apr 2022 15:48:21 -0600 Subject: [PATCH] missing file' --- plugins/Makefile.am | 2 +- plugins/stdinstall.in | 56 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 plugins/stdinstall.in diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 802a3a95a..fb0a3332a 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -20,7 +20,7 @@ BZIP2SRC = blocksort.c huffman.c crctable.c randtable.c compress.c decompress.c EXTRA_DIST = CMakeLists.txt # The HDF5 filter wrappers -EXTRA_DIST += \ +EXTRA_DIST += stdinstall.in \ H5Ztemplate.c H5Zmisc.c H5Zutil.c H5Znoop.c h5noop.h NCZmisc.c \ H5Zshuffle.c H5Zdeflate.c H5Zszip.c H5Zszip.h \ H5Zbzip2.c h5bzip2.h H5Zblosc.c H5Zblosc.h H5Zzstd.c H5Zzstd.h diff --git a/plugins/stdinstall.in b/plugins/stdinstall.in new file mode 100644 index 000000000..bc79f5a6c --- /dev/null +++ b/plugins/stdinstall.in @@ -0,0 +1,56 @@ +#!/bin/bash + +if test "x$srcdir" = x ; then srcdir=`pwd`; fi +. ../test_common.sh + +set -x + +INSTALLDIR=@PLUGIN_INSTALL_DIR@ + +# Load the findplugins function +. ${builddir}/findplugin.sh +echo "findplugin.sh loaded" + +installhdf5plugin() { +PLUG="$1" +# Locate the plugin path and the library name; argument order is critical +findplugin h5${PLUG} +if ! test -f "$HDF5_PLUGIN_DIR/$HDF5_PLUGIN_LIB" ; then + echo "Not exists: ${HDF5_PLUGIN_DIR}/$HDF5_PLUGIN_LIB ; ignored" + return +fi +if ! test -d "${INSTALLDIR}" ; then + echo "Not exists: ${INSTALLDIR} ; creating" + mkdir ${INSTALLDIR} +fi +echo "Installing: $HDF5_PLUGIN_DIR/$HDF5_PLUGIN_LIB into $INSTALLDIR" +cp -f "$HDF5_PLUGIN_DIR/$HDF5_PLUGIN_LIB" $INSTALLDIR +} + +installnczplugin() { +PLUG="$1" +# Locate the plugin path and the library name; argument order is critical +findplugin ncz${PLUG} +if ! test -f "$HDF5_PLUGIN_DIR/$HDF5_PLUGIN_LIB" ; then + echo "Not exists: ${HDF5_PLUGIN_DIR}/$HDF5_PLUGIN_LIB ; ignored" + return +fi +echo "Installing: $HDF5_PLUGIN_DIR/$HDF5_PLUGIN_LIB into $INSTALLDIR" +cp "$HDF5_PLUGIN_DIR/$HDF5_PLUGIN_LIB" $INSTALLDIR +} + +if test "x$USEPLUGINS" != x ; then + if test "x$INSTALLDIR" != x ; then + installhdf5plugin bzip2 + installhdf5plugin zstd + installhdf5plugin blosc + if test "x$FEATURE_NCZARR" ; then + installhdf5plugin fletcher32 + installhdf5plugin shuffle + installhdf5plugin deflate + installhdf5plugin szip + installnczplugin defaults + installnczplugin szip + fi + fi +fi