source: trunk/gsdl3/dist-resources/gs3-prepare-for-dist.sh@ 8001

Last change on this file since 8001 was 8001, checked in by mdewsnip, 20 years ago

Fixed the tiny little problem preventing the GLI from being compiled.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 3.6 KB
Line 
1#!/bin/sh
2
3if [ ! -f gs3-setup.sh ]; then
4 echo "You must run this script from within the Greenstone 3 home directory"
5 exit 1
6fi
7
8#check that GSDL3HOME is set
9source gs3-setup.sh
10
11if test -z "$CVSROOT" ; then
12 echo "You need to set the environment variable CVSROOT before running"
13 echo "this script. Please use the same path that you used to check out"
14 echo "the Greentone repository. If you are not using anonymous cvs, you"
15 echo "also need to set the variable CVS_RSH to ssh."
16 exit;
17fi
18
19# firstly, remove unwanted directories
20cvs update -dRP
21
22# now check out extra bits
23cd packages
24cvs co -P mgpp
25cd $GSDL3HOME
26
27cvs co -P gli
28cd gli
29./makegli.sh
30cd classes
31jar cf GLI.jar org images META-INF/MANIFEST.MF *.properties
32rm -r org
33mv GLI.jar ../
34cd $GSDL3HOME
35
36###############################
37# SETUP TOMCAT
38###############################
39
40# unpack tomcat and rename directory
41cd comms/jakarta/
42unzip jakarta-tomcat-4.1.30.zip
43mv jakarta-tomcat-4.1.30 tomcat
44
45# edit the tomcat setclasspath scripts to add our classpath
46mv ./tomcat/bin/setclasspath.bat ./tomcat/bin/setclasspath.bat.orig
47cat ./tomcat/bin/setclasspath.bat.orig | sed 's,CLASSPATH=,CLASSPATH=%CLASSPATH%;,' > ./tomcat/bin/setclasspath.bat
48mv ./tomcat/bin/setclasspath.sh ./tomcat/bin/setclasspath.sh.orig
49cat ./tomcat/bin/setclasspath.sh.orig | sed 's,CLASSPATH=,CLASSPATH=\"$CLASSPATH\":,' > ./tomcat/bin/setclasspath.sh
50
51#make everyone happy by giving the right permissions to the shell scripts
52chmod a+x ./tomcat/bin/*.sh
53
54#rename server.xml files
55mv ./tomcat/conf/server.xml ./tomcat/conf/server-withexamples.xml.config
56#mv ./tomcat/conf/server-noexamples.xml.config ./tomcat/conf/server.xml
57# @gsdl3home@ will be set by the installer, and 8080 replaced with the correct port
58cp server.xml.in ./tomcat/conf/server.xml
59cd $GSDL3HOME
60
61###############################
62# SETUP SOAP
63###############################
64#extract the soap jar file
65cd comms/soap
66unzip soap-bin-2.3.1.zip
67mv soap-2_3_1 soap
68cp soap/lib/soap.jar $GSDL3HOME/lib/java
69# move the localsite deployment description into the soap webapp - localsite comes predeployed
70cp DeployedServices.ds soap/webapps/soap/
71# disable soap by renaming the web.xml file
72mv ./soap/webapps/soap/WEB-INF/web.xml ./soap/webapps/soap/WEB-INF/web.xml.disabled
73
74cd $GSDL3HOME
75
76################################
77# SETUP MYSQL + SAMPLE DATABASES
78################################
79cd packages/mysql
80unzip mysql-4.0.20-linux.zip
81mkdir var
82mkdir var/log
83chmod 777 var var/log
84./scripts/mysql_install_db --user=root --force
85./bin/mysqld_safe --user=root --pid_file=gsdl3.pid &
86sleep 2
87./bin/mysql --user=root --execute="GRANT SELECT,INSERT,DELETE,UPDATE,DROP,CREATE ON *.* TO gsdl3admin@localhost;"
88./bin/mysql --user=root --execute="GRANT SELECT ON *.* TO gsdl3reader@localhost;"
89
90# set up any sample collections databases
91#gs3mgdemo
92./bin/mysql --user=root --execute="create database localsite_gs3mgdemo;"
93./bin/mysql --user=root localsite_gs3mgdemo < $GSDL3HOME/web/sites/localsite/collect/gs3mgdemo/mysqldatadump.sql
94
95./bin/mysqladmin --user=root shutdown
96cd $GSDL3HOME
97
98
99#compile the test servlet
100source gs3-setup.sh
101cd web/WEB-INF/classes
102javac TestServlet.java
103cd $GSDL3HOME
104
105# make mg and mgpp compile statically
106cd packages/mg
107cat ./configure.in | sed 's,LDFLAGS=,LDFLAGS=-static,' > ./configure.in.tmp
108mv configure.in.tmp configure.in
109autoconf configure.in > configure
110cd $GSDL3HOME
111
112cd packages/mgpp
113cat ./configure.in | sed 's,LDFLAGS=,LDFLAGS=-static,' > ./configure.in.tmp
114mv configure.in.tmp configure.in
115autoconf configure.in > configure
116cd $GSDL3HOME
117
118
119./configure
120make
121make install
122make distclean
123
124# strip the c/c++ executables
125strip bin/*
126
127
128
Note: See TracBrowser for help on using the repository browser.