Ticket #100: build.sh

File build.sh, 44.6 KB (added by kmaclean, 16 years ago)
Line 
1#!/bin/bash
2
3# error
4checkError(){
5   if [ $1 -ne 0 ];
6   then
7       echo "WRE ERROR: "$2" did not complete successfully."
8       exit
9   fi
10}
11                 
12
13# clean all the folders for a new build
14clean(){
15 #utilities
16  cd source/utils/lftp-3.3.4
17  make distclean
18  make clean
19  cd ../zlib-1.2.3
20  make distclean
21  make clean
22  cd ../openssl-0.9.7i
23  make distclean
24  make clean
25  cd ../libtool-1.5.22
26  make distclean
27  make clean
28  cd ../catdoc-0.94
29  make distclean
30  make clean
31  cd $BUILDDIR
32 #memcached
33  cd source/memcached/libevent-1.1a
34  make distclean
35  make clean
36  cd ../memcached-1.1.12
37  make distclean
38  make clean
39  cd $BUILDDIR
40 #perl
41  cd source/perl/perl-5.8.8
42  make distclean
43  make clean
44  cd $BUILDDIR
45 #apache
46  cd source/apache/httpd-2.0.58
47  make distclean
48  make clean
49  rm -Rf server/exports.c
50  rm -Rf server/export_files
51  # !!!!!!
52  cd ../mod_perl-2.0.2
53  make distclean
54  make clean
55  cd $BUILDDIR
56 #mysql
57  cd source/mysql/mysql-5.0.22
58  make distclean
59  cd $BUILDDIR
60 #image magick
61  cd source/imagemagick/ImageMagick-6.2.7
62  make distclean
63  make clean
64  cd ../libpng-1.2.10
65  make distclean
66  make clean
67  cd ../libungif-4.1.4
68  make distclean
69  make clean
70  cd ../libjpeg-6b
71  make distclean
72  make clean
73  cd ../freetype-2.1.10
74  make distclean
75  make clean
76  cd $BUILDDIR
77 #perl modules
78 # !!!!!!
79  cd source/perl/modules
80  cd ../libapreq2-2.0.7
81  make distclean
82  make clean
83  # !!!!!!
84  cd ../Compress-Zlib-1.39
85  make distclean
86  make clean
87  # !!!!!!
88  cd ../Net_SSLeay.pm-1.25
89  make distclean
90  make clean
91  cd $BUILDDIR
92}
93
94# utilities
95buildUtils(){
96        echo Building Utilities
97        mkdir -p /data/wre/prereqs/utils/bin
98
99        cd source/utils/lftp-3.3.4
100        # !!!!!!
101        ./configure CC=gcc --prefix=/data/wre/prereqs/utils; checkError $? "lftp Configure"
102        make; checkError $? "lftp make"
103        make install exec_prefix=/data/wre/prereqs/utils; checkError $? "lftp make install"
104
105        cd ../zlib-1.2.3
106        # !!!!!!
107        CC=gcc ./configure --prefix=/data/wre/prereqs/utils --shared; checkError $? "zlib Configure"
108        make; checkError $? "zlib make"
109        make install; checkError $? "zlib make install"
110       
111        cd ../openssl-0.9.7i
112        # !!!!!! but Perl does not exist yet????
113        # regardless does not affect the results of #./config -t or #./apps/openssl version -p
114        # PERL="/data/wre/prereqs/perl/bin/perl" ./config  -shared -DCFLAG="-fPIC"  --prefix=/data/wre/prereqs/utils; checkError $? "OpenSSL Configure"
115        ./config  -shared -DCFLAG="-fPIC"  --prefix=/data/wre/prereqs/utils; checkError $? "OpenSSL Configure"
116        make; checkError $? "OpenSSL make"
117        make test; checkError $? "OpenSSL make test"
118        make install; checkError $? "OpenSSL make install"
119
120        cd ../libtool-1.5.22
121        # !!!!!!
122        ./configure CC=gcc --prefix=/data/wre/prereqs/utils; checkError $? "libtool Configure"
123        make; checkError $? "libtool make"
124        make install; checkError $? "libtool make install"
125        cd ../catdoc-0.94
126        ./configure --prefix=/data/wre/prereqs/utils --disable-wordview --without-wish --with-input=utf-8 --with-output=utf-8 --disable-charset-check --disable-langinfo; checkError $? "catdoc Configure"
127        make; checkError $? "catdoc make"
128        cd src
129        make install; checkError $? "catdoc make install src"
130        cd ../docs
131        make install; checkError $? "catdoc make install docs"
132        cd ../charsets
133        make install; checkError $? "catdoc make install charsets"
134        cd ..
135        cd ../xpdf-3.01
136        ./configure --without-x --prefix=/data/wre/prereqs/utils; checkError $? "pdftotext Configure"
137        make; checkError $? "pdftotext make"
138        make install; checkError $? "pdftotext make install"
139        echo /data/wre/prereqs/utils/pdftotext \$@ \$@.txt > /data/wre/prereqs/utils/bin/pdf2txt
140        echo /bin/cat \$@.txt >> /data/wre/prereqs/utils/bin/pdf2txt
141        echo /bin/rm -f \$@.txt >> /data/wre/prereqs/utils/bin/pdf2txt
142        chmod 755 /data/wre/prereqs/utils/bin/pdf2txt
143        cd $BUILDDIR
144}
145
146# memcached
147buildMemcached(){
148        echo Building memcached
149        mkdir -p /data/wre/prereqs/memcached/bin
150        mkdir -p /data/wre/prereqs/memcached/lib
151        cd source/memcached/libevent-1.1a
152        # !!!!!!
153        ./configure CC=gcc --prefix=/data/wre/prereqs/memcached; checkError $? "libevent Configure"
154        make; checkError $? "libevent make"
155        make install; checkError $? "libevent make install"
156        cd ../memcached-1.1.12
157        # !!!!!!
158        ./configure CC=gcc --with-libevent=/data/wre/prereqs/memcached --prefix=/data/wre/prereqs/memcached; checkError $? "memcached Configure"
159        make; checkError $? "memcached make"
160        make install; checkError $? "memcached make install"
161        cd $BUILDDIR
162}
163
164# perl
165buildPerl(){
166        echo Building Perl
167        mkdir -p /data/wre/prereqs/perl/bin
168        mkdir -p /data/wre/prereqs/perl/man/man1
169        mkdir -p /data/wre/prereqs/perl/lib
170        mkdir -p /data/wre/prereqs/perl/include
171        cd source/perl/perl-5.8.8
172        # !!!!!!
173        ./Configure -Dcc=gcc -Dprefix=/data/wre/prereqs/perl -Dccflags='-fno-strict-aliasing -pipe -I/usr/local/include -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm' -Dcccdlflags='-fPIC'  -des; checkError $? "Perl Configure"
174        make; checkError $? "Perl make"
175        #make test; checkError $? "Perl make test"
176        make install; checkError $? "Perl make install"
177        cd $BUILDDIR
178}
179
180
181# apache
182buildApache(){
183        echo Building Apache
184        mkdir -p /data/wre/prereqs/apache/bin
185        mkdir -p /data/wre/prereqs/apache/man/man1
186        mkdir -p /data/wre/prereqs/apache/lib
187        mkdir -p /data/wre/prereqs/apache/include
188        mkdir -p /data/wre/prereqs/apache/conf
189       
190        cd source/apache/httpd-2.0.58
191        case $OSNAME in
192                Linux)
193                        # insists upon using it's own zlib and ours, which won't work, so temporarily hiding ours
194                        mv /data/wre/prereqs/utils/include/zlib.h /data/wre/prereqs/utils/include/zlib.h.ignore
195                        ;;
196        esac
197        # !!!!!! added --enable-headers in wre 0.7.1
198        ./configure CC=gcc --prefix=/data/wre/prereqs/apache --enable-rewrite=shared --enable-deflate=shared --enable-ssl --with-ssl=/data/wre/prereqs/utils --enable-proxy=shared --with-mpm=prefork --enable-headers --disable-userdir --disable-imap --disable-negotiation --disable-actions; checkError $? "Apache Configure"
199        make; checkError $? "Apache make"
200        make install; checkError $? "Apache make install"
201        case $OSNAME in
202                Linux)
203                mv /data/wre/prereqs/utils/include/zlib.h.ignore /data/wre/prereqs/utils/include/zlib.h
204                        ;;
205        esac
206       
207        cd ../mod_perl-2.0.2
208        # !!!!!!
209        /data/wre/prereqs/perl/bin/perl Makefile.PL MP_APXS=/data/wre/prereqs/apache/bin/apxs; checkError $? "mod_perl Configure"
210        make; checkError $? "mod_perl make"
211# The tests fail on all systems even on good builds
212#       case $OSNAME in
213#               Darwin | SunOS)
214#                       #tests fail for some reason even after a good build
215#                       ;;
216#               *)
217#                       make test; checkError $? "mod_perl make test"
218#                       ;;
219#       esac
220        make install; checkError $? "mod_perl make install"
221        cd $BUILDDIR
222        echo "webgui/package   wgpkg" >> /data/wre/prereqs/apache/conf/mime.types
223}
224
225
226# mysql
227buildMysql(){
228        echo Building MySQL
229        mkdir -p /data/wre/prereqs/mysql/bin
230        mkdir -p /data/wre/prereqs/mysql/man/man1
231        mkdir -p /data/wre/prereqs/mysql/lib
232        mkdir -p /data/wre/prereqs/mysql/libexec
233        mkdir -p /data/wre/prereqs/mysql/include
234        mkdir -p /data/wre/prereqs/mysql/var
235        cd source/mysql/mysql-5.0.22
236        # !!!!!! wre 0.7.1 added: --with-openssl=/data/wre/prereqs/utils --with-unix-socket-path=/data/wre/prereqs/mysql/mysql.sock
237        CC=gcc CFLAGS="-O3 -fPIC -fno-omit-frame-pointer" CXX=g++ CXXFLAGS="-O3 -fPIC -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" LDFLAGS="-fPIC" ./configure --prefix=/data/wre/prereqs/mysql --with-extra-charsets=all --enable-thread-safe-client --enable-local-infile --enable-assembler --enable-shared --with-readline --without-debug --enable-large-files=yes --enable-largefile=yes --with-openssl=/data/wre/prereqs/utils --with-unix-socket-path=/data/wre/prereqs/mysql/mysql.sock; checkError $? "MySQL Configure"
238        make; checkError $? "MySQL make"
239        make install; checkError $? "MySQL make install"
240        cd $BUILDDIR
241}
242
243
244# Image Magick
245buildImageMagick(){
246        echo Building Image Magick
247        mkdir -p /data/wre/prereqs/imagemagick/bin
248        mkdir -p /data/wre/prereqs/imagemagick/man/man1
249        mkdir -p /data/wre/prereqs/imagemagick/lib
250        mkdir -p /data/wre/prereqs/imagemagick/include
251       
252        cd source/imagemagick/libjpeg-6b
253        # !!!!!!
254        ./configure CC=gcc --enable-shared --prefix=/data/wre/prereqs/imagemagick; checkError $? "Image Magick libjpeg Configure"
255        perl -i -p -e's[./libtool][libtool]g' Makefile
256        make; checkError $? "Image Magick libjpeg make"
257        make install; checkError $? "Image Magick libjpeg make install"
258       
259        cd ../freetype-2.1.10
260        # !!!!!!
261        ./configure CC=gcc --enable-shared --prefix=/data/wre/prereqs/imagemagick; checkError $? "Image Magick freetype Configure"
262        make; checkError $? "Image Magick freetype make"
263        make install; checkError $? "Image Magick freetype make install"
264       
265        cd ../libungif-4.1.4
266        # !!!!!!
267        ./configure CC=gcc --enable-shared --prefix=/data/wre/prereqs/imagemagick; checkError $? "Image Magick libungif Configure"
268        make; checkError $? "Image Magick libungif make"
269        make install; checkError $? "Image Magick libungif make install"
270        # !!!!!!
271        # cd ../libpng-1.2.10
272        #case $OSNAME in
273        #       SunOS)
274        #               cp scripts/makefile.solaris Makefile
275        #               ;;
276        #       *)
277        #               cp scripts/makefile.`perl -e "print lc $OSNAME"` Makefile
278        #               ;;
279        #esac
280        #perl -i -p -e's[/usr/local][/data/wre/prereqs/imagemagick]g' Makefile
281        #make; checkError $? "Image Magick libpng make"
282        #make install; checkError $? "Image Magick libpng make install"
283        # user defined libpng
284        # download from ftp://ftp.simplesystems.org/pub/libpng/png/src/history/libpng-1.2.10.tar.gz
285    cd ../libpng-1.2.10
286    ./autgen.sh
287    ./configure
288    perl -i -p -e 's[/usr/local][/data/wre/prereqs/imagemagick]g' Makefile
289    make check; checkError $? "Image Magick libpng make check"
290    make install; checkError $? "Image Magick libpng make install"
291    # !!!!!! end modified libpng
292
293        # !!!!!!
294        #cd ../ImageMagick-6.2.7
295        cd ../ImageMagick-6.3.0
296        ./configure CC=gcc --prefix=/data/wre/prereqs/imagemagick --enable-delegate-build LDFLAGS='-L/data/wre/prereqs/imagemagick/lib' CPPFLAGS='-I/data/wre/prereqs/imagemagick/include' --enable-shared=yes --with-jp2=yes --with-jpeg=yes --with-png=yes --with-perl=yes --with-x=no
297        # !!!!!!
298        checkError $? "Image Magick Configure"
299        make; checkError $? "Image Magick make"
300        make install; checkError $? "Image Magick make test"
301        cd $BUILDDIR
302}
303
304
305#perl modules
306installPerlModules(){
307        echo Installing Perl Modules
308        cd source/perl/modules
309        cd Net_SSLeay.pm-1.25
310        # !!!!!!!
311        /data/wre/prereqs/perl/bin/perl Makefile.PL /data/wre/prereqs/utils; checkError $? "Net::SSLeay Makefile.PL"
312        make; checkError $? "Net:::SSLeay make"
313        make install; checkError $? "Net::SSLeay make install"
314        cd ../Compress-Zlib-1.39
315        # !!!!!!
316        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Compress::Zlib Makefile.PL"
317        make; checkError $? "Compress::Zlib make"
318        make install; checkError $? "Compress::Zlib make install"
319        cd ../Proc-ProcessTable-0.40
320        # !!!!!!
321        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Proc::ProcessTable Makefile.PL"
322        make; checkError $? "Proc::ProcessTable make"
323        make install; checkError $? "Proc::ProcessTable make install"
324        cd ../BSD-Resource-1.25
325        # !!!!!!
326        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "BSD::Resource Makefile.PL"
327        make; checkError $? "BSD::Resource make"
328        make install; checkError $? "BSD::Resource make install"
329        cd ../URI-1.35
330        # !!!!!!
331        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "URI Makefile.PL"
332        make; checkError $? "URI make"
333        make install; checkError $? "URI make install"
334        cd ../IO-Zlib-1.04
335        # !!!!!!
336        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "IO::Zlib Makefile.PL"
337        make; checkError $? "IO::Zlib make"
338        make install; checkError $? "IO::Zlib make install"
339        cd ../HTML-Tagset-3.10
340        # !!!!!!
341        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "HTML::Tagset Makefile.PL"
342        make; checkError $? "HTML::Tagset make"
343        make install; checkError $? "HTML::Tagset make install"
344        cd ../HTML-Parser-3.54
345        # !!!!!!
346        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "HTML::Parser Makefile.PL"
347        make; checkError $? "HTML::Parser make"
348        make install; checkError $? "HTML::Parser make install"
349        cd ../libwww-perl-5.805
350        # !!!!!!
351        /data/wre/prereqs/perl/bin/perl Makefile.PL -n; checkError $? "LWP Makefile.PL"
352        make; checkError $? "LWP make"
353        make install; checkError $? "LWP make install"
354        cd ../CGI.pm-3.20
355        # !!!!!!
356        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "CGI Makefile.PL"
357        make; checkError $? "CGI make"
358        make install; checkError $? "CGI make install"
359        cd ../Digest-HMAC-1.01
360        # !!!!!!
361        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Digest::HMAC Makefile.PL"
362        make; checkError $? "Digest::HMAC make"
363        make install; checkError $? "Digest::HMAC make install"
364        cd ../Digest-MD5-2.36
365        # !!!!!!
366        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Digest::MD5 Makefile.PL"
367        make; checkError $? "Digest::MD5 make"
368        make install; checkError $? "Digest::MD5 make install"
369        cd ../Digest-SHA1-2.11
370        # !!!!!!
371        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Digest::SHA1 Makefile.PL"
372        make; checkError $? "Digest::SHA1 make"
373        make install; checkError $? "Digest::SHA1 make install"
374        cd ../Module-Build-0.28
375        # !!!!!!
376        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Module::Build Makefile.PL"
377        make; checkError $? "Module::Bulid make"
378        make install; checkError $? "Module::Build make install"
379        cd ../Params-Validate-0.81
380        # !!!!!!
381        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Params::Validate Makefile.PL"
382        make; checkError $? "Params::Validate make"
383        make install; checkError $? "Params::Validate make install"
384        cd ../DateTime-Locale-0.22
385        # !!!!!!
386        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "DateTime::Locale Makefile.PL"
387        make; checkError $? "DateTime::Locale make"
388        make install; checkError $? "DateTime::Locale make install"
389        cd ../Class-Singleton-1.03
390        # !!!!!!
391        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Class::Singleton Makefile.PL"
392        make; checkError $? "Class::Singleton make"
393        make install; checkError $? "Class::Singleton make install"
394        cd ../DateTime-TimeZone-0.45
395        # !!!!!!
396        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "DateTime::TimeZone Makefile.PL"
397        make; checkError $? "DateTime::TimeZone make"
398        make install; checkError $? "DateTime::TimZone make install"
399        cd ../Time-Local-1.12
400        # !!!!!!
401        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Time::Local Makefile.PL"
402        make; checkError $? "Time::Local make"
403        make install; checkError $? "Time::Local make install"
404        cd ../Test-Simple-0.62
405        # !!!!!!
406        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Test::More Makefile.PL"
407        make; checkError $? "Test::More make"
408        make install; checkError $? "Test::More make install"
409        cd ../Devel-Symdump-2.06
410        # !!!!!!
411        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Devel::Symdump Makefile.PL"
412        make; checkError $? "Devel::Symdump make"
413        make install; checkError $? "Devel::Symdump make install"
414        cd ../Pod-Escapes-1.04
415        # !!!!!!
416        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Pod::Escapes Makefile.PL"
417        make; checkError $? "Pod::Escapes make"
418        make install; checkError $? "Pod::Escapes make install"
419        cd ../ExtUtils-CBuilder-0.18
420        # !!!!!!
421        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "ExtUtils::CBuilder Makefile.PL"
422        make; checkError $? "ExtUtils::CBuilder make"
423        make install; checkError $? "ExtUtils::CBuilder make install"
424        cd ../Pod-Coverage-0.17
425        # !!!!!!
426        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Pod::Coverage Makefile.PL"
427        make; checkError $? "Pod::Coverage make"
428        make install; checkError $? "Pod::Coverage make install"
429        cd ../Pod-Simple-3.04
430        # !!!!!!
431        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Pod::Simple Makefile.PL"
432        make; checkError $? "Pod::Simple make"
433        make install; checkError $? "Pod::Simple make install"
434        cd ../podlators-2.0.4
435        # !!!!!!
436        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Pod::Man Makefile.PL"
437        make; checkError $? "Pod::Man make"
438        make install; checkError $? "Pod::Man make install"
439        cd ../DateTime-0.30
440        # !!!!!!
441        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "DateTime Makefile.PL"
442        make; checkError $? "DateTime make"
443        make install; checkError $? "DateTime make install"
444        cd ../DateTime-Format-Strptime-1.0700
445        # !!!!!!
446        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "DateTime::Format::Strptime Makefile.PL"
447        make; checkError $? "DateTime::Format::Strptime make"
448        make install; checkError $? "DateTime::Format::Strptime make install"
449        cd ../DateTime-Cron-Simple-0.2
450        # !!!!!!
451        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "DateTime::Cron::Simple Makefile.PL"
452        make; checkError $? "DateTime::Cron::Simple make"
453        make install; checkError $? "DateTime::Cron::Simple make install"
454        cd ../DateManip-5.44
455        # !!!!!!
456        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "DateManip Makefile.PL"
457        make; checkError $? "DateManip make"
458        make install; checkError $? "DateManip make install"
459        cd ../HTML-Template-2.8
460        # !!!!!!
461        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "HTML::Template Makefile.PL"
462        make; checkError $? "HTML::Template make"
463        make install; checkError $? "HTML::Template make install"
464        cd ../Crypt-SSLeay-0.51
465        # !!!!!!
466        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Crypt::SSLeay Makefile.PL"
467        make; checkError $? "Crypt::SSLeay make"
468        make install; checkError $? "Crypt::SSLeay make install"
469        cd ../ParsePlainConfig-1.7a
470        # !!!!!!
471        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Parse::PlainConfig Makefile.PL"
472        make; checkError $? "Parse::PlainConfig make"
473        make install; checkError $? "Parse::PlainConfig make install"
474        cd ../String-Random-0.21
475        # !!!!!!
476        /data/wre/prereqs/perl/bin/perl Build.PL; checkError $? "String::Random Makefile.PL"
477        perl Build; checkError $? "String::Random make"
478        perl Build install; checkError $? "String::Random make install"
479        cd ../Time-HiRes-1.87
480        # !!!!!!
481        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Time::HiRes Makefile.PL"
482        make; checkError $? "Time::HiRes make"
483        make install; checkError $? "Time::HiRes make install"
484        cd ../Text-Balanced-1.97
485        # !!!!!!
486        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Text::Balanced Makefile.PL"
487        make; checkError $? "Text::Balanced make"
488        make install; checkError $? "Text::Balanced make install"
489        cd ../Tie-IxHash-1.21
490        # !!!!!!
491        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Tie::IxHash Makefile.PL"
492        make; checkError $? "Tie::IxHash make"
493        make install; checkError $? "Tie::IxHash make install"
494        cd ../Tie-CPHash-1.02
495        # !!!!!!
496        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Tie::CPHash Makefile.PL"
497        make; checkError $? "Tie::CPHash make"
498        make install; checkError $? "Tie::CPHash make install"
499        cd ../Error-0.15009
500        # !!!!!!
501        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Error Makefile.PL"
502        make; checkError $? "Error make"
503        make install; checkError $? "Error make install"
504        cd ../Cache-Cache-1.04
505        # !!!!!!
506        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Cache::Cache Makefile.PL"
507        make; checkError $? "Cache::Cache make"
508        make install; checkError $? "Cache::Cache make install"
509        cd ../HTML-Highlight-0.20
510        # !!!!!!
511        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "HTML::Highlight Makefile.PL"
512        make; checkError $? "HTML::Highlight make"
513        make install; checkError $? "HTML::Highlight make install"
514        cd ../HTML-TagFilter-1.03
515        # !!!!!!
516        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "HTML::TagFilter Makefile.PL"
517        make; checkError $? "HTML::TagFilter make"
518        make install; checkError $? "HTML::TagFilter make install"
519        cd ../IO-String-1.08
520        # !!!!!!
521        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "IO::String Makefile.PL"
522        make; checkError $? "IO::String make"
523        make install; checkError $? "IO::String make install"
524        cd ../Archive-Tar-1.29
525        # !!!!!!
526        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Archive::Tar Makefile.PL"
527        make; checkError $? "Archive::Tar make"
528        make install; checkError $? "Archive::Tar make install"
529        cd ../Archive-Zip-1.16
530        # !!!!!!
531        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Archive::Zip Makefile.PL"
532        make; checkError $? "Archive::Zip make"
533        make install; checkError $? "Archive::Zip make install"
534        cd ../XML-NamespaceSupport-1.09
535        # !!!!!!
536        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "XML::NamespaceSupport Makefile.PL"
537        make; checkError $? "XML::NamespaceSupport make"
538        make install; checkError $? "XML::NamespaceSupport make install"
539        cd ../XML-SAX-0.14
540        # !!!!!!
541        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "XML::SAX Makefile.PL"
542        make; checkError $? "XML::SAX make"
543        make install; checkError $? "XML::SAX make install"
544        cd ../XML-Simple-2.14
545        # !!!!!!
546        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "XML::Simple Makefile.PL"
547        make; checkError $? "XML::Simple make"
548        make install; checkError $? "XML::Simple make install"
549        cd ../XML-RSSLite-0.11
550        # !!!!!!
551        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "XML::RSSLite Makefile.PL"
552        make; checkError $? "XML::RSSLite make"
553        make install; checkError $? "XML::RSSLite make install"
554        cd ../SOAP-Lite-0.67
555        # !!!!!!
556        /data/wre/prereqs/perl/bin/perl Makefile.PL --noprompt; checkError $? "SOAP::Lite Makefile.PL"
557        make; checkError $? "SOAP::Lite make"
558        make install; checkError $? "SOAP::Lite make install"
559       
560        cd ../DBI-1.50
561        # !!!!!!
562        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "DBI Makefile.PL"
563        make; checkError $? "DBI make"
564        make install; checkError $? "DBI make install"
565        cd ../DBD-mysql-3.0002
566        # !!!!!!
567        # from MySQL CC=gcc CFLAGS="-O3 -fPIC -fno-omit-frame-pointer" CXX=g++ CXXFLAGS="-O3 -fPIC -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" LDFLAGS="-fPIC" ./configure --prefix=/data/wre/prereqs/mysql --with-extra-charsets=all --enable-thread-safe-client --enable-local-infile --enable-assembler --enable-shared --with-readline --without-debug --enable-large-files=yes --enable-largefile=yes --with-openssl=/data/wre/prereqs/utils --with-unix-socket-path=/data/wre/prereqs/mysql/mysql.sock; checkError $? "MySQL Configure"
568       
569        #
570        /data/wre/prereqs/perl/bin/perl Makefile.PL -cflags='-fPIC -I/data/wre/prereqs/mysql/include/mysql -fPIC -fno-omit-frame-pointer' -libs="-L/data/wre/prereqs/mysql/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/data/wre/prereqs/utils/lib -lssl -lcrypto"; checkError $? "DBD::mysql Makefile.PL"
571   
572    #/data/wre/prereqs/perl/bin/perl Makefile.PL -cflags='-I/data/wre/prereqs/mysql/include/mysql' --LIBS="-L/data/wre/prereqs/mysql/lib/mysql"; checkError $? "DBD::mysql Makefile.PL"
573        make; checkError $? "DBD::mysql make"
574        make install; checkError $? "DBD::mysql make install"
575
576        cd ../Convert-ASN1-0.20
577        # !!!!!!
578        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Convert::ASN1 Makefile.PL"
579        make; checkError $? "Convert::ASN1 make"
580        make install; checkError $? "Convert::ASN1 make install"
581        cd ../HTML-TableExtract-2.07
582        # !!!!!!
583        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "HTML::TableExtract Makefile.PL"
584        make; checkError $? "HTML::TableExtract make"
585        make install; checkError $? "HTML::TableExtract make install"
586        cd ../Finance-Quote-1.11
587        # !!!!!!
588        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Finance::Quote Makefile.PL"
589        make; checkError $? "Finance::Quote make"
590        make install; checkError $? "Finance::Quote make install"
591        cd ../JSON-1.05
592        # !!!!!!
593        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "JSON Makefile.PL"
594        make; checkError $? "JSON make"
595        make install; checkError $? "JSON make install"
596        cd ../IO-Socket-SSL-0.97
597        # !!!!!!
598        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "IO::Socket::SSL Makefile.PL"
599        make; checkError $? "IO::Socket::SSL make"
600        make install; checkError $? "IO::Socket::SSL make install"
601        cd ../perl-ldap-0.33
602        # !!!!!!
603        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Net::LDAP Makefile.PL"
604        make; checkError $? "Net::LDAP make"
605        make install; checkError $? "Net::LDAP make install"
606        cd ../Log-Log4perl-1.04
607        # !!!!!!
608        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Log::Log4perl Makefile.PL"
609        make; checkError $? "Log::Log4perl make"
610        make install; checkError $? "Log::Log4perl make install"
611        cd ../POE-0.3401
612        # !!!!!!
613        /data/wre/prereqs/perl/bin/perl Makefile.PL --default; checkError $? "POE Makefile.PL"
614        make; checkError $? "POE make"
615        make install; checkError $? "POE make install"
616        cd ../POE-Component-IKC-0.1802
617        # !!!!!!
618        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "POE::Component::IKC Makefile.PL"
619        make; checkError $? "POE::Component::IKC make"
620        make install; checkError $? "POE::Component::IKC make install"
621        cd ../String-CRC32-1.4
622        # !!!!!!
623        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "String::CRC32 Makefile.PL"
624        make; checkError $? "String::CRC32 make"
625        make install; checkError $? "String::CRC32 make install"
626        cd ../Cache-Memcached-1.17
627        # !!!!!!
628        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Cache::Memcached Makefile.PL"
629        make; checkError $? "Cache::Memcached make"
630        make install; checkError $? "Cache::Memcached make install"
631        cd ../ExtUtils-XSBuilder-0.28
632        # !!!!!!
633        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "ExtUtils::XSBuilder Makefile.PL"
634        make; checkError $? "ExtUtils::XSBuilder make"
635        make install; checkError $? "ExtUtils::XSBuilder make install"
636        cd ../trace-0.51
637        # !!!!!!
638        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "trace Makefile.PL"
639        make; checkError $? "trace make"
640        make install; checkError $? "trace make install"
641        cd ../Clone-0.20
642        # !!!!!!
643        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Clone Makefile.PL"
644        make; checkError $? "Clone make"
645        make install; checkError $? "Clone make install"
646        cd ../Test-Pod-1.24
647        # !!!!!!
648        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Test::Pod Makefile.PL"
649        make; checkError $? "Test::Pod make"
650        make install; checkError $? "Test::Pod make install"
651        cd ../Data-Structure-Util-0.11
652        # !!!!!!
653        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Data::Structure::Util Makefile.PL"
654        make; checkError $? "Data::Structure::Util make"
655        make install; checkError $? "Data::Structure::Util make install"
656        cd ../Parse-RecDescent-1.94
657        # !!!!!!
658        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Parse::RecDescent Makefile.PL"
659        make; checkError $? "Parse::RecDescent make"
660        make install; checkError $? "Parse::RecDescent make install"
661       
662        cd ../libapreq2-2.07
663        # !!!!!!
664        ./configure CC=gcc --with-apache2-apxs=/data/wre/prereqs/apache/bin/apxs --enable-perl-glue; checkError $? "libapreq2 configure"
665        make; checkError $? "libapreq2 make"
666        make install; checkError $? "libapreq2 make install"
667       
668        cd ../Net-Subnets-0.21
669        # !!!!!!
670        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Net::Subnets Makefile.PL"
671        make; checkError $? "Net::Subnets make"
672        make install; checkError $? "Net::Subnets make install"
673        cd ../MailTools-1.74
674        # !!!!!!
675        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "MIME tools Makefile.PL"
676        make; checkError $? "MIME tools make"
677        make install; checkError $? "MIME tools make install"
678        cd ../IO-stringy-2.110
679        # !!!!!!
680        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "MIME tools Makefile.PL"
681        make; checkError $? "MIME tools make"
682        make install; checkError $? "MIME tools make install"
683        cd ../MIME-tools-5.420
684        # !!!!!!
685        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "MIME tools Makefile.PL"
686        make; checkError $? "MIME tools make"
687        make install; checkError $? "MIME tools make install"
688        cd ../HTML-Template-Expr-0.07
689        # !!!!!!
690        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "HTML::Template::Expr Makefile.PL"
691        make; checkError $? "HTML::Template::Expr make"
692        make install; checkError $? "HTML::Template::Expr make install"
693        cd ../Template-Toolkit-2.14
694        # !!!!!!
695        /data/wre/prereqs/perl/bin/perl Makefile.PL TT_ACCEPT=y TT_DOCS=n TT_SPLASH=n TT_THEME=n TT_EAMPLES=n TT_EXTRAS=n TT_XS_STASH=y TT_XS_DEFAULT=n TT_DBI=n TT_LATEX=n; checkError $? "Template Toolkit Makefile.PL"
696        make; checkError $? "Template Toolkit make"
697        make install; checkError $? "Template Toolkit make install"
698        cd ../Scalar-List-Utils-1.18
699        # !!!!!!
700        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Scalar::List::Utils Makefile.PL"
701        make; checkError $? "Scalar::List::Utils make"
702        make install; checkError $? "Scalar::List::Utils make install"
703        cd ../Graphics-ColorNames-1.06
704        # !!!!!!
705        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Graphics::ColorNames Makefile.PL"
706        make; checkError $? "Graphics::ColorNames make"
707        make install; checkError $? "Graphics::ColorNames make install"
708        cd ../Module-Load-0.10
709        # !!!!!!
710        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Module::Load Makefile.PL"
711        make; checkError $? "Module::Load make"
712        make install; checkError $? "Module::Load make install"
713        cd ../Color-Calc-1.00
714        # !!!!!!
715        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Color::Calc Makefile.PL"
716        make; checkError $? "Color::Calc make"
717        make install; checkError $? "Color::Calc make install"
718        cd ../DateTime-Format-Mail-0.2901
719        # !!!!!!
720        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "DateTime::Format::Mail Makefile.PL"
721        make; checkError $? "DateTime::Format::Mail make"
722        make install; checkError $? "DateTime::Format::Mail make install"
723        cd ../ParallelUserAgent-2.57
724        # !!!!!!
725        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "LWP::Parallel Makefile.PL"
726        make; checkError $? "LWP::Parallel make"
727        make install; checkError $? "LWP::Parallel make install"
728        cd ../POE-Component-Client-UserAgent-0.06       
729        # !!!!!!
730        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "POE::Component::Client::UserAgent Makefile.PL"
731        make; checkError $? "POE::Component::Client::UserAgent make"
732        make install; checkError $? "POE::Component::Client::UserAgent make install"
733# !!!!!!
734        cd ../Net-IP-1.25       
735        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Net-IP-1.25 Makefile.PL"
736        make; checkError $? "Net-IP-1.25 make"
737        make install; checkError $? "Net-IP-1.25 make install"
738       
739        cd ../Net-DNS-0.59     
740        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Net-DNS-0.59 Makefile.PL"
741        make; checkError $? "Net-DNS-0.59 make"
742        make install; checkError $? "Net-DNS-0.59 make install"
743       
744        cd ../POE-Component-Client-DNS-0.99     
745        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "POE-Component-Client-DNS-0.99 Makefile.PL"
746        make; checkError $? "POE-Component-Client-DNS-0.99 make"
747        make install; checkError $? "POE-Component-Client-DNS-0.99 make install"       
748       
749        cd ../POE-Component-Client-Keepalive-0.0901
750        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "POE-Component-Client-Keepalive-0.0901 Makefile.PL"
751        make; checkError $? "POE-Component-Client-Keepalive-0.0901 make"
752        make install; checkError $? "POE-Component-Client-Keepalive-0.0901 make install"       
753       
754        cd ../POE-Component-Client-HTTP-0.79
755        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "POE-Component-Client-HTTP-0.79 Makefile.PL"
756        make; checkError $? "POE-Component-Client-HTTP-0.79 make"
757        make install; checkError $? "POE-Component-Client-HTTP-0.79 make install"       
758# !!!!!!
759        cd ../Test-Deep-0.095
760        # !!!!!!
761        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Test::Deep Makefile.PL"
762        make; checkError $? "Test::Deep make"
763        make install; checkError $? "Test::Deep make install"
764        cd ../Test-MockObject-1.06
765        # !!!!!!
766        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Test::MockObject Makefile.PL"
767        make; checkError $? "Test::MockObject make"
768        make install; checkError $? "Test::MockObject make install"
769        cd ../UNIVERSAL-isa-0.06
770        # !!!!!!
771        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "UNIVERSAL::isa Makefile.PL"
772        make; checkError $? "UNIVERSAL::isa make"
773        make install; checkError $? "UNIVERSAL::isa make install"
774        cd ../UNIVERSAL-can-1.12
775        # !!!!!!
776        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "UNIVERSAL::can Makefile.PL"
777        make; checkError $? "UNIVERSAL::can make"
778        make install; checkError $? "UNIVERSAL::can make install"
779        cd ../Class-MakeMethods-1.01
780        # !!!!!!
781        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "Class::MakeMethods Makefile.PL"
782        make; checkError $? "Class::MakeMethods make"
783        make install; checkError $? "Class::MakeMethods make install"
784        cd ../MySQL-Diff-0.33
785        # !!!!!!
786        /data/wre/prereqs/perl/bin/perl Makefile.PL; checkError $? "MySQL::Diff Makefile.PL"
787        make; checkError $? "MySQL::Diff make"
788        make install; checkError $? "MySQL::Diff make install"
789        cp -f mysqldiff /data/wre/sbin/
790        # !!!!!!
791        /data/wre/prereqs/perl/bin/perl -i -p -e's[/usr/bin/perl][/data/wre/prereqs/perl/bin/perl]g' /data/wre/sbin/mysqldiff
792        cd $BUILDDIR
793}
794
795
796#awstats
797installAwStats(){
798        echo Installing AWStats
799        cp -RL source/awstats/awstats-6.4 /data/wre/prereqs/awstats
800}
801
802#wre utils
803installWreUtils(){
804        echo Installing WebGUI Runtime Environment Core and Utilities
805        cp -R wre/wre /data/
806        mkdir /data/wre/etc
807}
808
809#gooey
810gooey() {
811  printf '\x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \xa9 \x4d \x4d \x57 \xd0 \x57 \x57 \x57 \x4d \xa9 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \xa9 \x4d \x40 \x23 \x23 \x35 \x35 \x35 \x35 \x35 \x35 \x23 \x23 \x40 \xd0 \xa9 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \xa9 \x57 \x23 \x23 \x35 \x35 \x41 \x41 \x41 \x41 \x41 \x41 \x41 \x41 \x41 \x35 \x35 \x35 \x40 \x4d \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \xa9 \x4d \x57 \x57 \x4d \x23 \x23 \x23 \x35 \x41 \x41 \x25 \x25 \x24 \x24 \x24 \x33 \x33 \x24 \x24 \x24 \x25 \x41 \x35 \x40 \xd0 \xa9 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x57 \x33 \x24 \x25 \x25 \x41 \x35 \x35 \x41 \x25 \x25 \x24 \x4a \x37 \x37 \x37 \x37 \x37 \x3d \x3d \x3d \x37 \x33 \x24 \x25 \x41 \x23 \x23 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x3d \x24 \x25 \x25 \x41 \x35 \x41 \x41 \x25 \x25 \x33 \x33 \x24 \x41 \x41 \x35 \x23 \x40 \x40 \x40 \x40 \x35 \x43 \x43 \x24 \x25 \x41 \x23 \x40 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x40 \x3d \x33 \x41 \x35 \x35 \x41 \x41 \x41 \x41 \x41 \x35 \x23 \x23 \x23 \x23 \x23 \x23 \x23 \x40 \xd0 \x57 \xd0 \x43 \x4a \x24 \x25 \x23 \x41 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \xa9 \x23 \x41 \x41 \x23 \x23 \x35 \x41 \x41 \x41 \x41 \x41 \x41 \x35 \x35 \x25 \x24 \x33 \x33 \x33 \x33 \x33 \x24 \x35 \x35 \x43 \x25 \x25 \x35 \x25 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x25 \x57 \xd0 \x40 \x40 \x35 \x35 \x41 \x41 \x41 \x41 \x25 \x41 \x33 \x37 \x4a \x24 \x25 \x41 \x41 \x41 \x33 \x2c \x24 \x41 \x24 \x25 \x41 \x35 \x24 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x40 \x37 \xd0 \x23 \xd0 \x23 \x35 \x41 \x41 \x41 \x25 \x25 \x4a \x43 \x35 \xa9 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x28 \x4a \x25 \x41 \x41 \x41 \x41 \x24 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x28 \xa6 \x25 \x40 \x40 \x23 \x35 \x41 \x41 \x25 \x25 \x43 \x41 \x4d \xa9 \xa9 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x4a \x4a \x25 \x41 \x41 \x41 \x24 \x23 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x4d \x2e \x2c \x41 \xd0 \x40 \x35 \x41 \x41 \x41 \x25 \x43 \x35 \x20 \x40 \x43 \x4a \xd0 \x20 \x20 \x20 \x20 \x20 \x20 \x43 \x33 \x25 \x41 \x41 \x25 \x4a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x40 \x37 \x28 \x23 \xd0 \x23 \x35 \x41 \x41 \x25 \x24 \x4a \x20 \x57 \x2a \xa6 \x24 \x57 \x41 \x4d \x20 \x20 \x20 \x20 \x3d \x24 \x25 \x41 \x25 \x4a \xd0 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x57 \x35 \x23 \x40 \x40 \x23 \x35 \x41 \x41 \x25 \x43 \xd0 \x20 \x40 \x27 \x21 \x3d \x21 \xa6 \x4d \x20 \x20 \x20 \x40 \x37 \x24 \x25 \x25 \x4a \x35 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x4d \x35 \x41 \x40 \x40 \x23 \x41 \x41 \x41 \x24 \x43 \x20 \x20 \xa9 \x24 \xa6 \xa6 \x33 \x4d \x20 \x20 \x20 \xa9 \x4a \x33 \x24 \x24 \x4a \x35 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x35 \x23 \x25 \x40 \x40 \x35 \x41 \x41 \x25 \x24 \x4a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x41 \x4a \x33 \x24 \x43 \x23 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x33 \x24 \x33 \xd0 \x40 \x35 \x41 \x41 \x25 \x33 \x33 \x20 \x20 \x20 \x20 \xa9 \x20 \x20 \x20 \x20 \xa9 \x35 \x4a \x33 \x33 \x33 \x57 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x40 \x28 \x43 \x40 \x57 \x23 \x35 \x41 \x25 \x24 \x24 \xa9 \x40 \x25 \x4a \x4a \x33 \x25 \x23 \xd0 \x41 \x4a \x33 \x43 \x35 \xa9 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x37 \x37 \xa9 \x20 \x20 \x4d \x33 \x3d \x28 \x41 \x4d \xd0 \x35 \x41 \x41 \x25 \x24 \x24 \x25 \x35 \x23 \x40 \xd0 \x40 \x23 \x41 \x24 \x33 \x25 \x3d \x35 \x25 \x41 \x35 \xd0 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \xd0 \x21 \x37 \x41 \x20 \x20 \x4a \x4a \x23 \x25 \x43 \x40 \x4d \x40 \x35 \x41 \x41 \x41 \x35 \x35 \x35 \x23 \x23 \x23 \x23 \x35 \x35 \x25 \x25 \x25 \x3d \x24 \x25 \x41 \x23 \x35 \x23 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x35 \x28 \x40 \x4a \x43 \xa9 \x20 \x2c \x23 \x41 \x33 \x4a \x4a \x40 \x4d \xd0 \x23 \x35 \x41 \x41 \x25 \x25 \x25 \x41 \x41 \x41 \x41 \x24 \x33 \x24 \x25 \x24 \x3d \x33 \x24 \x41 \x40 \x33 \x40 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x0d \x0a \x20 \x4d \x43 \x37 \xd0 \xd0 \xa6 \x33 \xa9 \x20 \x2c \x41 \x24 \x4a \x33 \x33 \x4a \x41 \x57 \x57 \xd0 \x23 \x35 \x25 \x24 \x24 \x24 \x24 \x24 \x33 \x33 \x33 \x24 \x41 \x41 \x24 \x37 \x4a \x24 \x25 \x41 \x3d \xa9 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x0d \x0a \xa9 \xa6 \x25 \x57 \x40 \x24 \x21 \x23 \x20 \x20 \x2a \x24 \x4a \x33 \x41 \x25 \x33 \x4a \x43 \x24 \x41 \x35 \x23 \x40 \x41 \x25 \x24 \x33 \x33 \x33 \x4a \x4a \x24 \x41 \x35 \x35 \x35 \x33 \x37 \x4a \x24 \x3d \x41 \x20 \x20 \x20 \x57 \x23 \x20 \x20 \x0d \x0a \x23 \xa6 \x57 \x23 \x35 \x33 \xa6 \x4a \x57 \x23 \xa6 \x43 \x24 \x23 \x35 \x25 \x24 \x33 \x43 \x28 \x43 \x4a \x4a \x4a \x24 \x25 \x25 \x24 \x33 \x33 \x43 \x43 \x24 \x25 \x41 \x35 \x35 \x23 \x41 \x4a \x37 \x43 \xa6 \x20 \x20 \x20 \xd0 \x21 \x35 \x20 \x0d \x0a \x25 \x3d \x23 \x23 \x35 \x35 \x28 \x3d \x3d \xa6 \x43 \x25 \x40 \x23 \x41 \x25 \x24 \x4a \x28 \x33 \x25 \x24 \x24 \x25 \x25 \x25 \x25 \x24 \x33 \x37 \x2a \x3d \x24 \x25 \x41 \x41 \x35 \x35 \x23 \x23 \x25 \x3d \x27 \x40 \x20 \x20 \x41 \x4a \x43 \xa9 \x0d \x0a \xd0 \xa6 \x25 \x41 \x41 \x35 \x35 \x41 \x41 \x40 \x40 \x40 \x23 \x35 \x41 \x24 \x4a \x3d \x4a \x35 \x41 \x25 \x25 \x41 \x41 \x25 \x24 \x24 \x43 \x27 \x3d \x43 \x4a \x33 \x24 \x25 \x41 \x41 \x35 \x23 \x40 \x23 \x43 \xa6 \x41 \x33 \x3d \x40 \x33 \x4d \x0d \x0a \x20 \x28 \x4a \x24 \x25 \x41 \x35 \x23 \x40 \x40 \x23 \x35 \x41 \x25 \x25 \x33 \x4a \xa6 \x23 \x23 \x41 \x41 \x41 \x41 \x41 \x25 \x24 \x33 \x21 \x21 \x21 \x21 \x37 \x43 \x4a \x33 \x25 \x25 \x41 \x35 \x23 \x40 \xd0 \x24 \x2a \x43 \x24 \x25 \x25 \x20 \x0d \x0a \x20 \x57 \x28 \x4a \x33 \x24 \x25 \x41 \x41 \x41 \x25 \x24 \x24 \x24 \x33 \x33 \x4a \x28 \xd0 \x23 \x35 \x41 \x41 \x41 \x41 \x25 \x24 \x4a \x2c \x24 \x24 \x4a \xa6 \x21 \xa6 \x3d \x43 \x33 \x24 \x25 \x41 \x35 \x23 \xd0 \x35 \x28 \x24 \x40 \x20 \x20 \x0d \x0a \x20 \x20 \xd0 \x43 \x37 \x33 \x33 \x33 \x24 \x24 \x33 \x33 \x33 \x33 \x33 \x33 \x41 \x24 \x40 \x40 \x41 \x41 \x41 \x41 \x25 \x24 \x24 \x3d \x37 \x35 \x23 \x41 \x24 \x4a \x3d \xa6 \x21 \xa6 \x43 \x33 \x24 \x41 \x35 \x23 \x57 \x35 \x4a \x20 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x57 \x41 \x25 \x24 \x24 \x24 \x25 \x25 \x35 \x23 \xd0 \xa9 \x20 \xa9 \x4a \x40 \x41 \x41 \x41 \x41 \x25 \x24 \x33 \x21 \x23 \xa9 \x23 \x23 \x35 \x25 \x24 \x33 \x4a \x35 \x37 \x28 \x37 \x24 \x25 \x35 \x40 \x4d \x25 \x41 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x24 \x41 \x25 \x24 \x41 \x41 \x41 \x24 \x33 \x2a \x57 \x20 \xa9 \x41 \x35 \x41 \x25 \x24 \x43 \x4d \xa9 \x40 \x37 \x28 \x24 \x41 \x35 \xd0 \x4d \x3d \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x4d \x37 \x24 \xa6 \x35 \x35 \x41 \x24 \x24 \x2c \xa9 \x20 \x20 \x57 \x37 \x25 \x24 \x33 \x43 \x20 \x20 \x20 \x20 \x25 \xa6 \x25 \x35 \x40 \x4d \x4a \xd0 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x40 \x4a \x57 \xa9 \x20 \x20 \x20 \x20 \x40 \x28 \x43 \x23 \x35 \x41 \x41 \x25 \x2c \x4d \x57 \x41 \x3d \x4a \x33 \x4a \x4a \x57 \x20 \x20 \x20 \x20 \x20 \x4a \x43 \x35 \x23 \x57 \x4a \x40 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \xa9 \x3d \x43 \x25 \x23 \xa9 \x20 \xa9 \x23 \x4a \xd0 \x23 \x35 \x35 \x35 \x41 \x2c \x41 \x3d \x28 \x43 \x33 \x25 \x23 \xa9 \x20 \x20 \x20 \x20 \x20 \x20 \x23 \x28 \x35 \xd0 \x57 \x3d \xa9 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x4d \x43 \x35 \x40 \x25 \x24 \x25 \x23 \xd0 \x40 \x35 \x35 \x35 \x23 \x33 \x37 \xa9 \xa9 \xa9 \xa9 \xa9 \x20 \x20 \x20 \x20 \x20 \x20 \xa9 \x33 \x25 \x43 \x24 \xd0 \xd0 \x4a \x23 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x4d \x4a \x41 \x4d \x57 \x57 \xd0 \x23 \x35 \x35 \x23 \x23 \x33 \x3d \x4d \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x41 \xa6 \x43 \x41 \x24 \x33 \x23 \x20 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \xa9 \x41 \x4a \x41 \x23 \x40 \x23 \x23 \x35 \x25 \x43 \x24 \xa9 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \xa9 \x40 \x23 \x57 \xa9 \x20 \x20 \x20 \x20 \x0d \x0a \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x57 \x35 \x24 \x4a \x43 \x43 \x33 \x41 \xd0 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x20 \x0d \x0a \x0d \x0a';
812  cat wre/wre/docs/credits.txt
813  return 0;
814}
815
816#wre help
817wrehelp() {
818cat <<_WREHELP
819 \`build.sh' builds the WebGUI Runtime Environment.
820 
821  Usage: $0 [OPTION]... [OPTION=ARGUMENT]
822 
823  Defaults for the options are specified in brackets.
824 
825  Configuration:
826  -h, --help, -?      display this help and exit
827
828  Build switches cause only selecte applications to build.
829  They can be combined to build only certain apps.
830 
831  Example: ./build.sh --perl           #only perl will be built
832           ./build.sh --perl --apache  #only perl and apache will build
833           ./build.sh                  #build all
834
835  --clean        cleans all pre-req folders for a new build
836  --utilities    compiles and installs shared utilities
837  --memcached    compiles and installs memcached
838  --perl         compiles and installs perl
839  --apache       compiles and installs apache
840  --mysql        compiles and installs mysql
841  --imagemagick  compiles and installs imagemagick
842  --awstats      installs awstats
843  --wre          installs wre
844  --perlmodules  installs perl modules from cpan
845                               
846_WREHELP
847
848}
849
850# vars
851. wre/wre/sbin/setenvironment
852export BUILDDIR=`pwd`
853export OSNAME=`uname -s`
854
855
856#Evaluate options passed by command line
857for opt in "$@"
858do
859
860  #get any argument passed with this option
861  arg=`expr "x$opt" : 'x[^=]*=\(.*\)'`
862
863  case "$opt" in
864 
865    --clean)
866      clean
867    ;;
868 
869    --utils | --utilities)
870      buildUtils
871    ;;
872   
873    --memcached)
874      buildMemcached
875    ;;
876   
877    --perl)
878      buildPerl
879    ;;
880   
881    --apache)
882      buildApache
883    ;;
884   
885    --apache=*)
886      echo $arg
887      #Use $arg as parameter to function call, could be used
888      #to pass compile flags for performance, etc.
889    ;;
890   
891    --mysql)
892      buildMysql
893    ;;
894   
895    --imageMagick | --imagemagick)
896      buildImageMagick
897    ;;
898   
899    --awstats)
900      installAwStats
901    ;;
902   
903    --wre)
904      installWreUtils
905    ;;
906   
907    --wre=revolutionary)
908      gooey
909   
910    ;;
911     
912    --perlModules | --perlmodules)
913      installPerlModules
914    ;;
915   
916    --help | -help | -h | -? | ?)
917      wrehelp
918      exit 0
919    ;;
920   
921    -*)
922      echo "Error: I don't know this option: $opt
923      Try\`$0 --help' for valid options."
924      exit 1
925    ;;
926
927  esac
928done
929
930
931#No arguments passed build everything
932if [ $# -eq 0 ]
933then
934
935if [ -d /data ]; then
936 clean
937 buildUtils
938 buildMemcached
939 buildPerl
940 buildApache
941 buildMysql
942 buildImageMagick
943 installAwStats
944 installWreUtils
945 installPerlModules
946
947 else
948    echo "You must create a writable /data folder to begin."
949    exit
950 fi
951
952 
953fi
954
955