diff options
Diffstat (limited to 'build_mpdec.sh')
-rwxr-xr-x | build_mpdec.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/build_mpdec.sh b/build_mpdec.sh new file mode 100755 index 0000000..5bae0c2 --- /dev/null +++ b/build_mpdec.sh @@ -0,0 +1,34 @@ +#!/bin/bash +set -e +set -x + +tarball="mpdecimal-2.4.2.tar.gz" +dest="${tarball%%.tar.gz}" +url="http://www.bytereef.org/software/mpdecimal/releases/${tarball}" +prefix="/usr" + +function pre() +{ + curl -LO "${url}" + tar xf "${tarball}" +} + +function build() +{ + pre + pushd "${dest}" + export LDFLAGS="-Wl,-rpath=$prefix/lib" + ./configure --prefix=$prefix + make + make install + popd + post +} + +function post() +{ + echo "All done." +} + +# Main +build |