Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 77 lines (60 sloc) 1.546 kb
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
1 #!/bin/bash
2
3 VERSION="$1"
4 DISTRO="$2"
5 COMPILER="gcc-4.0"
6 TARBALL="cherokee-${VERSION}.tar.gz"
7 SRC_DIR="cherokee-${VERSION}"
8
9 # Install a few packages
10 echo "deb http://ftp.us.debian.org/debian/ $DISTRO main" >/etc/apt/sources.list
11 apt-get update
12 apt-get -f -y install
13
14 apt-get -y install $COMPILER make libtool bison flex libpam0g-dev
15 for i in `seq 3`; do
16 apt-get -f -y install
17 sleep 1
18 done
19
20 # Unpack the tarball
21 cd /tmp
22 echo "Unpacking $TARBALL.."
23 tar xfz $TARBALL
24
25
26 failed_to_compile() {
27 echo "Failed to compile $1"
28 exit 1
29 }
30
31 common_compilation() {
32 name=$1
33 conf=$2
34 target_dir="${SRC_DIR}_${name}"
35
36 rm -rf $target_dir
37 cp -r $SRC_DIR $target_dir
38 cd $target_dir
39 ./configure $conf || failed_to_compile $name
40 make || failed_to_compile $name
41 cd ..
42 }
43
44 # Compile it in the default way
45 #
46 common_compilation "default" ""
47
48 # Compile it statically
49 #
50 common_compilation "static" "--enable-static --enable-static-module=all"
51
52 # Compile it again with GNUTLS
53 #
54 apt-get -y install libgnutls-dev
55 common_compilation "gnutls" "--enable-tls=gnutls"
56 apt-get -y remove libgnutls-dev
57
58 # Compile it again with OpenSSL
59 #
60 apt-get -y install libssl-dev
61 common_compilation "openssl" "--enable-tls=openssl"
62 apt-get -y remove libssl-dev
63
64 # Compile u-Cherokee
65 #
66 target="uCherokee"
67 target_dir="${SRC_DIR}_${target}"
68
69 cp -r $SRC_DIR $target_dir
70 cd $target_dir
71 ./configure --disable-pthread --disable-tls --disable-largefile || failed_to_compile $target
72 cd cherokee
73 make -f Makefile.embedded || failed_to_compile $target
74 cd ../..
75
76
Something went wrong with that request. Please try again.