|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Install aubit4gl and PostgreSQL on Ubuntu 8.04 Desktop for a developer's workstationOne of the main problems with Ubuntu and aubit4gl is that by default, /bin/sh is symlinked to a shell called “dash”. I chose to patch aubit4gl’s scripts to specifically call bash instead of /bin/sh, instead of changing the symlink. I didn’t want to take the chance on hosing up some part of Ubuntu by changing the symlink. Please read the comments in the script closely before trying to use it. As this was created a hack primarily for my use, it doesn’t do much in the way of error checking. If anyone does find this useful or wishes to contribute any enhancements / feedback, please feel free to do so. One last note, so far, it seams that I can compile 4gl code by hand, but the makefile in tools/test seems to disagree with something in this setup. It may just be a problem with the makefile not being updated to be GNU make 3.81 friendly, but I haven’t had a chance to look more closely. Regards, Robert >--------------- CUT HERE ---------< #!/bin/bash # Robs Handy Dandy Aubit4GL Build Script for Ubuntu 8.04 # Modified 20 September 2008 # Note this script must be run with sudo # This is ONLY tested for Ubuntu 8.04 Desktop. No warranty. # Rob is not responsible for any damage that may occur due to use # of this script. # WARNING! -- No checks are made for prior versions of aubit being installed. Using # this on an existing install will likely break things. # This script was tested on a clean / fresh install of Ubuntu 8.04.1 Desktop (32 bit). # Install any updates system updates and reboot before running this script. # Run this script using "sudo" inside the gnome terminal app -- do not run in console mode. # It will install required packages to build Aubit4GL with curses, odbc, and postgresql support. # It will then download the source code from aubit.com, patch a few scripts to ensure they ONLY # call bash (not sh, which is a symlink to dash). Once patched, it will configure, build, and # install. It will log the configure, build, and install to a log file and open in a gedit # tab so that you can verify all worked correctly. # This script could use lots of improvements. If you have any suggestions, please # let me know. # define the tarball filename. (In theory this should be the only change needed when a new # version is released.) TARBALL=aubit4glsrc.1.10RC.32.tar.gz export TARBALL #install pre-requisites apt-get update apt-get -y install \ postgresql-8.3 postgresql-client-8.3 \ postgresql-client-common postgresql-common \ postgresql-server-dev-8.3 libecpg-dev bison libglib2.0-dev \ flex doxygen valgrind cvs splint expect curl autobook \ texi2html libxmlrpc++-dev libgmp3-dev libncurses5 \ libncurses5-dev libncursesw5 libncursesw5-dev libiodbc2 \ unixodbc unixodbc-dev unixodbc-bin odbc-postgresql \ pgadmin3 pgadmin3-data pgagent automake autoconf libtool # now cd to to /tmp and download sourcecode cd /tmp wget http://aubit.com/aubit4gl/src/$TARBALL mkdir /opt/aubit SRCDIR=/opt/aubit export SRCDIR cd /opt/aubit tar xvzf- /tmp/$TARBALL # Now fix up the scripts to ensure we use bash and not dash on ubuntu find . -type f -exec grep -l '#!/bin/sh' {} \; > /tmp/filename_list for file in `cat /tmp/filename_list`; do cp -p $file $file.BKP sed 's/#!\/bin\/sh/#!\/bin\/bash/g' $file.BKP > $file rm -f $file.BKP done # fix up aubit script to make it not complain about sh not being bash, since we fixed up the # other scripts cp -p bin/aubit bin/aubit.OLD echo '#!/bin/bash' > bin/aubit sed 's/sh --version < \/dev\/null/bash --version/g' bin/aubit.OLD >> bin/aubit rm -f bin/aubit.OLD chmod ag+rx bin/aubit # run configure ./configure 2>&1 | tee /dev/tty configure.LOG # toss up the configure output into a gedit window so we can see the results gedit configure.LOG & # make it make 2>&1 | tee /dev/tty make.LOG gedit make.LOG & # install it make install 2>&1 | tee /dev/tty make-install.LOG gedit make-install.LOG & ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Aubit4gl-discuss mailing list Aubit4gl-discuss@... https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss |
|
|
Re: Install aubit4gl and PostgreSQL on Ubuntu 8.04 Desktop for a developer's workstationAgain, this is ONLY tested for Ubuntu Desktop 8.04. It installs with PostgreSQL 8.3, curses, and odbc support. I also added jedit to the installed packages, as it appears to support 4GL syntax highlighting. Robert On 9/20/08 1:19 PM, "Robert Lawrence" <robl@...> wrote: I thought I would share this to the list, as someone may find it useful. It’s a script I am using to build aubit4gl on an Ubuntu 8.04 desktop. The only thing this script assumes is that you have a fresh / clean install of Ubuntu 8.04 Desktop with all updates applied and it is to be run with sudo, so that it can install packages and install as root. #!/bin/bash # which tarball to download? Change this for new versions. TARBALL=aubit4glsrc.1.10RC.32.tar.gz export TARBALL # where to extract the tarball SRCDIR=/opt/aubit export SRCDIR function dummy { # Since some shells don't understand functions, lets make sure we don't # attempt to run on an unsupported shell. echo "You are not using bash! This script requires bash!" exit } function displaymain { clear echo "+-----------------------------------------------------------+" echo "| Rob's Aubit 4GL Builder for Ubuntu Desktop 8.04.1 |" echo "| revised 21 September 2008 |" echo "+-----------------------------------------------------------+" echo " " echo "READ THE FOLLOWING CAREFULLY" echo "This script assumes that it is running on a fresh install of Ubuntu" echo "Desktop 8.04.1 and that all available updates have been applied. If" echo "you have customised the install in anyway, this script may not work." echo " " echo "You must run this script with sudo, or it will fail." echo " " echo "You must be connected to the Internet to download source code and" echo "other packages." echo " " echo "Using this on an existing install will likely break things." echo " " echo "Rob is not responsible for any damage resulting from use of this script." echo " " echo "* Are you sure you wish to continue?" } function installpkgs { clear echo "+----------------------------------------------+" echo "| Installing packages needed to build Aubit4GL |" echo "+----------------------------------------------+" echo " " #install pre-requisites apt-get update apt-get -y install \ postgresql-8.3 postgresql-client-8.3 postgresql-client-common \ postgresql-common postgresql-server-dev-8.3 libecpg-dev bison \ libglib2.0-dev flex doxygen valgrind cvs splint expect curl \ jedit autobook texi2html libxmlrpc++-dev libgmp3-dev \ libncurses5 libncurses5-dev libncursesw5 libncursesw5-dev \ libiodbc2 unixodbc unixodbc-dev unixodbc-bin odbc-postgresql \ pgadmin3 pgadmin3-data pgagent automake autoconf libtool } function getsourcecode { echo " " echo "+---------------------------------------------------------+" echo " Downloading $TARBALL from aubit.com " echo "+---------------------------------------------------------+" echo " " # download in tmp dir cd /tmp wget http://aubit.com/aubit4gl/src/$TARBALL echo "+----------------------------------------------+" echo " Extracting $TARBALL to $SRCDIR " echo "+----------------------------------------------+" echo " " # extract to $SRCDIR mkdir $SRCDIR cd $SRCDIR tar xvzf- /tmp/$TARBALL cd $SRCDIR/aubit4glsrc/ } function patchit { echo " " echo "+---------------------------------------------------------+" echo " Patching aubit scripts to explicitly use bash (not sh) " echo "+---------------------------------------------------------+" echo " " # Now fix up the scripts to ensure we use bash and not dash on ubuntu find . -type f -exec grep -l '#!/bin/sh' {} \; > /tmp/filename_list for file in `cat /tmp/filename_list`; do cp -p $file $file.BKP sed 's/#!\/bin\/sh/#!\/bin\/bash/g' $file.BKP > $file rm -f $file.BKP done #fix up aubit script to make it not complain about sh not being bash, since we fixed up the # other scripts cp -p bin/aubit bin/aubit.OLD echo '#!/bin/bash' > bin/aubit sed 's/sh --version < \/dev\/null/bash --version/g' bin/aubit.OLD >> bin/aubit rm -f bin/aubit.OLD chmod ag+rx bin/aubit } function configsource { echo " " echo "+---------------------------------------------------------+" echo " Configuring source code " echo "+---------------------------------------------------------+" echo " " # run configure ./configure 2>&1 | tee configure.LOG } function makeit { echo " " echo "+---------------------------------------------------------+" echo " Building Aubit 4GL Compiler " echo "+---------------------------------------------------------+" echo " " # make it make 2>&1 | tee make.LOG GOODBUILD=`cat make.LOG | grep make | grep Error | wc -l` if [ $GOODBUILD = 0 ]; then echo " " echo "+---------------------------------------------------------+" echo "Congratulations! No errors were detected during build. " echo "Proceeding to instalation." echo "+---------------------------------------------------------+" echo " " installit else echo " " echo "+---------------------------------------------------------+" echo "ERRORS were encountered. Please review make.LOG in $SRCDIR" echo "to diagnose the problem." echo "INSTALL ABORTED DUE TO BULD ERRORS!" echo "+---------------------------------------------------------+" echo " " exit fi } function installit { echo " " echo "+---------------------------------------------------------+" echo " Installing Aubit 4GL Compiler " echo "+---------------------------------------------------------+" echo " " # install it make install 2>&1 | tee make-install.LOG } function alldone { echo " " echo "+------------------------------------------------------------------+" echo " ALL DONE!! " echo " Check the log files configure.LOG, make.LOG, make-install.LOG" echo " located in $SRCDIR" echo "+------------------------------------------------------------------+" echo " " } function doit { installpkgs getsourcecode patchit configsource makeit installit alldone exit } displaymain OPTIONS="Yes No" select opt in $OPTIONS; do if [ "$opt" = "No" ]; then echo "Goodbye!" exit elif [ "$opt" = "Yes" ]; then doit else echo "BAD OPTION!" echo "Press Enter to continue." read junk displaymain echo "1) Yes" echo "2) No" fi done ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Aubit4gl-discuss mailing list Aubit4gl-discuss@... https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss |
|
|
Re: Install aubit4gl and PostgreSQL on Ubuntu 8.04 Desktop for a developer's workstationAny thoughts about doing a script like this for 8.10 ?
;-) On Sunday 21 September 2008 20:37:52 robl@... wrote: > >From a few suggestions I received, here is an improved version of my build > > script. It's more user friendly and does some checking for build errors > > before attempting to do an install. > > Again, this is ONLY tested for Ubuntu Desktop 8.04. It installs with > PostgreSQL 8.3, curses, and odbc support. I also added jedit to the > installed packages, as it appears to support 4GL syntax highlighting. > > Robert > > On 9/20/08 1:19 PM, "Robert Lawrence" <robl@...> wrote: > > I thought I would share this to the list, as someone may find it useful. > It's a script I am using to build aubit4gl on an Ubuntu 8.04 desktop. The > only thing this script assumes is that you have a fresh / clean install of > Ubuntu 8.04 Desktop with all updates applied and it is to be run with > sudo, so that it can install packages and install as root. > > One of the main problems with Ubuntu and aubit4gl is that by default, > /bin/sh is symlinked to a shell called "dash". I chose to patch aubit4gl's > scripts to specifically call bash instead of /bin/sh, instead of changing > the symlink. I didn't want to take the chance on hosing up some part of > Ubuntu by changing the symlink. > > Please read the comments in the script closely before trying to use it. As > this was created a hack primarily for my use, it doesn't do much in the way > of error checking. > > If anyone does find this useful or wishes to contribute any enhancements / > feedback, please feel free to do so. > > One last note, so far, it seams that I can compile 4gl code by hand, but > the makefile in tools/test seems to disagree with something in this setup. > It may just be a problem with the makefile not being updated to be GNU make > 3.81 friendly, but I haven't had a chance to look more closely. > > Regards, > Robert -- Mike Aubury http://www.aubit.com/ Aubit Computing Ltd is registered in England and Wales, Number: 3112827 Registered Address : Clayton House,59 Piccadilly,Manchester,M1 2AQ ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Aubit4gl-discuss mailing list Aubit4gl-discuss@... https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss |
| Free Forum Powered by Nabble | Forum Help |