#! /bin/bash

set -e
set -x

cd "$(mktemp -dt plumed.XXXXXX)"

echo "installing xdrfile library"
# wget ftp://ftp.gromacs.org/pub/contrib/xdrfile-1.1.4.tar.gz
# xdrfile was removed from gromacs ftp
# as a workaround I added a copy to people.sissa.it/~bussi/plumed
# this complies with its license
# wget people.sissa.it/~bussi/plumed/xdrfile-1.1.4.tar.gz

# better to download from github, that should be even more reliable:
wget https://github.com/plumed/other_packages/raw/master/xdrfile-1.1.4.tar.gz

tar xzf xdrfile-1.1.4.tar.gz

cd xdrfile-1.1.4

./configure --enable-shared --prefix="$HOME/opt"

make

make install

cd ../

