diff --git a/recipes/vmatch/build.sh b/recipes/vmatch/build.sh index def9cc24de704..bd4a7aef230fd 100644 --- a/recipes/vmatch/build.sh +++ b/recipes/vmatch/build.sh @@ -6,12 +6,10 @@ set -euxo pipefail # Those variables are also used in pre and post-link scripts BIN_DIR="$PREFIX"/bin SHARE_DIR="$PREFIX"/share/${PKG_NAME}-${PKG_VERSION}-${PKG_BUILDNUM} -PLUGIN_DIR="$SHARE_DIR"/plugin DOC_DIR="$SHARE_DIR"/doc # Create directories mkdir -p ${BIN_DIR} -mkdir -p ${PLUGIN_DIR} mkdir -p ${SHARE_DIR} mkdir -p ${DOC_DIR} mkdir -p ${PREFIX}/lib @@ -27,9 +25,10 @@ fi # Compile selection functions and install them. # The SYSTEM variable is not really needed # but we set it as should be done. +# The libs are installed in ${PREFIX}/lib so `vmatch` +# can find them without the full path. pushd SELECT SYSTEM=$(uname -s) make -cp -p *.so ${PLUGIN_DIR} cp -p *.so ${PREFIX}/lib popd diff --git a/recipes/vmatch/post-link.sh b/recipes/vmatch/post-link.sh index 47998a666c7d8..4a82c950622d1 100644 --- a/recipes/vmatch/post-link.sh +++ b/recipes/vmatch/post-link.sh @@ -1,21 +1,11 @@ #!/bin/bash SHARE_DIR="$PREFIX"/share/${PKG_NAME}-${PKG_VERSION}-${PKG_BUILDNUM} -PLUGIN_DIR="$SHARE_DIR"/plugin MKVTREESMAPDIR="$SHARE_DIR"/TRANS/ # Create activate script mkdir -p ${PREFIX}/etc/conda/activate.d -ACTIVATE_SCRIPT=${PREFIX}/etc/conda/activate.d/${PKG_NAME}-${PKG_VERSION}-${PKG_BUILDNUM}.sh -# This variable holds the name of a environement variable -# that contains the value of LD_LIBRARY_PATH before activating the environment. -# Its name doesn't include the version (should be enough since there is only one version per env) -SAVE_VARIABLE_NAME=LD_LIBRARY_PATH_BEFORE_${PKG_NAME} echo "# Activate script for ${PKG_NAME}-${PKG_VERSION}-${PKG_BUILDNUM} -# Save LD_LIBRARY_PATH -export ${SAVE_VARIABLE_NAME}=\${LD_LIBRARY_PATH} -# Modify it -export LD_LIBRARY_PATH=${PLUGIN_DIR}:\${LD_LIBRARY_PATH} # Export MKVTREESMAPDIR export MKVTREESMAPDIR=${MKVTREESMAPDIR} " > ${ACTIVATE_SCRIPT} @@ -24,18 +14,16 @@ export MKVTREESMAPDIR=${MKVTREESMAPDIR} mkdir -p ${PREFIX}/etc/conda/deactivate.d DEACTIVATE_SCRIPT=${PREFIX}/etc/conda/deactivate.d/${PKG_NAME}-${PKG_VERSION}-${PKG_BUILDNUM}.sh echo "# Deactivate script for ${PKG_NAME}-${PKG_VERSION}-${PKG_BUILDNUM} -# Restore LD_LIBRARY_PATH -export LD_LIBRARY_PATH=\${${SAVE_VARIABLE_NAME}} # Remove MKVTREESMAPDIR unset MKVTREESMAPDIR -# Remove ${SAVE_VARIABLE_NAME} -unset ${SAVE_VARIABLE_NAME} " > ${DEACTIVATE_SCRIPT} # Write a message for the user -echo "Selection functions are installed in ${PLUGIN_DIR}. +echo " +vmatch selection functions are installed in ${PREFIX}/lib. +You can use them without specifying their full path. Symbol map files are installed in ${MKVTREESMAPDIR}. -Activation and deactivation scripts will set LD_LIBRARY_PATH and MKVTREESMAPDIR accordingly -so you can use selection functions and symbol map files without specifying their full path. +Activation and deactivation scripts will set MKVTREESMAPDIR accordingly +so you can use symbol map files without specifying their full path. Those scripts are in ${ACTIVATE_SCRIPT} and ${DEACTIVATE_SCRIPT} respectively. " > $PREFIX/.messages.txt