source: main/trunk/greenstone2/makegs2.sh@ 27131

Last change on this file since 27131 was 27131, checked in by ak19, 11 years ago

Linux script for compiling GS2, making sure we have gnome-lib if needed, compiling it up if needed, and setting up the gnome-lib env for configuring and compiling wvware successfully when configuring and compiling gs2.

  • Property svn:executable set to *
File size: 2.1 KB
RevLine 
[27131]1#!/bin/bash
2
3# run as: ./makegs2.sh
4# or ./makegs2.sh src to check out gnome-lib src from svn
5
6# NOT SUPPORTED YET: or run as ./makegs2.sh min
7# to check out gnome-lib minimal binary from svn (won't be working out
8# which minimal version is required for now, 32/64 bit, linux/darwin)
9
10gsdlhome=`pwd`
11echo "**** GSDLHOME: $gsdlhome"
12docheckout=$1
13
14gnomelibsrc=$gsdlhome/ext/gnome-lib
15gnomelibbin=$gsdlhome/ext/gnome-lib-minimal
16gnomelib=
17
18
19# 1. grab gnome-lib src (or bin eventually) from svn if told to
20if [ "x$docheckout" = "xsrc" ]; then
21 if [ ! -d "$gnomelibbin" ]; then
22 svn co http://svn.greenstone.org/gs2-extensions/gnome-lib/trunk/src ext/gnome-lib
23 fi
24#elif [ "x$docheckout" = "xmin" ]; then
25# work out os and bit-architecture
26# and then can get the correct gnome-lib bin version for this from svn
27fi
28
29
30# 2. compile gnome-lib if we need to
31if [ -d "$gnomelibbin" ]; then
32
33 echo "**** Found a gnomelib binary"
34 gnomelib=$gnomelibbin
35
36elif [ -d "$gnomelibsrc" ]; then
37
38 echo "**** Found a gnomelib src folder"
39 gnomelib=$gnomelibsrc
40
41 if [ -d "$gnomelibsrc/linux" ]; then
42 echo "*** gnomelib already compiled up in $gnomelibsrc/linux"
43 else
44 echo "*** Going to compile up the $gnomelibsrc folder"
45 cd $gnomelib
46 ./CASCADE-MAKE.sh
47 #cd $gsdlhome
48 fi
49else
50 echo "@@@@ No gnome-lib found.... Proceding to compile without it..."
51 echo "@@@@ Assuming this is what you want (Ctrl-C to cancel compilation)"
52 sleep 3
53fi
54
55
56# 3. set up compiling environment to use gnome-lib, if there is a gnome-lib
57if [ ! -z "$gnomelib" ] ; then
58 echo "***** gnomelib folder: $gnomelib"
59 cd $gnomelib
60 source devel.bash
61 #cd $gsdlhome
62fi
63
64
65# 4. now can compile as usual, having set up the environment for wvware
66cd $gsdlhome
67./configure --enable-apache-httpd
68make
69make install
70
71
72# 5. Message to warn user that the env of this x-term uses gnome-lib
73# and GUIs may not work from this console
74echo "*** The environment for this console has been set to compile Greenstone with gnome-lib."
75echo "**** As a result, graphical applications may not work well. Open a new console."
Note: See TracBrowser for help on using the repository browser.