[1668] | 1 | #! /bin/sh
|
---|
| 2 |
|
---|
| 3 | PACKAGES=`pwd`
|
---|
[1704] | 4 | cd ..
|
---|
| 5 | GSDLHOME=`pwd`
|
---|
| 6 | cd $PACKAGES
|
---|
[2952] | 7 | GSDLOS=`uname -s |tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
---|
[2421] | 8 | prefix=""
|
---|
| 9 | bindir=""
|
---|
[2725] | 10 | HOSTTARGETFLAGS=""
|
---|
[1668] | 11 |
|
---|
[2380] | 12 | USE_CORBA=false
|
---|
[2642] | 13 | MICO_DIR=default
|
---|
[2019] | 14 |
|
---|
[1715] | 15 | # parse any arguments given from toplevel configure
|
---|
| 16 | while test $# -ne 0; do
|
---|
| 17 | case "$1" in
|
---|
| 18 | --cache-file=*)
|
---|
| 19 | cache_filename=`echo $1 | sed s/--cache-file=//`
|
---|
| 20 | # turn relative path into an absolute path
|
---|
| 21 | cache_dir=`echo $cache_filename | sed 's@/[^/]*$@@'`
|
---|
| 22 | cache_dir=`cd $cache_dir 2>/dev/null && pwd`
|
---|
| 23 |
|
---|
| 24 | cache_basefile=`echo $cache_filename | sed 's@.*/@@'`
|
---|
| 25 | cache_file="$cache_dir/$cache_basefile"
|
---|
| 26 | if test ! -f "$cache_file"; then
|
---|
| 27 | CACHE_FILE=""
|
---|
| 28 | else
|
---|
| 29 | CACHE_FILE="--cache-file=$cache_file"
|
---|
| 30 | fi
|
---|
| 31 | ;;
|
---|
[1940] | 32 | --enable-z3950)
|
---|
| 33 | USE_Z3950=true
|
---|
| 34 | ;;
|
---|
[2113] | 35 | --enable-corba)
|
---|
| 36 | USE_CORBA=true
|
---|
| 37 | ;;
|
---|
[2173] | 38 | --with-micodir=*)
|
---|
| 39 | if test $1 = ""; then
|
---|
| 40 | $1 = "default"
|
---|
| 41 | fi
|
---|
| 42 | MICO_DIR=$1
|
---|
| 43 | ;;
|
---|
[2421] | 44 | --prefix=*)
|
---|
| 45 | prefix=`echo $1 | sed s/--prefix=//`
|
---|
| 46 | ;;
|
---|
[2019] | 47 | --bindir=*)
|
---|
[2421] | 48 | # where to install binaries to
|
---|
[2169] | 49 | bindir=`echo $1 | sed s/--bindir=//`
|
---|
[2952] | 50 | # turn relative path into an absolute path
|
---|
| 51 | if test -d "$bindir" ; then
|
---|
| 52 | bindir=`cd "$bindir" ; pwd `
|
---|
[2169] | 53 | cd "$PACKAGES"
|
---|
| 54 | elif test -z `echo $bindir | sed '/^\// p;D'` ; then
|
---|
[2952] | 55 | rel_bindir="`echo $bindir | sed s@/.*@@`"
|
---|
| 56 | cd "$rel_bindir"
|
---|
| 57 | bindir="`pwd`/`echo $bindir | sed s@^[^/]*/@@`"
|
---|
[2169] | 58 | cd "$PACKAGES"
|
---|
| 59 | else
|
---|
| 60 | # bindir doesn't exist, and isn't relative
|
---|
| 61 | true
|
---|
| 62 | fi
|
---|
[2019] | 63 | ;;
|
---|
[2725] | 64 | --host=* | --target=*)
|
---|
| 65 | HOSTTARGETFLAGS="$HOSTTARGETFLAGS $1"
|
---|
| 66 | ;;
|
---|
[1715] | 67 | *)
|
---|
| 68 | # ignore all other options for now
|
---|
| 69 | ;;
|
---|
| 70 | esac
|
---|
| 71 | shift
|
---|
| 72 | done
|
---|
| 73 |
|
---|
[2421] | 74 | # note! Our GSDL package currently always installs into it's source
|
---|
| 75 | # directory, ignoring any --prefix given to configure.
|
---|
| 76 | # When this is fixed, uncomment the relevant lines below...
|
---|
| 77 |
|
---|
| 78 | ##if test -z "$prefix" ; then
|
---|
| 79 | prefix="${GSDLHOME}"
|
---|
| 80 | ##fi
|
---|
| 81 |
|
---|
| 82 | ##if test -z "$bindir" ; then
|
---|
| 83 | bindir="${prefix}/bin/$GSDLOS"
|
---|
| 84 | ##fi
|
---|
| 85 |
|
---|
[2952] | 86 | # This loads the top configure's cache file, with variables already set.
|
---|
| 87 | if test -f "$cache_file" ; then
|
---|
| 88 | . $cache_file
|
---|
| 89 | fi
|
---|
[2421] | 90 |
|
---|
[2169] | 91 | # we assume that gzip and tar are on the search path.
|
---|
| 92 | # non-GNU versions of tar don't take the -z option.
|
---|
| 93 |
|
---|
[2380] | 94 | if test $USE_CORBA = true ; then
|
---|
[2173] | 95 | if test $MICO_DIR = default; then
|
---|
| 96 | # configure the MICO CORBA ORB
|
---|
| 97 | echo ""
|
---|
| 98 | echo "Configuring MICO CORBA"
|
---|
| 99 | echo ""
|
---|
[1715] | 100 |
|
---|
[2173] | 101 | cd "$PACKAGES/mico"
|
---|
| 102 | gzip -dc mico-2.3.5.tar.gz | tar -xf -
|
---|
| 103 | cd mico
|
---|
| 104 | ./configure $CACHE_FILE --prefix=$PACKAGES/mico/ --disable-coss --disable-naming --disable-relship --disable-events --disable-streams --disable-property --disable-trader --disable-time --disable-debug --enable-optimize --enable-final --enable-speed-tune
|
---|
| 105 | sed 's/tools//' $PACKAGES/mico/mico/Makefile | sed 's/ldconfig//' >$PACKAGES/mico/mico/Makefile.out
|
---|
| 106 | mv $PACKAGES/mico/mico/Makefile.out $PACKAGES/mico/mico/Makefile
|
---|
| 107 | else
|
---|
| 108 | #MICO is on the system path
|
---|
| 109 | echo ""
|
---|
| 110 | echo "Taking MICO from system paths"
|
---|
| 111 | echo ""
|
---|
| 112 | fi
|
---|
[2169] | 113 | else
|
---|
| 114 | echo "corba support disabled - mico compiler not required."
|
---|
| 115 | echo " add '--enable-corba' to the configure command to include corba support."
|
---|
| 116 | echo ""
|
---|
[2113] | 117 | fi
|
---|
[1715] | 118 |
|
---|
[2129] | 119 |
|
---|
| 120 |
|
---|
| 121 |
|
---|
[2169] | 122 |
|
---|
[1668] | 123 | # configure the wvWare Word document converter
|
---|
| 124 | echo ""
|
---|
| 125 | echo "Configuring wvWare"
|
---|
[1978] | 126 | echo ""
|
---|
[1668] | 127 |
|
---|
[1996] | 128 | cd "$PACKAGES/wv"
|
---|
[2169] | 129 | gzip -dc wv-0.6.3-gs.tar.gz | tar -xf -
|
---|
[1978] | 130 | cd wv-gs
|
---|
[2582] | 131 | # datadir is for default location of wvHtml.xml config file
|
---|
[2725] | 132 | ./configure $CACHE_FILE --prefix=$PACKAGES/wv --bindir="$bindir" --datadir="$prefix/etc/packages" $HOSTTARGETFLAGS
|
---|
[1668] | 133 |
|
---|
[1961] | 134 | # configure the pdftohtml converter
|
---|
| 135 | echo ""
|
---|
| 136 | echo "Configuring pdftohtml"
|
---|
| 137 | echo ""
|
---|
[1668] | 138 |
|
---|
[1996] | 139 | cd "$PACKAGES/pdftohtml"
|
---|
[2349] | 140 | gzip -dc pdftohtml_gs.tar.gz | tar -xf -
|
---|
[2421] | 141 | cd pdftohtml_0_22
|
---|
[2725] | 142 | ./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
|
---|
[1961] | 143 |
|
---|
[2582] | 144 | # rtftohtml converter
|
---|
| 145 | echo ""
|
---|
| 146 | echo "Configuring rtftohtml"
|
---|
| 147 | echo ""
|
---|
[2349] | 148 |
|
---|
[2582] | 149 | cd "$PACKAGES/rtftohtml"
|
---|
| 150 | gzip -dc rtftohtml-gs.tar.gz | tar -xf -
|
---|
[2902] | 151 | cd rtftohtml_src
|
---|
| 152 | ./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
|
---|
[2582] | 153 |
|
---|
| 154 |
|
---|
[1715] | 155 | # YAZ Z39.50 toolkit
|
---|
[2052] | 156 | echo ""
|
---|
| 157 | echo "Configuring YAZ"
|
---|
[2169] | 158 | if test x$USE_Z3950 = xtrue ;
|
---|
[1940] | 159 | then
|
---|
| 160 | echo ""
|
---|
| 161 | cd "$PACKAGES/yaz"
|
---|
[2725] | 162 | ./configure $CACHE_FILE $HOSTTARGETFLAGS
|
---|
[1940] | 163 | else
|
---|
[2052] | 164 | echo "Z39.50 support disabled - YAZ library not required."
|
---|
| 165 | echo " add '--enable-z3950' to the configure command to include z39.50 support."
|
---|
[1940] | 166 | echo ""
|
---|
| 167 | fi
|
---|
[1715] | 168 |
|
---|
[1704] | 169 | # configure wget
|
---|
| 170 | echo ""
|
---|
| 171 | echo "Configuring wget"
|
---|
| 172 | echo ""
|
---|
| 173 | cd $PACKAGES/wget
|
---|
[2349] | 174 | gzip -dc wget.tar.gz | tar -xf -
|
---|
[1704] | 175 | cd $PACKAGES/wget/wget-1.5.3
|
---|
[2725] | 176 | ./configure $CACHE_FILE --prefix=$PACKAGES/wget --bindir="$bindir" $HOSTTARGETFLAGS
|
---|
[2169] | 177 |
|
---|
[2809] | 178 | # configure XML::Parser perl module
|
---|
| 179 | echo ""
|
---|
| 180 | echo "Configuring XML::Parser"
|
---|
| 181 | echo ""
|
---|
| 182 | cd $PACKAGES/cpan
|
---|
[2895] | 183 | gzip -dc XML-Parser-2.27.tar.gz | tar -xf -
|
---|
| 184 | cd $PACKAGES/cpan/XML-Parser-2.27
|
---|
[2915] | 185 | perl Makefile.PL "$GSDLHOME"
|
---|
[2169] | 186 |
|
---|
| 187 |
|
---|
[2809] | 188 |
|
---|
[2914] | 189 |
|
---|