summaryrefslogtreecommitdiff
path: root/build_mpdec.sh
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2018-08-12 17:46:34 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2018-08-12 17:46:34 -0400
commitc1d553388d7ef1ba387bc01747e7da23f6b7ccc6 (patch)
tree35545e296c27778ad0a84705146e0ddd431fb351 /build_mpdec.sh
downloaddocker-buildsys-vanilla-c1d553388d7ef1ba387bc01747e7da23f6b7ccc6.tar.gz
Initial commit
Diffstat (limited to 'build_mpdec.sh')
-rwxr-xr-xbuild_mpdec.sh34
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