1 | #! /bin/sh
|
---|
2 |
|
---|
3 | PACKAGES=`pwd`
|
---|
4 | cd ..
|
---|
5 | GSDLHOME=`pwd`
|
---|
6 | cd $PACKAGES
|
---|
7 | GSDLOS=`uname | tr A-Z a-z`
|
---|
8 | bindir=$GSDLHOME/bin/$GSDLOS
|
---|
9 |
|
---|
10 |
|
---|
11 | # parse any arguments given from toplevel configure
|
---|
12 | while test $# -ne 0; do
|
---|
13 | case "$1" in
|
---|
14 | --cache-file=*)
|
---|
15 | cache_filename=`echo $1 | sed s/--cache-file=//`
|
---|
16 | # turn relative path into an absolute path
|
---|
17 | cache_dir=`echo $cache_filename | sed 's@/[^/]*$@@'`
|
---|
18 | cache_dir=`cd $cache_dir 2>/dev/null && pwd`
|
---|
19 |
|
---|
20 | cache_basefile=`echo $cache_filename | sed 's@.*/@@'`
|
---|
21 | cache_file="$cache_dir/$cache_basefile"
|
---|
22 | if test ! -f "$cache_file"; then
|
---|
23 | CACHE_FILE=""
|
---|
24 | else
|
---|
25 | CACHE_FILE="--cache-file=$cache_file"
|
---|
26 | fi
|
---|
27 | ;;
|
---|
28 | --enable-z3950)
|
---|
29 | USE_Z3950=true
|
---|
30 | ;;
|
---|
31 | --bindir=*)
|
---|
32 | bindira=`echo $1 | sed s/--bindir=//`
|
---|
33 | # turn relative path into an absolute path
|
---|
34 | bindir=`echo $bindira | sed 's@/[^/]*$@@'`
|
---|
35 | bindir=`cd $bindir 2>/dev/null && pwd`
|
---|
36 | bindirb=`echo $bindira | sed 's@.*/@@'`
|
---|
37 | bindir="$bindir/$bindirb"
|
---|
38 | ;;
|
---|
39 | *)
|
---|
40 | # ignore all other options for now
|
---|
41 | ;;
|
---|
42 | esac
|
---|
43 | shift
|
---|
44 | done
|
---|
45 |
|
---|
46 |
|
---|
47 |
|
---|
48 | # configure the wvWare Word document converter
|
---|
49 | echo ""
|
---|
50 | echo "Configuring wvWare"
|
---|
51 | echo ""
|
---|
52 |
|
---|
53 | cd "$PACKAGES/wv"
|
---|
54 | tar -xzf wv-0.6.3-gs.tar.gz
|
---|
55 | cd wv-gs
|
---|
56 | ./configure $CACHE_FILE --prefix=$PACKAGES/wv --bindir=$bindir
|
---|
57 |
|
---|
58 | # configure the pdftohtml converter
|
---|
59 | echo ""
|
---|
60 | echo "Configuring pdftohtml"
|
---|
61 | echo ""
|
---|
62 |
|
---|
63 | cd "$PACKAGES/pdftohtml"
|
---|
64 | tar -xzf pdftohtml_0_22_gs.tar.gz
|
---|
65 | cd pdftohtml_0_22
|
---|
66 |
|
---|
67 | # YAZ Z39.50 toolkit
|
---|
68 | echo ""
|
---|
69 | echo "Configuring YAZ"
|
---|
70 | if test x"$USE_Z3950" = "xtrue";
|
---|
71 | then
|
---|
72 | echo ""
|
---|
73 | cd "$PACKAGES/yaz"
|
---|
74 | ./configure $CACHE_FILE
|
---|
75 | else
|
---|
76 | echo "Z39.50 support disabled - YAZ library not required."
|
---|
77 | echo " add '--enable-z3950' to the configure command to include z39.50 support."
|
---|
78 | echo ""
|
---|
79 | fi
|
---|
80 |
|
---|
81 | # configure wget
|
---|
82 | echo ""
|
---|
83 | echo "Configuring wget"
|
---|
84 | echo ""
|
---|
85 | cd $PACKAGES/wget
|
---|
86 | tar -xzf wget.tar.gz
|
---|
87 | cd $PACKAGES/wget/wget-1.5.3
|
---|
88 | ./configure $CACHE_FILE --prefix=$PACKAGES/wget --bindir=$bindir
|
---|