source: bootstrap_libs@ 10573

Last change on this file since 10573 was 9744, checked in by bless, 13 years ago
  • explicitly using bash, not sh
  • easier configuration of packages (and their versions)
  • better failure handling for various cases
  • suppressed some output, e.g. from tar unpacking
  • script now always aborts on failure
  • Property svn:executable set to *
File size: 2.5 KB
Line 
1#!/bin/bash
2
3function catch_errors() {
4 echo "Script aborted, because an unexpected error occured.";
5 exit 1;
6}
7
8if [ ! `which wget` ]; then
9 echo "You need wget for this script. Please install it first, e.g., sudo apt-get install wget. Aborted."
10 exit 1
11fi
12
13mkdir build
14
15# setup
16export PREFIX=`cd ./build; pwd`
17mkdir libs
18cd libs
19
20# now set the error trap so that re-running the script doesn't fail
21# on previous directory commands...
22# this will trap any subsequent errors or commands with non-zero exit status
23# by calling function catch_errors()
24trap catch_errors ERR;
25
26
27# apache runtime
28#wget http://apache.linux-mirror.org/apr/apr-1.4.2.tar.gz
29#tar xvvzf apr-1.4.2.tar.gz
30#cd apr-1.4.2
31#./configure --prefix=$PREFIX
32#make && make install
33#cd ..
34
35# apache runtime utilities
36#wget http://apache.linux-mirror.org/apr/apr-util-1.3.10.tar.gz
37#tar xvvzf apr-util-1.3.10.tar.gz
38#cd apr-util-1.3.10
39#./configure --prefix=$PREFIX --with-apr=$PREFIX
40#make && make install
41#cd ..
42
43# log4cxx
44#wget http://ftp.uni-erlangen.de/pub/mirrors/apache/logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.tar.gz
45#cp ../etc/patch/apache-log4cxx-0.10.0.diff ./
46#tar xvvzf apache-log4cxx-0.10.0.tar.gz
47#patch -p0 <apache-log4cxx-0.10.0.diff
48#cd apache-log4cxx-0.10.0
49#./configure --prefix=$PREFIX --with-apr=$PREFIX --with-apr-util=$PREFIX
50#make && make install
51#cd ..
52
53# boost 1.39.0
54boostpkg=boost_1_39_0
55wget http://downloads.sourceforge.net/sourceforge/boost/${boostpkg}.tar.gz || { echo "** Failed to retrieve ${boostpkg}. Please check network connectivity or availability of the package on the server. Stop."; exit 1; }
56echo -n "Unpacking ${boostpkg}... " && tar xzf ${boostpkg}.tar.gz && echo " done."
57cd ${boostpkg}
58echo -n "Calling bootstrap.sh ... " && ./bootstrap.sh --libdir=$PREFIX/lib --prefix=$PREFIX --with-libraries="date_time,system,thread,test,regex" >/dev/null && echo " done."
59echo "Calling bjam. This may take a while..."
60./bjam install
61cd ..
62
63# gnu multiprecision library
64gmppkg=gmp-4.3.1
65wget ftp://ftp.gmplib.org/pub/${gmppkg}/${gmppkg}.tar.gz || { echo "** Failed to retrieve ${gmppkg}. Please check network connectivity or availability of the package on the server. Stop."; exit 1; }
66echo -n "Unpacking ${gmppkg}... " && tar xzf ${gmppkg}.tar.gz && echo " done."
67cd ${gmppkg}
68./configure --prefix=$PREFIX
69make && make install
70cd ..
71
72cd ..
73./configure --prefix=$PREFIX --with-boost=$PREFIX CPPFLAGS=-I$PREFIX/include LDFLAGS=-L$PREFIX/lib
74make && make install
75
76echo "Done."
77
78export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PREFIX/lib
79
80# end of script
Note: See TracBrowser for help on using the repository browser.