[5820] | 1 | #! /bin/sh
|
---|
| 2 |
|
---|
| 3 | PACKAGES=`pwd`
|
---|
| 4 | cd ..
|
---|
[7711] | 5 | GSDL3HOME=`pwd`
|
---|
[5820] | 6 | cd $PACKAGES
|
---|
| 7 |
|
---|
| 8 | GSDLOS=`uname -s |tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
---|
| 9 | # check for running bash under cygwin
|
---|
| 10 | if test "`echo $GSDLOS | sed 's/cygwin//'`" != "$GSDLOS" ;
|
---|
| 11 | then
|
---|
| 12 | GSDLOS=windows
|
---|
| 13 | fi
|
---|
| 14 |
|
---|
| 15 | prefix=""
|
---|
| 16 | bindir=""
|
---|
| 17 | HOSTTARGETFLAGS=""
|
---|
| 18 |
|
---|
| 19 | # parse any arguments given from toplevel configure
|
---|
| 20 | while test $# -ne 0; do
|
---|
| 21 | case "$1" in
|
---|
| 22 | --cache-file=*)
|
---|
| 23 | cache_filename=`echo $1 | sed s/--cache-file=//`
|
---|
| 24 | # turn relative path into an absolute path
|
---|
| 25 | cache_dir=`echo $cache_filename | sed 's@/[^/]*$@@'`
|
---|
| 26 | cache_dir=`cd $cache_dir 2>/dev/null && pwd`
|
---|
| 27 |
|
---|
| 28 | cache_basefile=`echo $cache_filename | sed 's@.*/@@'`
|
---|
| 29 | cache_file="$cache_dir/$cache_basefile"
|
---|
| 30 | if test ! -f "$cache_file"; then
|
---|
| 31 | CACHE_FILE=""
|
---|
| 32 | else
|
---|
| 33 | CACHE_FILE="--cache-file=$cache_file"
|
---|
| 34 | fi
|
---|
| 35 | ;;
|
---|
| 36 | --prefix=*)
|
---|
| 37 | prefix=`echo $1 | sed s/--prefix=//`
|
---|
| 38 | ;;
|
---|
| 39 | --bindir=*)
|
---|
| 40 | # where to install binaries to
|
---|
| 41 | bindir=`echo $1 | sed s/--bindir=//`
|
---|
| 42 | # turn relative path into an absolute path
|
---|
| 43 | if test -d "$bindir" ; then
|
---|
| 44 | bindir=`cd "$bindir" ; pwd `
|
---|
| 45 | cd "$PACKAGES"
|
---|
| 46 | elif test -z `echo $bindir | sed '/^\// p;D'` ; then
|
---|
| 47 | rel_bindir="`echo $bindir | sed s@/.*@@`"
|
---|
| 48 | cd "$rel_bindir"
|
---|
| 49 | bindir="`pwd`/`echo $bindir | sed s@^[^/]*/@@`"
|
---|
| 50 | cd "$PACKAGES"
|
---|
| 51 | else
|
---|
| 52 | # bindir doesn't exist, and isn't relative
|
---|
| 53 | true
|
---|
| 54 | fi
|
---|
| 55 | ;;
|
---|
| 56 | --host=* | --target=*)
|
---|
| 57 | HOSTTARGETFLAGS="$HOSTTARGETFLAGS $1"
|
---|
| 58 | ;;
|
---|
| 59 | *)
|
---|
| 60 | # ignore all other options for now
|
---|
| 61 | ;;
|
---|
| 62 | esac
|
---|
| 63 | shift
|
---|
| 64 | done
|
---|
| 65 |
|
---|
| 66 | # note! Our GSDL package currently always installs into it's source
|
---|
| 67 | # directory, ignoring any --prefix given to configure.
|
---|
| 68 | # When this is fixed, uncomment the relevant lines below...
|
---|
| 69 |
|
---|
| 70 | ##if test -z "$prefix" ; then
|
---|
[7711] | 71 | prefix="${GSDL3HOME}"
|
---|
[5820] | 72 | ##fi
|
---|
| 73 |
|
---|
| 74 | ##if test -z "$bindir" ; then
|
---|
| 75 | bindir="${prefix}/bin/$GSDLOS"
|
---|
| 76 | ##fi
|
---|
| 77 |
|
---|
| 78 | # This loads the top configure's cache file, with variables already set.
|
---|
| 79 | if test -f "$cache_file" ; then
|
---|
| 80 | . $cache_file
|
---|
| 81 | fi
|
---|
| 82 |
|
---|
| 83 | # we assume that gzip and tar are on the search path.
|
---|
| 84 | # non-GNU versions of tar don't take the -z option.
|
---|
| 85 |
|
---|
[7711] | 86 | #configure mg
|
---|
| 87 | echo ""
|
---|
| 88 | echo "Configuring MG"
|
---|
| 89 | echo ""
|
---|
| 90 |
|
---|
| 91 | # what does HOSTTARGETFLAGS do??
|
---|
| 92 | cd "$PACKAGES/mg"
|
---|
| 93 | ./configure $CACHE_FILE --prefix="$prefix" $HOSTTARGETFLAGS
|
---|
| 94 | cd "$PACKAGES"
|
---|
| 95 |
|
---|
| 96 | #configure mgpp
|
---|
| 97 | echo ""
|
---|
| 98 | echo "Configuring MGPP"
|
---|
| 99 | echo ""
|
---|
| 100 | cd "$PACKAGES/mgpp"
|
---|
| 101 | ./configure $CACHE_FILE --prefix="$prefix" $HOSTTARGETFLAGS
|
---|
| 102 | cd "$PACKAGES"
|
---|
| 103 |
|
---|
[5820] | 104 | # configure mysql
|
---|
[7872] | 105 | #echo ""
|
---|
| 106 | #echo "Configuring MySQL"
|
---|
| 107 | #echo ""
|
---|
[5820] | 108 |
|
---|
[7872] | 109 | #cd "$PACKAGES/mysql"
|
---|
| 110 | #if test ! -e mysql-4.0.16; then
|
---|
| 111 | # gzip -dc mysql-4.0.16.tar.gz | tar -xf -
|
---|
| 112 | #fi
|
---|
| 113 | #cd mysql-4.0.16
|
---|
| 114 | #./configure $CACHE_FILE --prefix="$PACKAGES/mysql" --libexec="$PACKAGES/mysql/libexec"
|
---|
| 115 | #cd "$PACKAGES"
|
---|
| 116 | #if test ! -e libexec; then
|
---|
| 117 | # mkdir libexec
|
---|
| 118 | #fi
|
---|
[5820] | 119 |
|
---|
| 120 | # configure the wvWare Word document converter
|
---|
| 121 |
|
---|
[6421] | 122 | if test -e "$PACKAGES/wv"; then
|
---|
| 123 | echo ""
|
---|
| 124 | echo "Configuring wvWare"
|
---|
| 125 | echo ""
|
---|
[5820] | 126 |
|
---|
[6421] | 127 | cd "$PACKAGES/wv"
|
---|
| 128 | gzip -dc wv-0.7.1-gs.tar.gz | tar -xf -
|
---|
| 129 | cd wv-gs
|
---|
| 130 | # datadir is for default location of wvHtml.xml config file
|
---|
| 131 | ./configure $CACHE_FILE --prefix=$PACKAGES/wv --bindir="$bindir" --datadir="$prefix/etc/packages" $HOSTTARGETFLAGS
|
---|
| 132 | fi
|
---|
| 133 |
|
---|
[5820] | 134 | # configure the pdftohtml converter
|
---|
[6421] | 135 | if test -e "$PACKAGES/pdftohtml"; then
|
---|
| 136 | echo ""
|
---|
| 137 | echo "Configuring pdftohtml"
|
---|
| 138 | echo ""
|
---|
[5820] | 139 |
|
---|
[6421] | 140 | cd "$PACKAGES/pdftohtml"
|
---|
| 141 | gzip -dc pdftohtml_0_34.tar.gz | tar -xf -
|
---|
| 142 | cd pdftohtml_0_34
|
---|
| 143 | ./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
|
---|
| 144 | fi
|
---|
[5820] | 145 |
|
---|
| 146 | # rtftohtml converter
|
---|
[6421] | 147 | if test -e "$PACKAGES/rtftohtml"; then
|
---|
| 148 | echo ""
|
---|
| 149 | echo "Configuring rtftohtml"http://kanuka.cs.waikato.ac.nz:8070/gsdl3
|
---|
| 150 | echo ""
|
---|
[5820] | 151 |
|
---|
[6421] | 152 | cd "$PACKAGES/rtftohtml"
|
---|
| 153 | gzip -dc rtftohtml-gs.tar.gz | tar -xf -
|
---|
| 154 | cd rtftohtml_src
|
---|
| 155 | ./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
|
---|
| 156 | fi
|
---|
[5820] | 157 |
|
---|
| 158 | # configure wget
|
---|
[6421] | 159 | if test -e "$PACKAGES/wget"; then
|
---|
| 160 | echo ""
|
---|
| 161 | echo "Configuring wget"
|
---|
| 162 | echo ""
|
---|
| 163 | cd "$PACKAGES/wget"
|
---|
| 164 | gzip -dc wget.tar.gz | tar -xf -
|
---|
| 165 | cd "$PACKAGES/wget/wget-1.5.3"
|
---|
| 166 | ./configure $CACHE_FILE --prefix=$PACKAGES/wget --bindir="$bindir" $HOSTTARGETFLAGS
|
---|
| 167 | fi
|
---|
[5820] | 168 |
|
---|
| 169 | # configure powerpoint converter
|
---|
[6421] | 170 | if test -e "$PACKAGES/xlhtml"; then
|
---|
| 171 | echo ""
|
---|
| 172 | echo "Configuring xlhtml (powerpoint & excel converter)"
|
---|
| 173 | echo ""
|
---|
| 174 | cd "$PACKAGES/xlhtml"
|
---|
| 175 | gzip -dc xlhtml-0.4.9.0-gs.tar.gz | tar -xf -
|
---|
| 176 | cd xlhtml-0.4.9.0
|
---|
| 177 | ./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
|
---|
| 178 | fi
|
---|