set -e -x -u

tar xzf postgresql/postgresql-9.3.4.tar.gz

cd postgresql-9.3.4

if [ "`uname -m`" == "ppc64le" ]; then
  cp ${BOSH_COMPILE_TARGET}/config/config.{guess,sub} ./config
fi

./configure --prefix=${BOSH_INSTALL_TARGET}
make world
make install-world
