summaryrefslogtreecommitdiff
path: root/build_mpdec.sh
blob: 5bae0c2b3534eec69702f9a0178333bff34fb021 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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