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

Last change on this file since 7884 was 7884, checked in by kjdon, 20 years ago

strip the c/c++ executables

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 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# unpack tomcat and rename directory
37cd comms/jakarta/
38unzip jakarta-tomcat-4.1.30.zip
39mv jakarta-tomcat-4.1.30 tomcat
40
41#edit the tomcat setclasspath script to add our classpath
42mv ./tomcat/bin/setclasspath.sh ./tomcat/bin/setclasspath.sh.orig
43cat ./tomcat/bin/setclasspath.sh.orig | sed 's,CLASSPATH=,CLASSPATH=\"$CLASSPATH\":,' > ./tomcat/bin/setclasspath.sh
44
45#make everyone happy by giving the right permissions to the shell scripts
46chmod a+x ./tomcat/bin/*.sh
47
48#rename server.xml files
49mv ./tomcat/conf/server.xml ./tomcat/conf/server-withexamples.xml.config
50mv ./tomcat/conf/server-noexamples.xml.config ./tomcat/conf/server.xml
51cd $GSDL3HOME
52
53#extract the soap jar file
54cd comms/soap
55unzip soap-bin-2.3.1.zip
56mv soap-2_3_1 soap
57cp soap/lib/soap.jar $GSDL3HOME/lib/java
58cd $GSDL3HOME
59
60# get mysql
61cd packages/mysql
62unzip mysql-4.0.20-linux.zip
63
64./bin/mysql_install_db --user=root --force
65./bin/mysqld_safe --user=root --pid_file=gsdl3.pid &
66sleep 2
67./bin/mysql --user=root --execute="GRANT SELECT,INSERT,DELETE,UPDATE,DROP,CREATE ON *.* TO gsdl3admin@localhost;"
68./bin/mysql --user=root --execute="GRANT SELECT ON *.* TO gsdl3reader@localhost;"
69
70# set up any sample collections databases
71#gs3mgdemo
72./bin/mysql --user=root --execute="create database localsite_gs3mgdemo;"
73./bin/mysql --user=root localsite_gs3mgdemo < $gsdl3home/web/sites/localsite/collect/gs3mgdemo/mysqldatadump.sql
74
75./bin/mysqladmin --user=root shutdown
76cd $gsdl3home
77
78
79#compile the test servlet
80source gs3-setup.sh
81cd web/WEB-INF/classes
82javac TestServlet.java
83cd $GSDL3HOME
84
85# make mg and mgpp compile statically
86cd packages/mg
87cat ./configure.in | sed 's,LDFLAGS=,LDFLAGS=-static,' > ./configure.in.tmp
88mv configure.in.tmp configure.in
89autoconf configure.in > configure
90cd $GSDL3HOME
91
92cd packages/mgpp
93cat ./configure.in | sed 's,LDFLAGS=,LDFLAGS=-static,' > ./configure.in.tmp
94mv configure.in.tmp configure.in
95autoconf configure.in > configure
96cd $GSDL3HOME
97
98
99./configure
100make
101make install
102make distclean
103
104# strip the c/c== executables
105strip bin/*
106
107
108
Note: See TracBrowser for help on using the repository browser.