Debian Codegraph @

ci/build-1-autotools.sh

raw
1 #!/bin/bash
2
3 set -e
4 set -x
5
6 if [[ "$OSTYPE" == "darwin"* ]]; then
7 exit 0
8 fi
9
10 AUTOCONF=http://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.gz
11 AUTOMAKE=http://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.gz
12 LIBTOOL=http://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.gz
13 PREFIX=$(pwd)/ci/build
14 PATH=$(pwd)/ci/build/bin:$PATH
15
16 if [ ! -d ci ]; then
17 echo "you must run this in the root fping directory" >&2
18 exit 1
19 fi
20
21 # remove standard versions
22 sudo apt-get remove -qq autoconf automake autotools-dev libtool
23
24 # prepare build environment
25 cd ci
26 rm -rf build
27 mkdir -p build/src
28 cd build/src
29
30 # autoconf
31 (
32 AUTOCONF_FILE=$(basename $AUTOCONF)
33 AUTOCONF_DIR=$(echo $AUTOCONF_FILE | sed -e 's/\.tar.*//')
34 wget $AUTOCONF
35 tar xf $AUTOCONF_FILE
36 cd $AUTOCONF_DIR
37 ./configure --prefix=$PREFIX
38 make install
39 )
40
41 # automake
42 (
43 AUTOMAKE_FILE=$(basename $AUTOMAKE)
44 AUTOMAKE_DIR=$(echo $AUTOMAKE_FILE | sed -e 's/\.tar.*//')
45 wget $AUTOMAKE
46 tar xf $AUTOMAKE_FILE
47 cd $AUTOMAKE_DIR
48 ./configure --prefix=$PREFIX
49 make install
50 )
51
52 # libtool
53 (
54 LIBTOOL_FILE=$(basename $LIBTOOL)
55 LIBTOOL_DIR=$(echo $LIBTOOL_FILE | sed -e 's/\.tar.*//')
56 wget $LIBTOOL
57 tar xf $LIBTOOL_FILE
58 cd $LIBTOOL_DIR
59 ./configure --prefix=$PREFIX
60 make install
61 )