source: tags/greenstone-3_01-distribution/gs2build-extra/packages.configure@ 10896

Last change on this file since 10896 was 10896, checked in by (none), 18 years ago

This commit was manufactured by cvs2svn to create tag
'greenstone-3_01-distribution'.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 4.5 KB
Line 
1#! /bin/sh
2
3PACKAGES=`pwd`
4cd ..
5GSDLHOME=`pwd`
6cd $PACKAGES
7
8GSDLOS=`uname -s |tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9# check for running bash under cygwin
10if test "`echo $GSDLOS | sed 's/cygwin//'`" != "$GSDLOS" ;
11then
12 GSDLOS=windows
13fi
14
15prefix=""
16bindir=""
17HOSTTARGETFLAGS=""
18
19# parse any arguments given from toplevel configure
20while 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
64done
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
71prefix="${GSDLHOME}"
72##fi
73
74##if test -z "$bindir" ; then
75bindir="${prefix}/bin/$GSDLOS"
76##fi
77
78# This loads the top configure's cache file, with variables already set.
79if test -f "$cache_file" ; then
80 . $cache_file
81fi
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
86# configure the wvWare Word document converter
87echo ""
88echo "Configuring wvWare"
89echo ""
90
91cd "$PACKAGES/wv"
92gzip -dc wv-0.7.1-gs.tar.gz | tar -xf -
93# datadir is for default location of wvHtml.xml config file
94cd wv-gs && \
95./configure $CACHE_FILE --prefix=$PACKAGES/wv --bindir="$bindir" --datadir="$prefix/etc/packages" $HOSTTARGETFLAGS
96
97# configure the pdftohtml converter
98echo ""
99echo "Configuring pdftohtml"
100echo ""
101
102cd "$PACKAGES/pdftohtml"
103gzip -dc pdftohtml_0_36_gs.tar.gz | tar -xf -
104cd pdftohtml_gs && \
105./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
106
107# rtftohtml converter
108echo ""
109echo "Configuring rtftohtml"
110echo ""
111
112cd "$PACKAGES/rtftohtml"
113gzip -dc rtftohtml-gs.tar.gz | tar -xf -
114cd rtftohtml_src && \
115./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
116
117# configure wget
118echo ""
119echo "Configuring wget"
120echo ""
121cd "$PACKAGES/wget"
122gzip -dc wget.tar.gz | tar -xf -
123cd "$PACKAGES/wget/wget-1.9" && \
124./configure $CACHE_FILE --prefix=$PACKAGES/wget --bindir="$bindir" $HOSTTARGETFLAGS
125
126# configure expat (needs to be done before XML::Parser
127echo ""
128echo "Configuring expat"
129echo ""
130cd "$PACKAGES/expat"
131gzip -dc expat-1.95.8.tar.gz | tar -xf -
132cd "$PACKAGES/expat/expat-1.95.8" && \
133./configure $CACHE_FILE --prefix=$PACKAGES/expat --bindir="$bindir" $HOSTTARGETFLAGS
134
135# configure XML::Parser perl module
136echo ""
137echo "Configuring XML::Parser"
138echo ""
139cd "$PACKAGES/cpan"
140perl_dir=`echo 'my $vn = $]; $vn =~ s/5\.00(\d).*$/perl-5.$1/; print "$vn" ' | perl`
141gzip -dc XML-Parser-2.34.tar.gz | tar -xf -
142cd "$PACKAGES/cpan/XML-Parser-2.34" && \
143perl Makefile.PL \
144 INSTALLSITELIB="$GSDLHOME/perllib/cpan/$perl_dir" \
145 PREFIX="$GSDLHOME/perllib/cpan/XML" \
146 INSTALLMAN1DIR="$GSDLHOME/perllib/cpan/$perl_dir" \
147 INSTALLMAN3DIR="$GSDLHOME/perllib/cpan/$perl_dir" \
148 SITEPREFIX="$GSDLHOME/perllib/cpan" \
149 EXPATINCPATH="$GSDLHOME/packages/expat/include" \
150 EXPATLIBPATH="$GSDLHOME/packages/expat/lib"
151
152# configure powerpoint converter
153echo ""
154echo "Configuring xlhtml (powerpoint & excel converter)"
155echo ""
156cd "$PACKAGES/xlhtml"
157gzip -dc xlhtml-0.4.9.0-gs.tar.gz | tar -xf -
158cd xlhtml-0.4.9.0 && \
159./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
160
161
162# configure IsisGdl program
163echo ""
164echo "Configuring IsisGdl (CDS/ISIS database reader)"
165echo ""
166cd "$PACKAGES/isis-gdl" && \
167./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
Note: See TracBrowser for help on using the repository browser.